Skip to main content

game.get_state

Overview

  • Master polling command for game-flow automation: reports which stage the client is in (boot / lobby / character_customize / family_edit / city_select / loading / site_select / map_view / in_game), what is blocking the screen, and a one-line 'next_hint' telling you what to do next. Poll this after every asynchronous command (game.new_game, game.load, game.continue, game.move_in) until phase reaches the value you want. The 'flow' object is present only while a game.new_game driver is running.

Metadata

FieldValue
DisplayGet Game Flow State
Categorygame
AccessPublic
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

  • This command takes no parameters.

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
phasestringyesunknown | boot | lobby | character_customize | family_edit | city_select | loading | site_select | map_view | in_game. 'map_view' means a character is possessed and setup is done, but the camera is still on the world map overview with no HUD - call game.exit_map_view
level_namestringyesCurrent level name
map_idstringyesCurrent city id (UB1WorldManager::GetCityId), empty in the lobby
is_lobbyboolyesWhether the current level is a lobby/front-end level
loadingboolyesWhether a loading screen is up
load_game_statestringyesinvalid | continue | new_game | city_move
game_startedboolyesAB1PlayerController::IsGameStart()
possessed_entity_identityIdyesPossessed character entity id, -1 when none
map_modestringyesnone | default | select_new_house | select_init_house | select_subway | select_move_house
is_new_game_pendingboolyesWhether the new-game setup (family registration / move-in) is still pending
onboarding_activeboolyesWhether the first-start onboarding or the site refresh flow is running
blockingobjectyesBlocking UI snapshot (same shape as the top level of ui.get_blocking, minus 'popups')
blocking.blockedboolyesWhether anything is blocking input
blocking.primary_kindstringyesloading | coach_mark | cat_talk | popup | modal_ui | level_sequence | ''
blocking.primary_detailstringyesIdentifier of the top blocker
blocking.loadingboolyesLoading screen is up
blocking.cat_talkboolyesCat-talk overlay is visible
blocking.coach_markboolyesA coach mark is active
blocking.level_sequenceboolyesA cutscene is playing
blocking.popup_countintyesNumber of opened popups
blocking.input_block_ui_typestringyesEB1UIType name of the modal UI blocking input
blocking.esc_stack_remainsboolyesESC stack still has a closable widget
blocking.pause_reasonsarray<string>yesEB1PauseReason names currently pausing the simulation
flowobjectnoState of the running game.new_game driver. Present ONLY while the driver is active
flow.activeboolyesWhether the driver is running
flow.stepstringyesCurrent driver step. Terminal values: 'done' (success), 'failed' (error - read last_error), 'cancelled' (game.cancel_flow, a force=true restart, or the world was torn down). 'unknown' means an unmapped enumerator and is a bug
flow.elapsed_secfloatyesSeconds since the driver started
flow.last_errorstringyesLast error message, empty when none
flow.target_map_idstringyesRequested city id
flow.target_site_idstringyesRequested or chosen site id
next_hintstringyesOne-line hint describing the recommended next command

Usage

await inzoi.cli.execute('game.get_state');