Skip to main content

game.new_game

Overview

  • Starts a fully automated new game from the lobby: clicks New Game, randomizes the first character at the requested age, creates the family, submits the approval document, picks a city, waits for the level to load, moves into a residence site and enters play. This is ASYNCHRONOUS and returns as soon as the flow is accepted. Poll game.get_state: 'flow.step' tracks progress and 'phase' becomes 'in_game' when finished. Each step has a timeout (120s by default, 600s for level load and in-game entry) and there is NO automatic retry - on timeout flow.step becomes 'failed' and flow.last_error explains where it stopped. The one exception is the final 'dismiss_intro_ui' step: the game is already playable there, so a timeout still ends as flow.step == 'done' and only records the reason in flow.last_error. Must be called from the lobby, or with force=true from anywhere (the flow then returns to the lobby by itself first).

Metadata

FieldValue
DisplayStart New Game (Automated)
Categorygame
AccessUserCheat
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
map_idnameno—Target city id (Map table row id). Omit to use the first released playable city.
site_idnameno—Residence site to move into. Omit to auto-pick the cheapest affordable one (same ordering as game.list_move_in_sites).
random_non_empty_residenceboolnofalseWhen site_id is omitted, choose a selectable non-empty residence using site_selection_seed instead of always choosing the cheapest site.
site_selection_seedintno0Deterministic seed used by random_non_empty_residence.
excluded_site_idsstringno—Comma-separated DataTable site ids excluded from random_non_empty_residence. If every selectable non-empty residence is excluded, the flow fails; the caller must clear the list to start a new rotation.
growth_stepstringnoYouthEB1GrowthStep enumerator name for the created character. Default 'Youth' (young adult). NOTE: 'Adult' means middle-aged, not young adult.
genderstringno—EB1GenderType enumerator name for the created character: 'Female' or 'Male'. Omit to let the character randomizer pick one.
family_namestringno—Family name. Omit to let the game use the first member's surname.
same_sex_romanceboolnofalseSet the created character's romance target to its own gender only, like picking it in character customization. This turns the world into a gender identity diversity world.
mortgageboolnotrueTake a mortgage when the household cannot afford the site, so any site can be moved into.
dismiss_intro_uiboolnotrueAutomatically close the intro cat-talk / coach marks / popups after entering play.
forceboolnofalseCancel an already running flow and restart. Also allows starting from outside the lobby: the flow then goes back to the lobby itself (flow.step == 'wait_lobby', 120s timeout) before clicking New Game. Without it, a non-lobby phase is rejected.

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
acceptedboolyesAlways true on success
stepstringyesInitial driver step: 'click_new_game' from the lobby, 'wait_lobby' when force=true had to leave the current game first
map_idstringyesResolved target city id, empty if it could not be resolved yet

Usage

await inzoi.cli.execute('game.new_game', {
map_id: '', // optional
site_id: '', // optional
random_non_empty_residence: false, // optional
site_selection_seed: 0, // optional
excluded_site_ids: '', // optional
growth_step: 'Youth', // optional
gender: '', // optional
family_name: '', // optional
same_sex_romance: false, // optional
mortgage: true, // optional
dismiss_intro_ui: true, // optional
force: false, // optional
});