keylayer.swap
Overview
- Replaces an active key layer with another key layer declared by the same mod, at the same stack position (e.g. switch preset A to preset B). Fails if 'from' is not active or the two key layers belong to different mods.
Metadata
| Field | Value |
|---|---|
| Display | Swap Mod Key Layer |
| Category | keylayer |
| Access | ScriptCheat |
| Scope | B1Standalone |
| Tags | Experimental |
| Aliases | — |
Parameters
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| from | string | yes | — | Active key layer id to replace |
| to | string | yes | — | Key layer id of the same mod to put in its place |
Returns
Returns a JSON object with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
layer | string | yes | Key layer now active at that position ('to') |
active | bool | yes | Whether 'to' is on the active stack |
active_count | int | yes | Number of active key layers of all mods |
enabled | bool | yes | Player toggle state of all key layers |
Usage
await inzoi.cli.execute('keylayer.swap', {
from: '',
to: '',
});