ui.dismiss
Overview
- Closes the top-most blocking UI, up to max_steps elements in one call. Priority: coach mark -> cat talk -> popup -> ESC stack -> cutscene. For a popup it clicks the CANCEL button, never the action button: with two or more buttons it only clicks a non-dimmed Secondary/SecondaryNegative button and only when exactly one exists; a single-button popup is treated as an acknowledgement and is clicked. Clicking runs that button's bound script and delegate for real. Popup enumeration order is UObject creation order, NOT z-order, so the popup acted on is a best guess. Destructive confirmations (quit game, leave to lobby, delete, overwrite, discard, reset - matched as whole words, so 'Preset' is not read as 'Reset') are additionally on a deny-list and are NEVER auto-clicked; neither are popups with an empty popup_id, which are opened directly by a handler and cannot be verified as safe. A popup is closed outright (without clicking) only when its widget tree contains no button at all, so a popup that shows buttons never loses its decision delegates. When a popup is left untouched the call fails with stop_reason 'blocked_by:<popup_id> ...' (decide yourself and use ui.click_popup_button) or 'stuck:<popup_id> - all buttons dimmed' (nothing can be clicked at all). Loading screens are NEVER dismissed - poll ui.get_blocking and wait them out. Fails when there is no world. Safe to call repeatedly; within one call a target is never attempted twice.
Metadata
| Field | Value |
|---|---|
| Display | Dismiss Blocking UI |
| Category | ui |
| Access | UserCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| max_steps | int | no | 1 | Maximum number of UI elements to close in this call [1-32] |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
dismissed_count | int | yes | How many elements were closed |
dismissed | array<string> | yes | What was closed, e.g. 'popup:NoticeBirth#0', 'popup_close:NoticeBirth', 'coach_mark:HudGuide', 'cat_talk', 'esc_stack', 'level_sequence' |
stop_reason | string | yes | Why the loop stopped. Empty when max_steps was reached. 'blocked_by:<popup_id> - ...' means a popup was refused; the trailing text says why (destructive deny-list, empty popup_id so it cannot be verified, or no clearly non-destructive button) and whether ui.click_popup_button can handle it - when the reason says the buttons are not registered with the popup base, it cannot, and a human has to click. 'stuck:<popup_id> - all buttons dimmed' means the popup has buttons but none can be clicked, so nothing can clear it right now |
Usage
await inzoi.cli.execute('ui.dismiss', {
max_steps: 1, // optional
});