Difference between revisions of "AI"
From Dragon Age Toolset Wiki
BryanDerksen (Talk | contribs) (split out of creature) |
BryanDerksen (Talk | contribs) (add navigational template) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | {{infobox creature}} | ||
+ | |||
See also [[Custom AI]] for a means of overriding creature AI directly on a lower level. | See also [[Custom AI]] for a means of overriding creature AI directly on a lower level. | ||
− | The core AI scripts that control what a creature does makes use of a large set of variables in the default [[var_creature.xls]] [[local variable]] table. The variables and their affects are: | + | The core AI scripts that control what a creature does makes use of a large set of variables in the default [[var_creature.xls]] [[local variable]] table. The variables and their affects are: <br clear="all"/> |
{{variable table start}} | {{variable table start}} | ||
− | {{Variable table row| | + | {{Variable table row| AI_BALLISTA_SHOOTER_STATUS | int |0| When set to AI_BALLISTA_SHOOTER_STATUS_AVAILABLE, will try to move to nearby available ballistae and fire them. Set to AI_BALLISTA_SHOOTER_STATUS_INACTIVE to disable. This variable is modified by the ai_ballista_h script to keep track of ballista-related activities while active.}} |
− | {{Variable table row| | + | {{Variable table row| AI_CUSTOM_AI_ACTIVE | int |0| Set via the CAI_SetCustomAI function (include cai_h in your script for [[custom AI]] support.) }} |
− | {{Variable table row| | + | {{Variable table row| AI_CUSTOM_AI_VAR_FLOAT | float |0| A float value that can be used by custom AI scripts for any purpose. }} |
− | {{Variable table row| | + | {{Variable table row| AI_CUSTOM_AI_VAR_INT | int |0| An int value that can be used by custom AI scripts for any purpose. }} |
− | {{Variable table row| | + | {{Variable table row| AI_CUSTOM_AI_VAR_OBJECT | object |0| An object value that can be used by custom AI scripts for any purpose}} |
− | {{Variable table row| | + | {{Variable table row| AI_CUSTOM_AI_VAR_STRING | string |none| A string value that can be used by custom AI scripts for any purpose }} |
− | {{Variable table row| | + | {{Variable table row| AI_DISABLE_PATH_BLOCKED_ACTION | int |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_FLAG_PREFERS_RANGED | int |0| If the creature prefers to use ranged combat. Should be set on-spawn for enemies and when switching weapons for followers outside of combat only}} |
− | {{Variable table row| | + | {{Variable table row| AI_FLAG_STATIONARY | int |0| if set to 1 the creature will try not to move to attack. For follower this flag is used to tell if a follower can start attacking yet}} |
− | {{Variable table row| | + | {{Variable table row| AI_HELP_TEAM_STATUS | int |0| 0, not active, 1 active, 2 currently helping, 3 called for help}} |
− | {{Variable table row| | + | {{Variable table row| AI_LAST_TACTIC | int |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_LIGHT_ACTIVE | int |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_MOVE_TIMER | int |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_PLACEABLE_BEING_USED | object|0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_REGISTERED_WP | object | 0| An AI waypoint registered by the current creature. A creature registers a waypoint by changing its tag and storing the object ID on itself. A creature un-registers a waypoint by retrieving the waypoint stored on itself and re-setting its tag}} |
− | {{Variable table row| | + | {{Variable table row| AI_TARGET_OVERRIDE | object |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_TARGET_OVERRIDE_DUR_COUNT | int |0|For how many rounds the target have been overriden, so we can limit it. }} |
− | + | {{Variable table row| AI_THREAT_GENERATE_EXTRA_THREAT| float |0| Used in custom fights to have some creatures generate this extra specified amount of threat when perceived.}} | |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_HATED_CLASS | int |0| Used by target selection AI ([[ai_threat_h]]) to weight target selection in favor of a particular class }} |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_HATED_GENDER | int |0| Used by target selection AI (ai_threat_h) to weight target selection in favor of a particular gender }} |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_HATED_RACE | int |0| Used by target selection AI (ai_threat_h) to weight target selection in favor of a particular race }} |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_SWITCH_TIMER | int |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_SWITCH_TIMER_MIN | int |0| }} |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_TARGET| object| 0 | }} |
− | {{Variable table row| | + | {{Variable table row| AI_THREAT_TARGET_SWITCH_COUNTER| int| 0 | }} |
− | {{Variable table row| | + | {{Variable table row| AI_WAIT_TIMER | int |0| }} |
{{variable table end}} | {{variable table end}} | ||
+ | |||
+ | [[Category:Creatures]] |
Latest revision as of 22:35, 2 February 2010
Creature topics: |
---|
|
See also Custom AI for a means of overriding creature AI directly on a lower level.
The core AI scripts that control what a creature does makes use of a large set of variables in the default var_creature.xls local variable table. The variables and their affects are:
Variable name | Type | Default | Description |
---|---|---|---|
AI_BALLISTA_SHOOTER_STATUS | int | 0 | When set to AI_BALLISTA_SHOOTER_STATUS_AVAILABLE, will try to move to nearby available ballistae and fire them. Set to AI_BALLISTA_SHOOTER_STATUS_INACTIVE to disable. This variable is modified by the ai_ballista_h script to keep track of ballista-related activities while active. |
AI_CUSTOM_AI_ACTIVE | int | 0 | Set via the CAI_SetCustomAI function (include cai_h in your script for custom AI support.) |
AI_CUSTOM_AI_VAR_FLOAT | float | 0 | A float value that can be used by custom AI scripts for any purpose. |
AI_CUSTOM_AI_VAR_INT | int | 0 | An int value that can be used by custom AI scripts for any purpose. |
AI_CUSTOM_AI_VAR_OBJECT | object | 0 | An object value that can be used by custom AI scripts for any purpose |
AI_CUSTOM_AI_VAR_STRING | string | none | A string value that can be used by custom AI scripts for any purpose |
AI_DISABLE_PATH_BLOCKED_ACTION | int | 0 | |
AI_FLAG_PREFERS_RANGED | int | 0 | If the creature prefers to use ranged combat. Should be set on-spawn for enemies and when switching weapons for followers outside of combat only |
AI_FLAG_STATIONARY | int | 0 | if set to 1 the creature will try not to move to attack. For follower this flag is used to tell if a follower can start attacking yet |
AI_HELP_TEAM_STATUS | int | 0 | 0, not active, 1 active, 2 currently helping, 3 called for help |
AI_LAST_TACTIC | int | 0 | |
AI_LIGHT_ACTIVE | int | 0 | |
AI_MOVE_TIMER | int | 0 | |
AI_PLACEABLE_BEING_USED | object | 0 | |
AI_REGISTERED_WP | object | 0 | An AI waypoint registered by the current creature. A creature registers a waypoint by changing its tag and storing the object ID on itself. A creature un-registers a waypoint by retrieving the waypoint stored on itself and re-setting its tag |
AI_TARGET_OVERRIDE | object | 0 | |
AI_TARGET_OVERRIDE_DUR_COUNT | int | 0 | For how many rounds the target have been overriden, so we can limit it. |
AI_THREAT_GENERATE_EXTRA_THREAT | float | 0 | Used in custom fights to have some creatures generate this extra specified amount of threat when perceived. |
AI_THREAT_HATED_CLASS | int | 0 | Used by target selection AI (ai_threat_h) to weight target selection in favor of a particular class |
AI_THREAT_HATED_GENDER | int | 0 | Used by target selection AI (ai_threat_h) to weight target selection in favor of a particular gender |
AI_THREAT_HATED_RACE | int | 0 | Used by target selection AI (ai_threat_h) to weight target selection in favor of a particular race |
AI_THREAT_SWITCH_TIMER | int | 0 | |
AI_THREAT_SWITCH_TIMER_MIN | int | 0 | |
AI_THREAT_TARGET | object | 0 | |
AI_THREAT_TARGET_SWITCH_COUNTER | int | 0 | |
AI_WAIT_TIMER | int | 0 |