tactics

Reads and sets a party member’s tactics (what they do on their own in a fight), the way the tactics screen does. If id is not the party member selected in the interface, it is selected for the call and control is handed back afterwards (selectedFirst).

action is one of:

  • look: returns slots (how many there are), 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.
  • 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 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 one selected in the interface (for look, 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.
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 preset’s number. Default 0.
presetType integer   For preset: the preset’s type. Default 0.

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