Template:KV BaseNPC: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
m (ep1 add)
mNo edit summary
 
(35 intermediate revisions by 16 users not shown)
Line 1: Line 1:
{{kv targetname}}
<noinclude>{{lang|Template:KV BaseNPC}}[[Category:Keyvalue Templates|BaseNPC]]
* {{kv angles}}
</noinclude>{{expand|title=BaseNPC keyvalues|
* {{kv renderfields}}
{{KV BaseCombatCharacter}}
* '''disablereceiveshadows'''
{{minititle|CAI_BaseNPC}}
: {{boolean}} Disable Recieving Shadows
{{KV|Target Path Corner|intn=target|targetname|The {{ent|path_corner}} that this NPC will move to after spawning.}}
* {{kv damagefilter}}
{{KV|Squad Name|intn=squadname|string|NPCs that are in the same [[squads|squad]] (i.e., have matching squad names) will share information about enemies and will take turns attacking and covering each other.}}
* {{kv responsecontext}}
{{KV|Hint Group|intn=hintgroup|string|[[Hint Nodes#Hint Group|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 shadow}}
{{KV|Hint Limit Nav|intn=hintlimiting|bool|Limits NPC to using specified hint group for navigation requests. Does not limit local navigation.}}
 
{{KV|Sleep State|intn=sleepstate|choices|Holds the NPC in stasis until specified condition. See also <tt>Wake Radius</tt> and <tt>Wake Squad</tt>.
* '''target'''
:* 0: None
: <target_destination> If set, the name of a path corner entity that this NPC will walk to, after spawning.
:* 1: Waiting for threat
 
:* 2: Waiting for PVS
* '''squadname'''
:* 3: Waiting for input, ignore PVS
: <string> NPCs that are in the same squad (i.e. have matching squad names) will share information about enemies, and will take turns attacking and covering each other.
:* 4: Auto PVS
 
:* 5: Auto PVS after PVS}}
* '''hintgroup'''
{{KV|Wake Radius|intn=wakeradius|float|Auto-wake if player comes within this distance.}}
: <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|Wake Squad|intn=wakesquad|bool|Wake all of the NPCs squadmates if the NPC is woken.}}
 
{{KV|Enemy Filter|intn=enemyfilter|targetname|[[Filter]] entity to test targets against.}}
* '''hintlimiting'''
{{KV|Ignore unseen enemies|intn=ignoreunseenenemies|bool|Prefers visible enemies, regardless of distance or relationship priority.}}
: {{boolean}} Limits NPC to using specified hint group for navigation requests, but does not limit local navigation.
{{KV DamageFilter}} }}
 
* '''sleepstate'''
: <choices> Holds the NPC in stasis until specified condition. See also 'Wake Radius' and 'Wake Squad'.
:{|
!Literal value!!Description
|-
| 0 || None
|-
| 1 || Waiting for threat
|-
| 2 || Waiting for PVS
|-
| 3 || Waiting for input, ignore PVS
|-
| {{ep1 add|4}} || {{ep1 add|Auto PVS}}
|-
| {{ep1 add|5}} || {{ep1 add|Auto PVS after PVS}}
|}
 
* '''wakeradius'''
: <float> Auto-wake if player within this distance
 
* '''wakesquad'''
: {{boolean}} Wake all of the NPCs squadmates if the NPC is woken
 
* '''physdamagescale'''
: <float> Scales damage energy when this character is hit by a physics object. With a value of 0 the NPC will take no damage from physics.

Latest revision as of 10:27, 25 September 2024

BaseNPC keyvalues

CBaseCombatCharacter:

Relationship (Relationship) <string> !FGD
<string|targetname or classname> <string|disposition> <int|rank>
Changes whether this entity likes or dislikes certain other things. Used like the ai_relationship entity, with this entity as the subject.
Values for disposition are:
  • D_HT: Hate
  • D_FR: Fear
  • D_LI: Like
  • D_NU: Neutral
Physics Impact Damage Scale (physdamagescale) <float>
Multiplier for damage amount when this entity is hit by a physics object. With a value of 0 the entity will take no damage from physics.

CAI_BaseNPC:

Target Path Corner (target) <targetname>
The path_corner that this NPC will move to after spawning.
Squad Name (squadname) <string>
NPCs that are in the same squad (i.e., have matching squad names) will share information about enemies and will take turns attacking and covering each other.
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.
Hint Limit Nav (hintlimiting) <boolean>
Limits NPC to using specified hint group for navigation requests. Does not limit local navigation.
Sleep State (sleepstate) <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
Wake Radius (wakeradius) <float>
Auto-wake if player comes within this distance.
Wake Squad (wakesquad) <boolean>
Wake all of the NPCs squadmates if the NPC is woken.
Enemy Filter (enemyfilter) <targetname>
Filter entity to test targets against.
Ignore unseen enemies (ignoreunseenenemies) <boolean>
Prefers visible enemies, regardless of distance or relationship priority.

DamageFilter:

Damage Filter (damagefilter) <targetname>
Name of the filter_damage_type entity that controls which entities can damage us.