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
Name | Value | Brief Description | NW_FLAG_AMBIENT_ANIMATIONS | 0x00080000 | This 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_AVIAN | 0x00800000 | Causes the NPC to play avian ambient animations. | NW_FLAG_APPEAR_SPAWN_IN_ANIMATION | 0x01000000 | Causes a spawn in animation to occur when the NPC spawns in. | NW_FLAG_ATTACK_EVENT | 0x00000400 | Used to fire OnUserDefined event signal 1005. | NW_FLAG_DAMAGED_EVENT | 0x00000800 | Used to fire OnUserDefined event signal 1006. | NW_FLAG_DAY_NIGHT_POSTING | 0x00400000 | Causes 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_EVENT | 0x00020000 | Used to fire OnUserDefined event signal 1007. Considered unreliable by Bioware. Please see the OnUserDefined event description for more information. | NW_FLAG_DISTURBED_EVENT | 0x00002000 | Used to fire OnUserDefined event signal 1008. | NW_FLAG_END_COMBAT_ROUND_EVENT | 0x00004000 | Used to fire OnUserDefined event signal 1003. | NW_FLAG_ESCAPE_LEAVE | 0x00000040 | Flee to a waypoint and do not return. | NW_FLAG_ESCAPE_RETURN | 0x00000020 | Causes the creature to flee to a waypoint and return a short time later. | NW_FLAG_FAST_BUFF_ENEMY | 0x04000000 | This 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_EVENT | 0x00100000 | Used to fire OnUserDefined event signal 1001. | NW_FLAG_IMMOBILE_AMBIENT_ANIMATIONS | 0x00200000 | 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_EVENT | 0x00008000 | Used to fire OnUserDefined event signal 1004. | NW_FLAG_PERCIEVE_EVENT | 0x00000200 | Used to fire OnUserDefined event signal 1002. | NW_FLAG_RESTED_EVENT | 0x00010000 | Used to fire OnUserDefined event signal (UNKNOWN). | NW_FLAG_SEARCH | 0x00000008 | If the creature has search, it goes into search mode. | NW_FLAG_SET_WARNINGS | 0x00000010 | UNKNOWN | NW_FLAG_SHOUT_ATTACK_MY_TARGET | 0x00000002 | Sets the listening pattern on the NPC to attack when allies call. | NW_FLAG_SLEEPING_AT_NIGHT | 0x02000000 | Determines 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_CONVERSATION | 0x00040000 | This 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_CONVERSATION | 0x00000001 | This 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_EVENT | 0x00001000 | Used to fire OnUserDefined event signal 1011. | NW_FLAG_STEALTH | 0x00000004 | If the NPC has stealth and they are a rogue, they go into stealth mode. | NW_FLAG_TELEPORT_LEAVE | 0x00000100 | Teleport to safety and do not return. | NW_FLAG_TELEPORT_RETURN | 0x00000080 | Teleport to safety and return a short time later. | sSpawnCondVarname | NW_GENERIC_MASTER | This is the name of the local variable that holds the spawn-in conditions. |
---|
Functions
Name | Brief Description |
---|---|
GetSpawnInCondition | Determines 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. |
SetListeningPatterns | Prepares the listening patterns to allow for the AI to function properly. |
SetSpawnInCondition | Sets custom flags that influence the default AI scripts provided by BioWare. |
SetSpawnInLocals | Sets local variables on creatures to support the SetSpawnInCondition function. |
author: Mistress, contributor: Kookoo