From Valve Developer Community
Revision as of 02:18, 20 January 2009 by VDCBot (Robot: fixing template case.)
The downtrodden citizens of City 17.
- For code see
- ai_citizen_debug_commander (Default: 1)
- g_ai_citizen_show_enemy (Default: 0)
- npc_citizen_auto_player_squad (Default: 1)
- npc_citizen_auto_player_squad_allow_use (Default: 0)
- npc_citizen_explosive_resist (Default: 0)
- npc_citizen_insignia (Default: 0)
- npc_citizen_squad_marker (Default: 0)
- sk_citizen_giveammo_player_delay (Default: 10.0)
- <float> The amount of time between ammo assistances.
- sk_citizen_heal_ally (Default: 30)
- sk_citizen_heal_ally_delay (Default: 20.0)
- <float> The amount of time between medical assistances.
- sk_citizen_heal_player (Default: 35)
- sk_citizen_heal_player_delay (Default: 25.0)
- <float> The amount of time between medical assistances.
- sk_citizen_heal_player_min_forced (Default: 10)
- sk_citizen_heal_player_min_pct (Default: 0.60)
- sk_citizen_health (Default: 40)
- <integer> A citizen's spawn health.
- sk_citizen_player_stare_dist (Default: 72.0)
- sk_citizen_player_stare_time (Default: 1.0)
- sk_citizen_stare_heal_time (Default: 5.0)
- Always transition
- This NPC will always teleport to a Player Squad Transition Point if they're not within the trigger_transition.
- Prevent picking up weapons?
- This NPC will NOT be allowed to pick up weapons they find on the ground.
- Is this a vital ally?
- This NPC will cause the game to end if killed.
- <choices> Weapons - Allows any weapon
- Pick one that is made to function for NPCs
Literal Value Description weapon_smg1 SMG1 weapon_ar2 AR2 weapon_stunstick Stun Stick weapon_crowbar Crow Bar weapon_shotgun Shotgun weapon_beerbottle Beer bottle (Not coded - Don't use) weapon_beerbottle2 Beer bottle2 (Not coded - Don't use) weapon_rpg RPG 0 Nothing
- Ammo To Resupply
- <choices> Ammo to Resupply (if spawnflag set)
Literal Value Description Pistol Pistol SMG1 SMG1 SMG1_Grenade SMG1 Grenade AR2 AR2 Buckshot Shotgun RPG_Round RPG Grenade Grenade XBowBolt Crossbow Bolt
- Amount Of Ammo To Give
- <integer> This is the amount of ammo the NPC has, to give to the player
Literal Value Description Outfit 0 Default The normal blue civil outfit. This is the same as Downtrodden, but with default for the basic entity. 1 Downtrodden The normal blue civil outfit. 2 Refugee A somewhat torn civil outfit, either blue or white. (See model entry below.) 3 Rebel The rebel outfit. 4 Unique The normal blue civil outfit. This can be used if you edit a Citizen to look different, or to be an enemy of a sort.
- This variable affects the model used in-game. See Model entry below.
- Expression Type
Literal Value Description 0 Random 1 Scared 2 Normal 3 Angry
Literal Value Description Details models/humans/group01/male_01.mdl Male 1 Van. Black wearing a blue suit. models/humans/group01/male_02.mdl Male 2 Ted. Caucasian wearing a white jacket. models/humans/group01/male_03.mdl Male 3 Joe. Black wearing a blue suit. models/humans/group01/male_07.mdl Male 4 Mike. Caucasian wearing a blue suit. models/humans/group01/male_08.mdl Male 5 Vance. Caucasian wearing a white jacket. Old. models/humans/group01/male_09.mdl Male 6 Erdim. Caucasian wearing a blue suit. models/humans/group01/female_01.mdl Female 1 Joey. Caucasian wearing a blue suit. models/humans/group01/female_02.mdl Female 2 Kanisha. Caucasian wearing a white jacket. models/humans/group01/female_03.mdl Female 3 Kim. Black wearing a blue suit. Has a red scarf in-game - cyan if she's a medic. models/humans/group01/female_04.mdl Female 4 Chau. Asian wearing a white jacket. models/humans/group01/female_06.mdl Female 5 Naomi. Caucasian wearing a blue suit. models/humans/group01/female_07.mdl Female 6 Lakeetra. Black wearing a white jacket. models/humans/group01/male_cheaple.mdl Cheaple Male 1 Low-detail caucasian wearing a blue suit. Only works if Type is set to Default or Downtrodden. (Otherwise you will just get the "ERROR" model.) models/odessa.mdl Odessa. DO NOT USE. Colonel Cubbage. Only works if Type is set to Unique. (Otherwise you will just get "ERROR" in-game.)
- If citizentype is set to 1 (Downtrodden), these are the models used. Other values cause the equivalent models from models/humans/group02/ (for 2 - Refugee) and models/humans/group03/ (for 3 - Rebel) to be used. The clothing changes appear only in-game, and not in Hammer.
- Clothing descriptions apply for group02 only.
- If the Medic flag is set and the citizentype (Type) is set to 3 (Rebel), the equivalent models from models/humans/group03m/ are used.
- If you set model to something else than the default model value ( eg. Male 02), to something like (models/alyx.mdl) and disable random faces in flags, you can override the model inside the game. Note: you might need to set type to unique.
- Expression Override
- <string> Facial expression override
- Fire Output When Nav Is Blocked?
- <boolean> Set keyvalue to either Yes or No
- Permanent Squad Member?
- <boolean> A permanent squad member cannot leave the player's squad unless killed or explicity removed by entity I/O. Only use this if you're sure you want to override the default AI.
- Deny Command Speech Concept
- <string> If you want your citizens to squad with the player but not obey commands the player gives to move the squad, put a concept here and this citizen will speak the concept instead of obeying the order.
- 65536 : Follow player on spawn
- 131072 : Medic
- 262144 : Random Head
- 524288 : Ammo Resupplier
- 1048576 : Not Commandable
- 2097152 : Don't use speech semaphore. Obsolete
- 4194304 : Random male head
- 8388608 : Random female head
- 16777216 : Use RenderBox in ActBusies.
- This makes the collision hull surround the model rather than using the human hull. It's more computationally expensive, but necessary when ActBusies involve close proximity to other props/geometry or animate the citizens in a more dynamic way.
SetRelationship <string|targetname or classname> <string|disposition> <int|rank>
- Changes whether this NPC likes or dislikes certain others. Used like the ai_relationship entity, with this NPC as the subject.
- Values for
- Set the NPC's health.
- Add to or remove from the NPC's health.
- HACK: Sets this NPC's body group (from 0 - n).
- Scales the damage taken when this character is hit by a physics object. 0 means this feature is disabled for backwards compatibility.
- Burst into flames.
- Ignite for the given number of seconds.
- Ignite with the given number of hitbox fires.
- Ignite with the given hitbox fire scale.
- Smash into pieces. If this is not possible, disappear.
- Remove itself and instantly become a ragdoll with zero force (just go limp). OnDeath, etc. Outputs will NOT be fired.
- Enter/exit scripting state, where NPCs ignore a variety of stimulus that would make them break out of their scripts. They ignore danger sounds, ignore +USE, don't idle speak or respond to other NPC's idle speech, and so on.
- Start an assault at the given rally point.
- Change the name of this NPC's squad. Leaving the parameter blank will remove the NPC from any existing squad.
- Wakes up the NPC if it is sleeping.
- Clears out the NPC's knowledge of a named entity.
- Gagged NPCs won't speak (or moan, caw, etc.) unless made to be a choreographed scene.
- Ignore danger sounds for the specified number of seconds.
- Force the NPC to holster or unholster their weapon. Ignored if the NPC is scripting or if the NPC doesn't use weapons.
- Same as
HolsterWeapon, except the weapon is destroyed once it has been concealed.
ForceInteractionWithNPC <string> <string>
- Force the NPC to use a dynamic interaction with another NPC. Syntax is
<targetname> <dynamic interaction>
- Update (or create) this NPC's memory of of the given entity.
- Sets the maximum look distance for the NPC. Defaults are 2048 and 6000 for long range NPCs.
- Sets the entity's transparency to a number from 0 (invisible) to 255 (fully visible). Requires the entity to have its Render Mode (rendermode) set to a number other than
- Sets an RGB color for the entity.
- Removes this entity from the world.
- Removes this entity and its children from the world. Note:Entities already remove orphaned children upon being removed, but this input removes all children on the same frame, being marginally faster than
- Adds a keyvalue/output to this entity. It can be potentially very dangerous, use with care.
<output name> <targetname>:<inputname>:<parameter>:<delay>:<max times to fire, -1 means infinite>
- Fire the
OnUseroutputs; see User Inputs and Outputs.
- Same as a player invoking +use; may not do anything depending on the entity. Can also be invoked by firing an output that does not specify an input.
- Execute a VScript file from disk, without file extension. The script contents are merged with the script scope of the receiving entity.
- Execute a string of VScript source code in the scope of the entity receiving the input. String quotation may be needed when fired via console. Bug: In , the code is executed in the script scope of the entity that fires the output, not the one receiving the input.Warning: Never try to pass string parameters to a script function with this input. It will corrupt the VMF structure because of the nested quotation marks, which then must be removed manually with a text editor.
- Execute a VScript function in the scope of the receiving entity.
- Send this entity to a spot in the map. If the entity is parented to something, it will be offset from the parent by this amount.
- Set this entity's angles.
- Use this input to teleport the NPC to a hint node with the "Player Squad Transition Point" hint type.
- If enabled, this NPC will always teleport to a Player Squad Transition Point even if they're not within the
- Determines whether the game should end if this character dies.
- Enables/disables weapon pickup.
- Gives the NPC a weapon immediately.
- Clears every output that this NPC has.
- SetExpressionOverride <string>
- Set facial expression override
- Patrol whenever I'm idle or alert.
- Stop patrolling when I'm idle or alert.
- Make a previously uncommandable citizen commandable
- Set the medic flag on. Will not change the model or skin of the citizen.
- Set the medic flag off. Will not change the model or skin of the citizen.
- Set the ammo-resupplier flag on. Will not change the model or skin of the citizen.
- Set the ammo-resupplier flag off. Will not change the model or skin of the citizen.
- Set readiness to calmest state (Bored)
- Set readiness to moderate (Alert)
- Set readiness to highest. (Combat imminent)
- LockReadiness <float>
- Lock readiness at current setting for x seconds -1 = forever, 0 = unlock now
- GiveWeapon <classname>
- Gives the NPC the specified weapon - excluded from FGD
- Forces the NPC to speak an idle response - excluded from FGD
- Remove from player squad, instantly.
- Set readiness to panic state (Special)
- Fires when joins player squad
- Fires when leaves player squad (doesn't include death or deletion)
- Fires when ordered to follow player
- Fires when ordered to a location by player
- Fires when a player +USEs the citizen. Template:Plact
- Fires when this Citizen's movement fails because he/she is blocked by a dynamic object.