AI_LEVEL_* Constant Group
From NWN Lexicon
Jump to navigationJump to searchDetermines the AI (artificial intelligence) level of a creature controlled by the computer. The AI level determines how "smart" the creature is by how much CPU time is given to it.
Constants
For more information on technicalities see GetAILevel. The heartbeat timing is rough - it really depends on the game load and number of objects in the world.
Constant | Value | Heartbeat Timing | Description |
---|---|---|---|
AI_LEVEL_DEFAULT | -1 | Variable | Default game-specified setting. The game will apply the appropriate AI setting as necessary. See GetAILevel for some notes on this. |
AI_LEVEL_HIGH | 3 | 6 seconds | High priority, but extremely high CPU usage required for AI. Avoid using this except during a cut-scene. |
AI_LEVEL_INVALID | -1 | na | Invalid AI level setting. Returned if GetAILevel is used on a non-creature. |
AI_LEVEL_LOW | 1 | ~8 seconds (faster if less things doing heartbeats) | Low priority, but slightly more CPU usage for AI. Typically used when not in combat, but a player is in the same area but not in sight.
Placeables and doors also use this level. |
AI_LEVEL_NORMAL | 2 | 6-8 seconds | Normal priority, but more CPU usage required for AI. Typically used when a creature is visible to a player. |
AI_LEVEL_VERY_HIGH | 4 | 6 seconds | This is a reserved AI level for creatures in combat and likely henchmen. It cannot manually be set. |
AI_LEVEL_VERY_LOW | 0 | 10 seconds | Very Low priority, but low CPU usage for AI. Typically used when no players are in the area. This is risky to use in an interactive scenario since actions may not be performed in a timely manner by the creature. |
See Also
functions: | SetAILevel |