x0_i0_spawncond

This library separates out the spawn-in conditions from nw_i0_generic for improved clarity. This cannot be dual-#included with nw_i0_generic.

NOTE: This file includes x0_i0_combat.

Constants

NameValueBrief Description
NW_FLAG_AMBIENT_ANIMATIONS0x00080000This will cause the NPC to play ambient animations until the NPC sees an enemy or is cleared. These animations will play automatically for encounter creatures.
NW_FLAG_AMBIENT_ANIMATIONS_AVIAN0x00800000Causes the NPC to play avian ambient animations.
NW_FLAG_APPEAR_SPAWN_IN_ANIMATION0x01000000Causes a spawn in animation to occur when the NPC spawns in.
NW_FLAG_ATTACK_EVENT0x00000400Used to fire OnUserDefined event signal 1005.
NW_FLAG_DAMAGED_EVENT0x00000800Used to fire OnUserDefined event signal 1006.
NW_FLAG_DAY_NIGHT_POSTING0x00400000Causes the NPC to act appropriately for the time of the day. SetSpawnInCondition(NW_FLAG_SLEEPING_AT_NIGHT) to cause the NPC to sleep at night (40% chance) and walk a set of waypoints during the day.
NW_FLAG_DEATH_EVENT0x00020000Used to fire OnUserDefined event signal 1007. Considered unreliable by Bioware. Please see the OnUserDefined event description for more information.
NW_FLAG_DISTURBED_EVENT0x00002000Used to fire OnUserDefined event signal 1008.
NW_FLAG_END_COMBAT_ROUND_EVENT0x00004000Used to fire OnUserDefined event signal 1003.
NW_FLAG_ESCAPE_LEAVE0x00000040Flee to a waypoint and do not return.
NW_FLAG_ESCAPE_RETURN0x00000020Causes the creature to flee to a waypoint and return a short time later.
NW_FLAG_FAST_BUFF_ENEMY0x04000000This means that the creature will cast all the buff spells (summons, stat and armor improvements etc) instantaneously in preperation for combat. Note: If TalentAdvancedBuff(40.0) returns TRUE, this flag is automatically disabled.
NW_FLAG_HEARTBEAT_EVENT0x00100000Used to fire OnUserDefined event signal 1001.
NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS0x00200000 This will cause the NPC to play immobile ambient animations until the NPC sees an enemy or is cleared. These animations will play automatically for encounter creatures.
NW_FLAG_ON_DIALOGUE_EVENT0x00008000Used to fire OnUserDefined event signal 1004.
NW_FLAG_PERCIEVE_EVENT0x00000200Used to fire OnUserDefined event signal 1002.
NW_FLAG_RESTED_EVENT0x00010000Used to fire OnUserDefined event signal (UNKNOWN).
NW_FLAG_SEARCH0x00000008If the creature has search, it goes into search mode.
NW_FLAG_SET_WARNINGS0x00000010UNKNOWN
NW_FLAG_SHOUT_ATTACK_MY_TARGET0x00000002Sets the listening pattern on the NPC to attack when allies call.
NW_FLAG_SLEEPING_AT_NIGHT0x02000000Determines if the NPC sleeps at night. Use in conjuction with SetSpawnInCondition(NW_FLAG_DAY_NIGHT_POSTING) to cause the NPC to sleep at night (40% chance) or walk a set of waypoints during the day.
NW_FLAG_SPECIAL_COMBAT_CONVERSATION0x00040000This causes the NPC to say a special greeting in their conversation file upon perceiving the player (OnPerception event). Attach the [NW_D2_GenCheck.nss] script to the desired greeting in order to designate it. As the NPC is actually saying this to himself, don't attach any player responses to the greeting.
NW_FLAG_SPECIAL_CONVERSATION0x00000001This causes the NPC to say a special greeting in their conversation file upon perceiving the player (OnPerception event). Attach the [NW_D2_GenCheck.nss] script to the desired greeting in order to designate it. As the NPC is actually saying this to himself, don't attach any player responses to the greeting.
NW_FLAG_SPELL_CAST_AT_EVENT0x00001000Used to fire OnUserDefined event signal 1011.
NW_FLAG_STEALTH0x00000004If the NPC has stealth and they are a rogue, they go into stealth mode.
NW_FLAG_TELEPORT_LEAVE0x00000100Teleport to safety and do not return.
NW_FLAG_TELEPORT_RETURN0x00000080Teleport to safety and return a short time later.
sSpawnCondVarnameNW_GENERIC_MASTERThis is the name of the local variable that holds the spawn-in conditions.

Functions

NameBrief Description
GetSpawnInConditionDetermines whether a creature has a certain condition set by BioWare's core AI system. Returns TRUE if the specified condition has been set on the caller, otherwise FALSE.
SetListeningPatternsPrepares the listening patterns to allow for the AI to function properly.
SetSpawnInConditionSets custom flags that influence the default AI scripts provided by BioWare.
SetSpawnInLocalsSets local variables on creatures to support the SetSpawnInCondition function.


  author: Mistress, contributor: Kookoo