Skip to main content

building.get_history

Overview

  • [Build Mode Only] Returns whether undo/redo are available, plus the build commands issued through the CLI in the current build-mode session. Build commands issued through the game UI are NOT listed - the underlying command objects carry no name, so the real undo history cannot be enumerated. The log holds at most 64 entries and is cleared when build mode is left.

Metadata

FieldValue
DisplayGet Build History
Categorybuilding
AccessPublic
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
limitintno20Maximum number of log entries to return, most recent first-in-order (1-64)

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
has_undoboolyesWhether building.undo is available
has_redoboolyesWhether building.redo is available
truncatedboolyesWhether older CLI log entries were dropped by 'limit'
session_command_countintyesTotal build commands issued through the CLI this session (may exceed the 64-entry log)
cli_entriesarray<object>yesBuild commands executed through the CLI in this build-mode session, oldest first. Commands issued through the game UI are NOT included.
cli_entries[].command_idstringyesCLI command id, e.g. building.construct_wall
cli_entries[].committedboolyesWhether it entered the undo history
cli_entries[].timestampstringyesISO-8601 UTC timestamp

Usage

await inzoi.cli.execute('building.get_history', {
limit: 20, // optional
});