- **Help Agent** — A new agent that answers questions about Talemate itself — settings, agents, clients, the world editor — grounded in the bundled documentation, and able to change agent and application settings on request. - **Timeline Rollback** — Scrub a slider across a scene's automatic version history, preview the message history at any revision, then roll the scene back in place or fork the revision into a new save. - **Pi Bridge Client** — A new client type that drives generations through the pi coding agent's headless RPC mode, making any model pi can reach usable in Talemate. - **Application Settings** — Settings move out of their modal into an always-available Settings tab, with a single topic-grouped sidebar, a settings search, all API keys on one page, and unsaved-change tracking. - **Scene Library** — The home screen is rebuilt as a full-page landing view with a file-tree scene library, cover thumbnails and per-save metadata, scene and save deletion, and a drag-and-drop import dropzone. - **Fast Character Creation** — Generate a character in a single request instead of one prompt per aspect, with a Consolidate multi-select, a token budget, and a Fill in misses pass. Off by default. - **Scene Backdrop** — Set any scene illustration as a backdrop filling the scene view behind the messages, saved with the scene, with configurable text legibility and an Immersive quick-toggle. - **Scene Visual Manager** — World Editor → Scene gains a Visuals tab to browse, upload, generate and delete the scene's backgrounds and illustrations, and set the cover image and backdrop. - **Visual Prompt Finalization** — Post-processing actions — match and replace, or a free-form AI instruction — rewrite image prompts right before they reach the image backend, with per-scene and per-character overrides and reusable template sets. - fixes #271 - fixes #275 Plus 25 improvements and 39 bug fixes — see [CHANGELOG.md](https://github.com/vegu-ai/talemate/blob/prep-0.39.0/CHANGELOG.md#0390) for the full list.
14 KiB
State Nodes
Read and write named variables in the graph state. Every variable lives in a scope: local (this module run), parent, shared (all modules in the graph), scene loop (reset each loop iteration) or game (persisted with the scene save). See States for scope semantics. The ...Path variants address nested values with dotted paths, and the counter nodes increment numeric state in place.
14 nodes.
| Node | Registry path |
|---|---|
| Counter State (Conditional) | state/ConditionalCounterState |
| Set State (Conditional) | state/ConditionalSetState |
| Unset State (Conditional) | state/ConditionalUnsetState |
| State Counter | state/CounterState |
| State Counter (Path) | state/CounterStatePath |
| Game State | state/Gamestate |
| Get State | state/GetState |
| Get State (Path) | state/GetStatePath |
| Has State | state/HasState |
| Has State (Path) | state/HasStatePath |
| Set State | state/SetState |
| Set State (Path) | state/SetStatePath |
| Unset State | state/UnsetState |
| Unset State (Path) | state/UnsetStatePath |
Counter State (Conditional)
state/ConditionalCounterState
Counter node that increments a numeric value in the state and returns the new value.
Provides a required state input causing the node to only run when a state is provided
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
|
name |
str |
(optional) |
reset |
bool |
(optional) |
reset_cap |
number |
(optional) |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
|
name |
str |
|
value |
any |
|
scope |
str |
|
reset_cap |
number |
|
reset |
bool |
|
new_cycle |
bool |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
increment |
number |
1 |
The amount to increment the value by. Min: 1. |
reset |
bool |
False |
If true, the value will be reset to 0 |
reset_cap |
number |
0 |
If set (> 0), the counter resets to 0 once the value reaches this cap |
Set State (Conditional)
state/ConditionalSetState
Set a variable in the graph state
Provides a required state input causing the node to only run when a state is provided
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
|
name |
str |
(optional) |
value |
any |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
|
name |
str |
|
value |
any |
|
scope |
str |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Unset State (Conditional)
state/ConditionalUnsetState
Unset a variable in the graph state
Provides a required state input causing the node to only run when a state is provided
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
|
name |
str |
(optional) |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
|
name |
str |
|
value |
any |
|
scope |
str |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
State Counter
state/CounterState
Counter node that increments a numeric value in the state and returns the new value.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
required state input (conditional execution) |
name |
str |
(optional) The key to the value to increment |
reset |
bool |
(optional) If true, the value will be reset to 0 |
reset_cap |
number |
(optional) If set, the counter resets to 0 once it reaches this value |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
the state that was passed in |
name |
str |
The key that was used |
value |
any |
The new value |
scope |
str |
The scope that was used |
reset_cap |
number |
The reset cap that was used |
reset |
bool |
Whether the counter was reset |
new_cycle |
bool |
True if the counter was at 0 before this run |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
increment |
number |
1 |
The amount to increment the value by. Min: 1. |
reset |
bool |
False |
If true, the value will be reset to 0 |
reset_cap |
number |
0 |
If set (> 0), the counter resets to 0 once the value reaches this cap |
State Counter (Path)
state/CounterStatePath
Counter node that increments a numeric value in the state using a path (e.g., 'a/b/c').
Creates intermediate dictionaries as needed (mkdir -p semantics). Mutating operation - conditional by default with required state input.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
required state input (conditional execution) |
name |
str |
(optional) The path key to the value to increment (e.g., 'a/b/c') |
reset |
bool |
(optional) If true, the value will be reset to 0 |
reset_cap |
number |
(optional) If set, the value will be reset to 0 when it reaches this value |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
the state that was passed in |
name |
str |
The key that was used |
value |
any |
The new value |
scope |
str |
The scope that was used |
reset_cap |
number |
The reset cap value |
reset |
bool |
Whether reset occurred |
new_cycle |
bool |
Whether this is a new cycle (value was 0) |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
increment |
number |
1 |
The amount to increment the value by. Min: 1. |
reset |
bool |
False |
If true, the value will be reset to 0 |
reset_cap |
number |
0 |
If set (> 0), the counter resets to 0 once the value reaches this cap |
Game State
state/Gamestate
Get the game state variables of the active scene.
Outputs
| Output | Type | Description |
|---|---|---|
variables |
dict |
Dict of the scene's game state variables |
Get State
state/GetState
Get a variable from the graph state
Inputs
| Input | Type | Description |
|---|---|---|
name |
str |
(optional) the name to get |
default |
any |
value to return if the variable is not set (optional) |
Outputs
| Output | Type | Description |
|---|---|---|
name |
str |
the name that was retrieved |
value |
any |
the value that was retrieved |
scope |
str |
the scope that was retrieved |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Get State (Path)
state/GetStatePath
Get a variable from the graph state using a path (e.g., 'a/b/c').
Does not create missing containers - returns default if path doesn't exist.
Inputs
| Input | Type | Description |
|---|---|---|
name |
str |
(optional) the path name to get (e.g., 'a/b/c') |
default |
any |
(optional) default value if path doesn't exist |
Outputs
| Output | Type | Description |
|---|---|---|
name |
str |
the name that was retrieved |
value |
any |
the value that was retrieved |
scope |
str |
the scope that was retrieved |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Has State
state/HasState
Check if a variable exists in the graph state
Inputs
| Input | Type | Description |
|---|---|---|
name |
str |
(optional) the name to check |
Outputs
| Output | Type | Description |
|---|---|---|
name |
str |
the name that was checked |
value |
any |
|
scope |
str |
the scope that was checked |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Has State (Path)
state/HasStatePath
Check if a variable exists in the graph state using a path (e.g., 'a/b/c').
Does not create missing containers - returns False if path doesn't exist.
Inputs
| Input | Type | Description |
|---|---|---|
name |
str |
(optional) the path name to check (e.g., 'a/b/c') |
Outputs
| Output | Type | Description |
|---|---|---|
name |
str |
the name that was checked |
value |
any |
|
scope |
str |
the scope that was checked |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Set State
state/SetState
Set a variable in the graph state
Inputs
| Input | Type | Description |
|---|---|---|
name |
str |
(optional) the name to set |
value |
any |
the value to set |
Outputs
| Output | Type | Description |
|---|---|---|
name |
str |
the name that was set |
value |
any |
the value that was set |
scope |
str |
the scope that was set |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Set State (Path)
state/SetStatePath
Set a variable in the graph state using a path (e.g., 'a/b/c').
Creates intermediate dictionaries as needed (mkdir -p semantics). Mutating operation - conditional by default with required state input.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
required state input (conditional execution) |
name |
str |
(optional) the path name to set (e.g., 'a/b/c') |
value |
any |
the value to set |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
the state that was passed in |
name |
str |
the name that was set |
value |
any |
the value that was set |
scope |
str |
the scope that was set |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Unset State
state/UnsetState
Unset a variable in the graph state
Inputs
| Input | Type | Description |
|---|---|---|
name |
str |
(optional) the name to unset |
Outputs
| Output | Type | Description |
|---|---|---|
name |
str |
the name that was unset |
value |
any |
the value that was unset |
scope |
str |
the scope that was unset |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |
Unset State (Path)
state/UnsetStatePath
Unset a variable in the graph state using a path (e.g., 'a/b/c').
Does not create missing containers - returns None if path doesn't exist. Mutating operation - conditional by default with required state input.
Inputs
| Input | Type | Description |
|---|---|---|
state |
any |
required state input (conditional execution) |
name |
str |
(optional) the path name to unset (e.g., 'a/b/c') |
Outputs
| Output | Type | Description |
|---|---|---|
state |
any |
the state that was passed in |
name |
str |
the name that was unset |
value |
any |
the value that was unset |
scope |
str |
the scope that was unset |
Properties
| Property | Type | Default | Description |
|---|---|---|---|
name |
str |
unset |
The name of the variable to manipulate |
scope |
str |
"local" |
Which scope to manipulate. Choices: local, parent, shared, scene loop, game. |