tactics

Reads and sets a party member’s tactics (what they do on their own in a fight), the way the tactics screen does, with no screen open and nobody selected.

action is one of:

  • look: returns slots (how many there are), ai (whether the follower’s tactics run), preset (null when none is chosen), behaviour, and tactics: each slot in order with enabled, target, condition, command and the ability or item it uses. An unset slot is empty.
  • choices: returns what the screen offers this party member: the targets; with target, its baseConditions; with baseCondition as well, the conditions, actions, abilities and items.
  • set: sets slot slot to target, condition and command, each by number, label or name from what choices offers, with ability or item for the command and enabled. Returns the slot as the game reads it back and whether the change took; one the screen would not offer is refused, saying which part.
  • clear: empties slot slot and returns whether it is cleared. Use it to put a party member’s tactics back as you found them.
  • preset: loads preset preset of type presetType (0 the AI off, 1 a custom slot, 2 one of the game’s, the default) and returns the slots.

Arguments

Name Type Required What
action "look" | "choices" | "set" | "clear" | "preset" yes What to do.
id string   The party member, by creature id. Default: the creature you control.
slot integer (≥ 1)   For set and clear: the slot, counting from 1. Default 1.
target any   For choices and set: a target type, by number, label or name.
baseCondition any   For choices: a base condition, by number, label or name.
condition any   For set: a condition, by number, label or name.
command any   For set: the action to take, by number, label or name.
ability integer   For set: the id of the ability the action uses, or the slot a jump goes to.
item string   For set: the id of the item the action uses.
enabled boolean   For set: whether the slot is on. Default true.
preset integer   For preset: the custom slot or the place among the game’s presets, from 0. Default 0.
presetType integer   For preset: 0 the AI off, 1 a custom slot, 2 one of the game’s. Default 2.

Call it as tactics over MCP, or POST /api/tool/tactics with the arguments as JSON.