move_elements
Move up to 1000 battlemap elements by a shared offset in one call and one undo, with optional rotation, pivot control, and grid snapping for grouped objects.
Instructions
Move many elements by the same offset, in one call and ONE undo step.
Use it for anything that moves as a group: a prefab (its `ids` come back
from place_prefab), a scattered cluster, a furnished corner. Moving them one
at a time costs a call and an undo slot each.
ids: element ids, up to 1000.
dx, dy: offset in woxels (256 = one tile).
rotation: optional degrees around the group geometry's bounding-box centre,
or around pivot_x/pivot_y when both are supplied; translation follows.
Walls keep their saved geometry and carry mounted doors/windows with them.
Duplicate ids move once. Text anchors move while labels stay upright.
Cave-generated walls and mounted portals without their wall are reported
in `unsupported`, with reasons. Returns `moved`, `missing`, `unsupported`,
the applied offset/rotation and pivot. Inspect these before repeating a prefab.
snap: rounds dx, dy to the nearest whole grid steps; see get_snap_settings.
A group of only scatter_objects detail stays loose unless you pass snap.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"ids": "<ids>",
"dx": "<dx>",
"dy": "<dy>"
},
"name": "move_elements"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| dx | Yes | ||
| dy | Yes | ||
| ids | Yes | ||
| snap | No | ||
| pivot_x | No | ||
| pivot_y | No | ||
| rotation | No |