story
The story beats: a dialogueKit conversation before each level (`story.before`, e.g. `"intro_{level}"`), over its results card (`story.after`) and at the finale (`story.finale`), played for the local player only with the game's dialogue style. Conversations can be registered from…
story
The story beats: a dialogueKit conversation before each level (story.before, e.g. "intro_{level}"), over its results card (story.after) and at the finale (story.finale), played for the local player only with the game's dialogue style. Conversations can be registered from the config (story.conversations). An optional story NPC (story.npc = { model, entity, light }) stands beside the player at the level start while they talk; it is a local entity per machine, so two players never see each other's scenes. A level with no conversation simply starts.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2nonstrict
Dialogue( ) → any
configure(cfg: any?) → void
Configure the story beats (see the header). Registers the conversations with dialogueKit.
| arg | type | description |
|---|---|---|
| cfg | any? |
pick(rule: any, levelId: string) → string
| arg | type | description |
|---|---|---|
| rule | any | |
| levelId | string |
idFor(moment: string, levelId: string?) → string
The conversation id for a moment ("before", "after") of a level, or the finale's (moment "finale").
| arg | type | description |
|---|---|---|
| moment | string | |
| levelId | string? |
has(id: string?) → boolean
Whether dialogueKit knows a conversation of that id (registered here, or a conversation file).
| arg | type | description |
|---|---|---|
| id | string? |
npcEntity( ) → any
placeNpc(at: any?, yawDeg: number?) → void
Stand the story NPC beside a point (a level start, facing yawDeg), or hide it (nil).
| arg | type | description |
|---|---|---|
| at | any? | |
| yawDeg | number? |
npc( ) → any return npcEntity
The story NPC entity (spawned on first use), or nil when the game has none.
play(id: string?, onEnd: ((string?) → void
Play a conversation for the local player; onEnd(reason) runs when it closes, or at once ("missing") when there is none. Returns whether it opened.
| arg | type | description |
|---|---|---|
| id | string? | |
| onEnd | ((string? |
done(reason: string?) → void
| arg | type | description |
|---|---|---|
| reason | string? |
onEnd(ev: ?) → void
| arg | type | description |
|---|---|---|
| ev | ? |
isTalking( ) → boolean
Whether a conversation is open on this screen.
stop( ) → void
Close the open conversation.
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
Showing up to 3 levels deep. Open a part to see what it holds further down.
Problems
Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.
agent_score is exposed.+ quality × 0.35
+ performance × 0.25
± compat factor
Usability ratings
Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".
Scoped to this part · feeds back into the world's score.