Template:KV CAI BaseNPC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(added velocity's and waterlevel)
(sorted some keyvalues, added something special for optional custom additionalequipment descriptions per-npc)
Line 1: Line 1:
{{KV|Weapon Held (additionalequipment)|classname|{{{addeq|Gives the NPC a weapon. NPCs may attack oddly or not attack if they don't know how to use a particular weapon.}}}}}
{{KV|Health (health)|integer|How close to death the NPC is.}}
{{KV|Maximum Health (max_health)|integer|'''Health''' cannot exceed this amount.}}
{{KV|[[Squad]] Name (squadname)|string|NPCs that are in the same squad will share information about enemies, and will take turns attacking and covering each other.}}
{{KV|Relationship (Relationship)|string|<[[string]]&#124;[[targetname]] or [[classname]]> <[[string]]&#124;disposition> <[[int]]&#124;rank>
:Changes whether this NPC likes or dislikes certain others. Used like the {{ent|ai_relationship}} entity, with this NPC as the subject.
:Values for <code>disposition</code> are:
:*<code>D_HT</code>: Hate
:*<code>D_FR</code>: Fear
:*<code>D_LI</code>: Like
:*<code>D_NU</code>: Neutral|nofgd=1}}
{{KV|Target Path Corner (target)|target_destination|If set, the name of a {{ent|path_corner}} entity that this NPC will move to, after spawning. Must be within 576 units from the NPC.}}
{{KV|Target Path Corner (target)|target_destination|If set, the name of a {{ent|path_corner}} entity that this NPC will move to, after spawning. Must be within 576 units from the NPC.}}
{{KV|Sleep State (sleepstate)|choices|Holds the NPC in stasis until specified condition. See also '''Wake Radius''' and '''Wake Squad'''.
{{KV|Sleep State (sleepstate)|choices|Holds the NPC in stasis until specified condition. See also '''Wake Radius''' and '''Wake Squad'''.
Line 9: Line 20:
:{{todo|clarify the differences between each}}
:{{todo|clarify the differences between each}}
}}
}}
{{KV|Health (health)|integer|How close to death the NPC is.}}
{{KV|Maximum Health (max_health)|integer|'''Health''' cannot exceed this amount.}}
{{KV|Wake Radius (wakeradius)|float|Auto-wake if player is within this distance, in Hammer units.}}
{{KV|Wake Radius (wakeradius)|float|Auto-wake if player is within this distance, in Hammer units.}}
{{KV|Wake Squad (wakesquad)|bool|If yes, wake all of the NPCs squadmates if the NPC is woken.}}
{{KV|Wake Squad (wakesquad)|bool|If yes, wake all of the NPCs squadmates if the NPC is woken.}}
{{KV|Ignore unseen enemies (ignoreunseenenemies)|choices|Prefer visible enemies, regardless of distance or relationship priority.}}
{{KV|Ignore unseen enemies (ignoreunseenenemies)|choices|Prefer visible enemies, regardless of distance or relationship priority.}}
{{KV|[[Squad]] Name (squadname)|string|NPCs that are in the same squad will share information about enemies, and will take turns attacking and covering each other.}}
{{KV|Hint Group ([[hintgroup]])|string|Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC.}}
{{KV|Hint Group ([[hintgroup]])|string|Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC.}}
{{KV|Hint Limit Nav|bool|If yes, limits NPC to using specified hint group for navigation requests, but does not limit local navigation.}}
{{KV|Hint Limit Nav|bool|If yes, limits NPC to using specified hint group for navigation requests, but does not limit local navigation.}}
{{KV|Weapon Held (additionalequipment)|classname|Gives the NPC a weapon. NPCs may attack oddly or not attack if they don't know how to use a particular weapon.}}
{{KV|Enemy Filter (enemyfilter)|targetname|[[Filter]] by which to filter potential enemies.}}
{{KV|Enemy Filter (enemyfilter)|targetname|[[Filter]] by which to filter potential enemies.}}
{{KV|Relationship (Relationship)|string|<[[string]]&#124;[[targetname]] or [[classname]]> <[[string]]&#124;disposition> <[[int]]&#124;rank>
:Changes whether this NPC likes or dislikes certain others. Used like the {{ent|ai_relationship}} entity, with this NPC as the subject.
:Values for <code>disposition</code> are:
:*<code>D_HT</code>: Hate
:*<code>D_FR</code>: Fear
:*<code>D_LI</code>: Like
:*<code>D_NU</code>: Neutral|nofgd=1}}
{{KV|Physics Impact Damage Scale|float|Multiplier for damage amount when this NPC is hit by a physics object. With a value of 0 the NPC will take no damage from physics.}}
{{KV|Physics Impact Damage Scale|float|Multiplier for damage amount when this NPC is hit by a physics object. With a value of 0 the NPC will take no damage from physics.}}
{{KV|[[Velocity]] (velocity)|vector|nofgd=1}}
{{KV|[[Velocity]] (velocity)|vector|nofgd=1}}

Revision as of 22:54, 4 August 2018

Weapon Held (additionalequipment) ([todo internal name (i)]) <classname>
Gives the NPC a weapon. NPCs may attack oddly or not attack if they don't know how to use a particular weapon.
Health (health) ([todo internal name (i)]) <integer>
How close to death the NPC is.
Maximum Health (max_health) ([todo internal name (i)]) <integer>
Health cannot exceed this amount.
Squad Name (squadname) ([todo internal name (i)]) <string>
NPCs that are in the same squad will share information about enemies, and will take turns attacking and covering each other.
Relationship (Relationship) ([todo internal name (i)]) <string> !FGD
<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 disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
Target Path Corner (target) ([todo internal name (i)]) <targetname>
If set, the name of a path_corner entity that this NPC will move to, after spawning. Must be within 576 units from the NPC.
Sleep State (sleepstate) ([todo internal name (i)]) <choices>
Holds the NPC in stasis until specified condition. See also Wake Radius and Wake Squad.
  • 0: None
  • 1: Waiting for threat
  • 2: Waiting for PVS
  • 3: Waiting for input, ignore PVS
  • 4: Auto PVS
  • 5: Auto PVS after PVS
Todo: clarify the differences between each
Wake Radius (wakeradius) ([todo internal name (i)]) <float>
Auto-wake if player is within this distance, in Hammer units.
Wake Squad (wakesquad) ([todo internal name (i)]) <boolean>
If yes, wake all of the NPCs squadmates if the NPC is woken.
Ignore unseen enemies (ignoreunseenenemies) ([todo internal name (i)]) <choices>
Prefer visible enemies, regardless of distance or relationship priority.
Hint Group (hintgroup) ([todo internal name (i)]) <string>
Hint groups are used by NPCs to restrict their hint-node searching to a subset of the map's hint nodes. Only hint nodes with matching hint group names will be considered by this NPC.
Hint Limit Nav ([todo internal name (i)]) <boolean>
If yes, limits NPC to using specified hint group for navigation requests, but does not limit local navigation.
Enemy Filter (enemyfilter) ([todo internal name (i)]) <targetname>
Filter by which to filter potential enemies.
Physics Impact Damage Scale ([todo internal name (i)]) <float>
Multiplier for damage amount when this NPC is hit by a physics object. With a value of 0 the NPC will take no damage from physics.
Velocity (velocity) ([todo internal name (i)]) <vector> !FGD
Base Velocity (basevelocity) ([todo internal name (i)]) <vector> !FGD
Absolute Velocity (avelocity) ([todo internal name (i)]) <vector> !FGD
Water Level (waterlevel) ([todo internal name (i)]) <character> !FGD
Hull Type (HullType) ([todo internal name (i)]) <integer> (in all games since Alien Swarm) !FGD
Physical size of the NPC. Affects navigation capabilities and the bounding box.
  • HUMAN_HULL: Human
  • WIDE_HUMAN_HULL: Wide
  • TINY_HULL: Tiny
  • MEDIUM_HULL: Medium
  • LARGE_HULL: Large
Confirm:Works? This keyvalue is defined as using integers
Blood Color (BloodColor) ([todo internal name (i)]) <integer> (in all games since Alien Swarm) !FGD
Blood color of the NPC when shot.
Confirm:Works? This keyvalue is defined as using integers