Difference between revisions of "Commentary configuration file"

From Valve Developer Community
Jump to: navigation, search
(Commentary root section: Auto line breaks would rock)
(Changed outline level and used a broader example)
Line 5: Line 5:
 
<br />
 
<br />
  
==Commentary root section==
+
=Commentary root section=
 
Name: Commentary<br />
 
Name: Commentary<br />
 
This is the root section for commentary.
 
This is the root section for commentary.
  
===Entity section===
+
==Entity section==
 
Name: entity<br />
 
Name: entity<br />
 
Parent: "commentary"<br />
 
Parent: "commentary"<br />
 
These are individual commentary entities. This element can be used more than once to add multiple commentary points to a level.
 
These are individual commentary entities. This element can be used more than once to add multiple commentary points to a level.
  
====Commentary entity details====
+
===Commentary entity details===
 
Parent: "entity"<br />
 
Parent: "entity"<br />
  
Line 25: Line 25:
 
'''"angles"''' &nbsp;&nbsp;&mdash; (x y z  hammer rotation notation) (unknown) (optional)<br />
 
'''"angles"''' &nbsp;&nbsp;&mdash; (x y z  hammer rotation notation) (unknown) (optional)<br />
  
====Start/finish commands====
+
===Start/finish commands===
 
Parent: "entity"<br />
 
Parent: "entity"<br />
  
Line 31: Line 31:
 
'''"postcommands"''' &nbsp;&nbsp;&mdash; Console commands to run after commentary (optional)<br />
 
'''"postcommands"''' &nbsp;&nbsp;&mdash; Console commands to run after commentary (optional)<br />
  
====Connections section====
+
===Connections section===
 
Name: "connections"<br />
 
Name: "connections"<br />
 
Parent: entity<br />
 
Parent: entity<br />
Line 39: Line 39:
 
'''"OnCommentaryStopped"''' &nbsp;&nbsp;&mdash; Triggers to fire when commentary is finished (related to point_commentary_node)<br />
 
'''"OnCommentaryStopped"''' &nbsp;&nbsp;&mdash; Triggers to fire when commentary is finished (related to point_commentary_node)<br />
  
====Moving the camera====
+
===Moving the camera===
 
'''"viewposition"''' &nbsp;&nbsp;&mdash; Name of entity (unknown) (optional)<br />
 
'''"viewposition"''' &nbsp;&nbsp;&mdash; Name of entity (unknown) (optional)<br />
 
'''"viewtarget"''' &nbsp;&nbsp;&mdash; Name of entity (unknown) (optional)
 
'''"viewtarget"''' &nbsp;&nbsp;&mdash; Name of entity (unknown) (optional)
  
==Example from Lost Coast==
+
=Example from Lost Coast=
 
Below is an example from the Lost Coast's commentary to show the simple format of the file.
 
Below is an example from the Lost Coast's commentary to show the simple format of the file.
  
Line 51: Line 51:
 
{
 
{
 
"classname" "point_commentary_node"
 
"classname" "point_commentary_node"
"origin" "1351.290771 2388.777588 -10.452896"
+
"origin" "1213.953735 4787.380371 2356.031250"
"commentaryfile" "#lostcoast\commentary\comm_intro.wav"
+
"angles" "0 90 0"
"commentaryfile_nohdr" "#lostcoast\commentary\comm_intro_nohdr.wav"
+
"commentaryfile" "#lostcoast\commentary\comm_tone.wav"
"speakers" "Gabe Newell"
+
"speakers" "Chris Green"
"targetname" "comm_node_1"
+
"targetname" "comm_node_9"
 +
"connections"
 +
{
 +
"OnCommentaryStarted" "comm_clientcommand,Command,mat_show_histogram 1,42,-1"
 +
"OnCommentaryStopped" "comm_clientcommand,Command,mat_show_histogram 0,0,-1"
 +
}
 
}
 
}
 
}</pre>
 
}</pre>
  
 
[[Category:Technical]]
 
[[Category:Technical]]

Revision as of 23:46, 28 October 2005

The commentary system is largely unknown. The current revision of this article reflects data gathered from Lost Coast's commentary.

This file is in Valve's 'configuration file' format.


Commentary root section

Name: Commentary
This is the root section for commentary.

Entity section

Name: entity
Parent: "commentary"
These are individual commentary entities. This element can be used more than once to add multiple commentary points to a level.

Commentary entity details

Parent: "entity"

"classname"   — Type of entity to display (usually point_commentary_node)
"origin"   — Origin of the item (x y z hammer position notation)
"commentaryfile"   — WAV file to play
"commentaryfile_nohdr"   — WAV file to play if HDR is disabled (will play above if not specified) (optional)
"speakers"   — The name of the speaker(s)
"targetname"   — Name of the entity
"angles"   — (x y z hammer rotation notation) (unknown) (optional)

Start/finish commands

Parent: "entity"

"precommands"   — Console commands to run before commentary (optional)
"postcommands"   — Console commands to run after commentary (optional)

Connections section

Name: "connections"
Parent: entity
Triggers attached to this entity. Optional.

"OnCommentaryStarted"   — Triggers to fire when commentary is started (related to point_commentary_node)
"OnCommentaryStopped"   — Triggers to fire when commentary is finished (related to point_commentary_node)

Moving the camera

"viewposition"   — Name of entity (unknown) (optional)
"viewtarget"   — Name of entity (unknown) (optional)

Example from Lost Coast

Below is an example from the Lost Coast's commentary to show the simple format of the file.

Commentary
{
	entity
	{
		"classname" "point_commentary_node"
		"origin" "1213.953735 4787.380371 2356.031250"
		"angles" "0 90 0"
		"commentaryfile" "#lostcoast\commentary\comm_tone.wav"
		"speakers" "Chris Green"
		"targetname" "comm_node_9"
		"connections"
		{
			"OnCommentaryStarted" "comm_clientcommand,Command,mat_show_histogram 1,42,-1"
			"OnCommentaryStopped" "comm_clientcommand,Command,mat_show_histogram 0,0,-1"
		}
	}
}