Changes
Jump to navigation
Jump to search
→Queued Actions
== Queued Actions ==
When a command is selected either by a player character or an enemy the action gets queued in is inserted into a FIFO structure while there are actions queued or one is being performedpriority queue. Up to 64 actions can be queued.On each update loop, the main Queue function will pop off the next action with the lowest priority and execute it in FIFO order within priority bands. Queue entries have the following structure in memory:
{| class="wikitable"
|-
| 0
| Command IndexAction Priority (limits/counters 0, player chosen spells 6)
|-
| 1
| Command's ActorQueue position within priority band
|-
| 2
| Priority (4 - ??; 3 - Auto commands (Added Cut, Poison, Death Sentence, etc); 2 - Normal; 1 - ??; 0 - Counters and Limit Breaks)attacker actor ID
|-
| 3
| AI-related function parameteraction command index (e.g CMD_MAGIC = 0x02)
|-
| 4
| Target Maskaction attack index (e.g Bolt = 0x21). (This index is absolute, not command relative)
|-
| 6
| Action Indextarget mask
|}