give_order
Assign a unit a short sequence of steps (move, build, heal, hold) that the harness executes over subsequent turns, eliminating per-turn commands.
Instructions
Give one of my units a short sequence of steps the harness carries out over the coming turns, so a plan
already chosen does not cost a call every turn. steps (at most 6, in order): {kind: "move", x, y} walk
there (multi-turn); {kind: "build", build: "FARM"} build it where the previous move ends (x, y name
another plot); {kind: "heal", hp: 80} heal to at least that percent (default 100); {kind: "hold", mission:
"fortify"|"sleep"|"alert"} as the last step. Example: move to (12,8) then build FARM; or heal to 80, move
to (30,14), hold. purpose is a free-text label for the order.
It runs now (start=true) as far as it can, then at the start of each of my turns (finish_turn /
wait_for_my_turn carry orders), one step per turn at most, through move_unit / unit_mission. It pauses
and hands the unit back with pause.reason and hint when a hostile comes into sight within
interrupt.hostile_within plots (default 2; 0 off), the unit was damaged (interrupt.damaged, default true)
or is below interrupt.hp_below, an enemy stands on the destination (an order never attacks), a step is
refused or makes no progress, a save was loaded, or I give the unit a direct order. An order never declares
war, attacks, ends the turn or touches another unit; a unit on automation leaves it as soon as the order
is stored. One open order per unit (replace_id replaces it); a first step that cannot run now refuses the
order. Stored in my notebook: orders survive a restart, briefing() lists them, resume_order / cancel_order
finish a paused one. Every interrupt and state: how_to_play("give_order").
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| start | No | ||
| steps | Yes | ||
| purpose | No | ||
| unit_id | Yes | ||
| interrupt | No | ||
| replace_id | No |