game.goto_lobby
Overview
- Ends the current game session and returns to the main menu WITHOUT any confirmation popup. With save=true the game is saved first and the transition happens when the save completes; a slot name is generated (UTC YYYYMMDD-HHMMSS) when the session never had one, so the SaveAs modal is not opened. The returned 'slot' is that slot NAME and CANNOT be fed to game.load: game.load takes a save FOLDER, and the folder name is produced by a separate timestamp call inside the save routine, so it can differ by a second. Discover the folder afterwards with game.list_saves (newest entry) instead. This is ASYNCHRONOUS: poll game.get_state until is_lobby == true. Fails when already in the lobby.
Metadata
| Field | Value |
|---|---|
| Display | Go To Lobby |
| Category | game |
| Access | UserCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| save | bool | no | false | Save the current game before leaving. WARNING: the engine's save-complete path for 'go to lobby' sleeps 1 second on the game thread, so expect a ~1s hitch. |
Usage
await inzoi.cli.execute('game.goto_lobby', {
save: false, // optional
});