edit_parts
Apply atomic batches of part operations to a Stormworks draft—add, fill, remove, move, rotate, paint, copy, mirror, or configure—then preview or commit changes.
Instructions
Add, remove, move, rotate, paint or copy parts in a draft as one atomic batch. Pass the revision from query_parts. Ops: add(part/parts), fill(bounds,color), remove/replace/move/rotate/paint/copy/mirror/repeat. Selection ops need select={ids/bounds/name/definition}. move/copy/repeat use delta in blocks; repeat count is additional copies; rotate uses a local-to-world matrix or r string and pivot; mirror uses axis and plane. replace needs part; paint needs color. Added parts use definition, position in blocks, rotation, optional mirror (1=x, 2=y, 4=z), color, name and scalar settings. Placement rotation accepts an effective mirrored matrix; use that or proper rotation plus mirror. Prebuilt engines default to max_force_scale=1 (100%). Returns what changed (added parts with their new ids, such as edit:0:0, next to the names you gave), warnings and the new revision; preview=true adds the image and full notes. commit=true keeps one undo step (undo_edits). Wires and pipes use edit_connections and route_connections.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commit | No | false (default) previews without changing the draft; true applies it as one undo step. | |
| design | Yes | Stored draft name (from import_vehicle, create_land_vehicle, store_design or save_hull; see list_designs). | |
| preview | No | true also returns the rendered preview image and the full build notes; false (default) returns a compact list of what changed, warnings and the new revision. | |
| revision | Yes | The draft's current revision from query_parts or query_connections; a stale one is rejected. | |
| operations | Yes | 1-100 operations applied in order as one atomic batch; see the description. |