Difference between revisions of "Template:KV BaseNPC"

From Valve Developer Community
Jump to: navigation, search
m (sorted for importance)
m (added some links to keep everything consistent)
Line 4: Line 4:
 
; Squad Name <code><[[string]]></code>
 
; Squad Name <code><[[string]]></code>
 
: 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.
 
: 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.
; Hint Group <code><string></code>
+
; Hint Group <code><[[string]]></code>
 
: [[Hintgroup|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.
 
: [[Hintgroup|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 <code><[[bool]]></code>
 
; Hint Limit Nav <code><[[bool]]></code>
Line 16: Line 16:
 
:* {{EP1 add|4: Auto PVS}}
 
:* {{EP1 add|4: Auto PVS}}
 
:* {{EP1 add|5: Auto PVS after PVS}}
 
:* {{EP1 add|5: Auto PVS after PVS}}
; Wake Radius <code><float></code>
+
; Wake Radius <code><[[float]]></code>
 
: Auto-wake if player within this distance
 
: Auto-wake if player within this distance
; Wake Squad <code><bool></code>
+
; Wake Squad <code><[[bool]]></code>
 
: Wake all of the NPCs squadmates if the NPC is woken
 
: Wake all of the NPCs squadmates if the NPC is woken
 
; Enemy Filter <code><[[targetname]]></code>
 
; Enemy Filter <code><[[targetname]]></code>
 
: [[Filter]] entity to test targets against
 
: [[Filter]] entity to test targets against
; Ignore unseen enemies <code><bool></code>
+
; Ignore unseen enemies <code><[[bool]]></code>
; Physics Impact Damage Scale <code><float></code>
+
; Physics Impact Damage Scale <code><[[float]]></code>
 
: 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.
 
: 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.
 
{{KV DamageFilter}}
 
{{KV DamageFilter}}

Revision as of 13:51, 30 May 2011

BaseNPC:

Target Path Corner <targetname>
The path_corner that this NPC will move to after spawning.
Squad Name <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 <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 <bool>
Limits NPC to using specified hint group for navigation requests, but does not limit local navigation.
Sleep State <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 (New with Half-Life 2: Episode One / Source 2006)
  • 5: Auto PVS after PVS (New with Half-Life 2: Episode One / Source 2006)
Wake Radius <float>
Auto-wake if player within this distance
Wake Squad <bool>
Wake all of the NPCs squadmates if the NPC is woken
Enemy Filter <targetname>
Filter entity to test targets against
Ignore unseen enemies <bool>
Physics Impact Damage Scale <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.

DamageFilter:

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

ResponseContext:

Response Contexts (ResponseContext) <string>
Pre-defined response system context{s} for this entity. Format is key:value,key:value,... When this entity speaks, the list of keys & values will be passed to the response rules system.

Shadow:

Disable shadows (disableshadows) <boolean>
Prevent the entity from creating cheap render-to-texture shadows. Does not affect shadow mapping.
Disable ShadowDepth (disableshadowdepth) <boolean> (New with Portal 2)
Used to disable rendering into shadow depth (for projected textures) for this entity.
Projected Texture Cache (shadowdepthnocache) <choices> (New with Portal 2)
Used to hint projected texture system whether it is sufficient to cache shadow volume of this entity or to force render it every frame instead.
  • 0 : Default
  • 1 : No cache - render every frame
  • 2 : Cache it - render only once
Disable flashlight (disableflashlight) <boolean> (New with Portal 2)
Used to disable projected texture lighting and shadows on this entity.

RenderFields:

Render Mode (rendermode) <choices>
Set a non-standard rendering mode on this entity.
Render FX / Transparency (0 - 255) (renderamt) <integer>
Transparency amount, requires a Render Mode other than Normal. 0 is invisible, 255 is fully visible.
Render Color (R G B) (rendercolor) <color255>
Color tint.
Disable Receiving Shadows (disablereceiveshadows) <boolean>
Prevent the entity from receiving shadows on itself.

RenderFXChoices:

Render FX (renderfx) <choices>
Preset pattern of appearance effects.
To do: 18-21, 25

Angles:

Pitch Yaw Roll (Y Z X) <angle>
This entity's orientation in the world. Pitch is rotation around the Y axis, yaw is the rotation around the Z axis, roll is the rotation around the X axis.

Targetname:

Name <string>
The targetname that other entities refer to this entity by.
Entity Scripts <scriptlist> (New with Left 4 Dead 2)
Space delimited list of VScript files (without file extension) that are executed after all entities have spawned. The scripts are all executed in the same script scope, later ones overwriting any identical variables and functions.
Script think function <string> (New with Left 4 Dead 2)
Name of a function in this entity's script which will be called automatically every 100 milliseconds (ten times a second) for the duration of the script. It can be used to create timers or to simulate autonomous behavior. The return value (if present) will set the time until the next call.
Note:Try to avoid expensive operations in this function, as it may cause performance problems.