Response rules scripts
From TF2 Wiki
Contents |
Accessing response rule scripts
The scripts which control the response rules 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 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.
Script file contents
The main script file is response_rules.txt. This file contains a description of the script language used by the response rules, 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 in root\tf\scenes\player\<class>.
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.
