5
NPC Behaviour Variables
Jaysyn904 edited this page 2022-12-30 00:36:44 -05:00

CREATURE_VAR_HERBIVORE

Sets a creature to use the Herbivore special AI.

CREATURE_VAR_OMNIVORE

Sets a creature to use the Omnivore special AI.

X2_SPELL_RANDOM

Setting this variable on a spellcaster creature will make its spell use a bit more random, but their spell selection may not always be appropriate to the situation anymore.

X2_L_SPAWN_USE_STEALTH

Set to 1 to make the creature activate stealth mode after spawn

Set to 1 to make the creature activate detectmode after spawn

X2_L_SPAWN_USE_AMBIENT

Set to 1 to make the creature play mobile ambient animations after spawn

X2_L_SPAWN_USE_AMBIENT_IMMOBILE

Set to 1 to make the creature play immobile ambient animations after spawn

X1_L_IMMUNE_TO_DISPEL

Set to 1 to make the creature immune to dispel magic (used for statues)

# X2_L_IS_INCORPOREAL

Set this variable to 1 on a creature to make it walk through other creatures

## X2_L_NUMBER_OF_ATTACKS

Set this variable to 1-6 to override the number of attacks a creature has based on its BAB

X2_L_BEH_MAGIC

The value of this variable (int) is added to the chance that a creature will use magic in combat. Set to 100 for always, 0 for never

X2_L_BEH_OFFENSE

The higher value of this variable, the higher the chance that the creature will use offensive abilities in combat. Set to 0 to make them flee.

X2_L_BEH_COMPASSION

The higher value of this variable, the higher the chance that the creature will aid friendly creatures in combat. Not that helping usually degrades the overall difficulty of an encounter, but makes it more interesting.

X2_S_PM_SPECIAL_ITEM

This allows you to script items that enhance a palemaster's summoned creatures. You needto put the name of a script into this variable that will be run on any creature called by the pale master's summon undead ability. You can use this script to add effects to the creature. You can use the OnEquip/OnUnEquip event hooks set this variable.

X2_SPECIAL_COMBAT_AI_SCRIPT

Runs the named AI script.