User:GrampaSwood/ResponseRules
![]() | A todo list has been written for this article. The specific instructions are:
|
![]() | This topic is covered better by other wikis or sites. Please see the following links instead: |
Response rules, also known as the Response System, is a feature in Team Fortress 2 which is responsible for triggering voice lines based on a specific situation in the game world. Response rules consist, as the name suggests, of a Response and a Rule. The "Rule" consists of a criteria, and the accompanying "response". The "Response" consists of one or more scenes, which contain the facial expressions and voice lines. In addition to the situationally-triggered responses, the response system is also responsible for voice commands.
The response rules criteria, as well as the class-specific files, are in tf2_misc_dir.vpk
in scripts/talker
.
Contents
Rule
Rules consist of one or more criteria and a response. An example of a rule:
rule PyroTauntPlayerPrimary { criteria ConceptPlayerTaunt IsPyro WeaponIsFlamethrower response PyroTauntPrimary }
This rule is used for the Flame Thrower taunt for the Pyro. It checks if the player is taunting, if the player is a Pyro, and if the weapon is of the tf_weapon_flamethrower
type. If all of these are true, then the response PyroTauntPrimary
is triggered.
Criteria
Criteria are stored in response_rules.txt
and each individual class file. Criteria exist for a wide variety of situations, such as:
- Playing/not playing as a certain class
- Aiming at a certain class
- Aiming at an enemy or aiming at a teammate
- Killing a certain class
- Killing any class except a specific one
- Killing a certain amount of players in a short time
- Holding/not holding a specific weapon or weapon type (e.g. holding the Eyelander or holding a weapon of the
tf_weapon_sword
type) - Wearing specific cosmetic items (such as the bird heads)
- Accepting or rejecting a duel
- Dueling a specific class
- Various Mann vs. Machine events:
- Killing a Giant or the bomb carrier
- Losing or winning a wave
- Giant picks up a bomb
- Teammate dying
- The bomb carrier upgrades its level