Difference between revisions of "Responses"

From Team Fortress Wiki
Jump to: navigation, search
(Audio nav)
(Tagged code, adjusted a link, changed icon links.)
Line 5: Line 5:
 
== [[Classes|Class]] responses ==
 
== [[Classes|Class]] responses ==
  
* {{Icon class|Scout}} [[Scout responses]]
+
* {{Icon class|class=scout|link=Scout responses}} [[Scout responses]]
* {{Icon class|Soldier}} [[Soldier responses]]
+
* {{Icon class|class=soldier|link=Soldier responses}} [[Soldier responses]]
* {{Icon class|Pyro}} [[Pyro responses]]
+
* {{Icon class|class=pyro|link=Pyro responses}} [[Pyro responses]]
* {{Icon class|Demoman}} [[Demoman responses]]
+
* {{Icon class|class=demo|link=Demoman responses}} [[Demoman responses]]
* {{Icon class|Heavy}} [[Heavy responses]]
+
* {{Icon class|class=heavy|link=Heavy responses}} [[Heavy responses]]
* {{Icon class|Engineer}} [[Engineer responses]]
+
* {{Icon class|class=engineer|link=Engineer responses}} [[Engineer responses]]
* {{Icon class|Medic}} [[Medic responses]]
+
* {{Icon class|class=medic|link=Medic responses}} [[Medic responses]]
* {{Icon class|Sniper}} [[Sniper responses]]
+
* {{Icon class|class=sniper|link=Sniper responses}} [[Sniper responses]]
* {{Icon class|Spy}} [[Spy responses]]
+
* {{Icon class|class=spy|link=Spy responses}} [[Spy responses]]
  
 
== Response rule scripts ==
 
== Response rule scripts ==
 
=== Accessing ===
 
=== Accessing ===
The scripts which control the responses are packaged inside the main TF2 .gcf content file. This file can be inspected with a tool such as [http://nemesis.thewavelength.net/index.php?p=26 GCFScape]. The content file itself is located in the Steam\steamapps directory and is called "team fortress 2 content.gcf".  Once you've got the content file open, the response rule scripts are located in ''root\tf\scripts\talker''.
+
The scripts which control the responses are packaged inside the main TF2 <code>.gcf</code> content file. This file can be inspected with a tool such as [http://nemesis.thewavelength.net/index.php?p=26 GCFScape]. The content file itself is located in the <code>Steam\steamapps</code> directory and is named "<code>team fortress 2 content.gcf</code>".  Once you've got the content file open, the response rule scripts are located in <code>root\tf\scripts\talker</code>.
  
 
=== File contents ===
 
=== File contents ===
The main script file is ''response_rules.txt''. This file contains a description of the script language used by the responses, as well as definitions for most of the criteria used in the scripts. Additionally, there is one script file for each [[classes|class]]. These files contain most of the class specific response rules and [[voice commands]]. Finally, ''tf.txt'' contains [[taunt]] rules for each class, as well as a few miscellaneous class-specific rules (such as rules to cause the [[Heavy]] to emote after firing his [[Minigun]] for a while).
+
The main script file is <code>response_rules.txt</code>. This file contains a description of the script language used by the responses, as well as definitions for most of the criteria used in the scripts. Additionally, there is one script file for each [[classes|class]]. These files contain most of the class specific response rules and [[voice commands]]. Finally, <code>tf.txt</code> contains [[Taunts|taunt]] rules for each class, as well as a few miscellaneous class-specific rules (such as rules to cause the [[Heavy]] to emote after firing his [[Minigun]] for a while).
  
 
=== Scenes ===
 
=== Scenes ===
The result of a scripted action is usually a scene. A scene defines what is said as well as the expression on the character's face when it is said. Scenes are defined in individual .vcd files, which can be found packaged in the .gcf in ''root\tf\scenes\player\<class>''.
+
The result of a scripted action is usually a scene. A scene defines what is said as well as the expression on the character's face when it is said. Scenes are defined in individual .vcd files, which can be found packaged in the <code>.gcf</code> located in <code>root\tf\scenes\player\</code>.
  
 
=== Sounds ===
 
=== Sounds ===
There is one further level of abstraction between the response rule scripts and the actual sound spoken by the character. Scene files refer to a specific speech event, such as "Demoman.AutoCappedControlPoint03". These events are defined in ''root\tf\scripts\game_sounds_vo.txt'' and they refer to actual .wav files packaged in the .gcf (such as, for instance, demoman_autocappedcontrolpoint03.wav). The wave files are located in ''root\tf\sound\vo'' and ''root\tf\sound\vo\taunts''.
+
There is one further level of abstraction between the response rule scripts and the actual sound spoken by the character. Scene files refer to a specific speech event, such as "<code>Demoman.AutoCappedControlPoint03</code>". These events are defined in <code>root\tf\scripts\game_sounds_vo.txt</code> and they refer to actual <code>.wav</code> files packaged in the <code>.gcf</code> (such as, for instance, <code>demoman_autocappedcontrolpoint03.wav</code>). The wave files are located in <code>root\tf\sound\vo</code> and <code>root\tf\sound\vo\taunts</code>.
  
In general, there is a direct mapping between the name of the scene (.vcd) file referred to in the response rules scripts and the name of the wave (.wav) file spoken by the character.
+
In general, there is a direct mapping between the name of the scene (<code>.vcd</code>) file referred to in the response rules scripts and the name of the wave (<code>.wav</code>) file spoken by the character.
  
 
== See also ==
 
== See also ==

Revision as of 07:54, 12 February 2011

Responses are a feature similar to voice commands, where your character may deliver a line of speech when a response rule is met. The difference is that while a taunt can be initiated with the press of a button by the player, these speech lines only play in reaction to the player completing a specific task, such as taking Intelligence, killing several opponents in a row, breaking an Engineer's buildings, participating in a duel, or killing an opponent with a specific weapon. Even when these rules are met, some of the speech files play only very rarely. Some response rules are common to all classes, while others may be specific to that class.

The Administrator also possesses responses that play when certain conditions are met, some of which occur 100% of the time (such as "You've failed!" on a match loss).

Class responses

Response rule scripts

Accessing

The scripts which control the responses are packaged inside the main TF2 .gcf content file. This file can be inspected with a tool such as GCFScape. The content file itself is located in the Steam\steamapps directory and is named "team fortress 2 content.gcf". Once you've got the content file open, the response rule scripts are located in root\tf\scripts\talker.

File contents

The main script file is response_rules.txt. This file contains a description of the script language used by the responses, as well as definitions for most of the criteria used in the scripts. Additionally, there is one script file for each class. These files contain most of the class specific response rules and voice commands. Finally, tf.txt contains taunt rules for each class, as well as a few miscellaneous class-specific rules (such as rules to cause the Heavy to emote after firing his Minigun for a while).

Scenes

The result of a scripted action is usually a scene. A scene defines what is said as well as the expression on the character's face when it is said. Scenes are defined in individual .vcd files, which can be found packaged in the .gcf located in root\tf\scenes\player\.

Sounds

There is one further level of abstraction between the response rule scripts and the actual sound spoken by the character. Scene files refer to a specific speech event, such as "Demoman.AutoCappedControlPoint03". These events are defined in root\tf\scripts\game_sounds_vo.txt and they refer to actual .wav files packaged in the .gcf (such as, for instance, demoman_autocappedcontrolpoint03.wav). The wave files are located in root\tf\sound\vo and root\tf\sound\vo\taunts.

In general, there is a direct mapping between the name of the scene (.vcd) file referred to in the response rules scripts and the name of the wave (.wav) file spoken by the character.

See also