Talk:NPC Sensing
Jump to navigation
Jump to search
I sincerely hope this is an appropriate place to ask a torrent of questions about NPC AI Sensing.
So far I've figured out that two of the key concepts for spatialised NPC senses are PVS and LOS:
- PVS Perceived Visleaf Set ;-) - the group of NPC-visible visleafs used as an NPC's Zone of Awareness
- LOS Line of Sight - the NPC's directional and 'blinkered' Cone of Awareness.
However I'm still struggling to understand what almost all of these BaseNPC entity 'object property' settings actually mean / do. So far my attempts at empirical testing of AI behaviours have been entirely inconclusive!
BaseNPC properties stimulated by PVS?
- BaseNPC Flag : 256 : "Long Visibility/Shoot" : 0
- as opposed to what normal behaviour ?
- BaseNPC Flag : 1024 : "Think outside PVS" : 0
- "Thinking outside the PVS" means that it tests all entities in the map (or possibly a given radius) --TomEdwards
- BaseNPC Output : "OnHearWorld" "" : Fired when this NPC hears a sound (other than combat or the player).
- BaseNPC Output : "OnHearPlayer" "" : Fired when this NPC hears the player.
- BaseNPC Output : "OnHearCombat" "" : Fired when this NPC hears combat sounds.
- if when this NPC hears means within earshot = within PVS ? or calculated from (loudness/distance)/NPC_deafness ?
- what exactly are player sounds, combat sounds and especially a sound (other than combat or the player) ?
- ai_sound : This entity makes abstract sounds or smells that can be sensed by NPCs, but not by the player. This can be used to cause reactions in nearby NPCs.
- does this come in here or is it part of the Response System?
SleepState
Sleep State Holds the NPC in stasis until specified condition. See also 'Wake Radius' and 'Wake Squad'.
- this would seem to be a list of triggers for an undocumented NPC_State ?
- BaseNPC Keyvalue : "sleepstate" "0" : None (default).
- what is normal behaviour if not "Waiting for PVS" stimulus?
- BaseNPC Keyvalue : "sleepstate" "1" : Waiting for threat.
- what exactly is a threat ? enemy or grenade within PVS ?
- BaseNPC Keyvalue : "sleepstate" "2" : Waiting for PVS.
- BaseNPC Keyvalue : "sleepstate" "3" : Waiting for input, ignore PVS.
- similar to "Wait For Script" flag I guess ?
- BaseNPC Keyvalue : "sleepstate" "4" : Auto PVS.
- what on earth is Auto PVS ?
- BaseNPC Keyvalue : "sleepstate" "5" : Auto PVS after PVS.
- what ... ?
- BaseNPC Keyvalue :"wakeradius" "<float>" : Auto-wake if player within this distance.
- I assume this would override the sleepstate/PVS then, ignoring PVS stimuli?
- BaseNPC Flag : 1 : "Wait Till Seen" : 0
- I assume this overrides sleepstate/PVS, using LOS instead of PVS? (LOS is reciprocal?)
- BaseNPC pseudo Input via : "wakesquad" from another NPC if this NPC is assigned to the same "squadname".
SleepState generic I/Os
- BaseNPC Input : "Wake" "" : Wakes up the NPC if it is sleeping.
- BaseNPC Output : "OnSleep" "" : Fired when this NPC enters a sleep state.
- BaseNPC Output : "OnWake" "" : Fired when this NPC comes out of a sleep state.
BaseNPC properties stimulated by LOS ?
- BaseNPC Output : "OnFoundEnemy" & "OnFoundPlayer" : Fired when this NPC establishes line of sight to its Enemy/Player. Sends "<enemyname>" as a parameter.
- BaseNPC Output : "OnLostEnemyLOS" & "OnLostPlayerLOS" : Fired when this NPC loses line of sight to its Enemy/Player.
- BaseNPC Output : "OnLostEnemy" & "OnLostPlayer" : Fired when this NPC loses its Enemy/Player. Usually due to the enemy being killed/removed, or because this NPC has selected a newer, more dangerous enemy.
- killed I understand, removed I guess refers to targetname inputs (Kill & KillHierarchy), but how does an NPC decide to select a new, more dangerous enemy?
- what happens if the enemy simply moves out of the NPC's PVS ?