Skip to main content

building.undo

Overview

  • [Build Mode Only] Undoes the most recent build command(s). Note that building.move_object issued for several objects creates one undo step per object, while building.put_in_inventory batches them into a single step. Commands whose scope is B1Multicast (e.g. build.remove_object) are applied asynchronously and may not be in the history yet when this returns - verify with building.get_history before undoing, or you will revert the preceding command instead. The build history is normally discarded when build mode is left, so undo before build.exit_mode. ⚠ THE UNDO STACK IS SHARED WITH THE GAME UI. building.get_history lists only the commands this CLI issued, but undo walks the whole stack, so it will happily revert walls and objects a human just built by hand. Check 'foreign_steps' and 'beyond_cli_session' in the response: anything above 0 means you undid someone else's work. Undo one step at a time when you are not sure, and re-check with build.scan_objects / build.scan_walls.

Metadata

FieldValue
DisplayBuild Undo
Categorybuilding
AccessScriptCheat
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
countintno1How many steps to undo (1-64)

Usage

await inzoi.cli.execute('building.undo', {
count: 1, // optional
});