dialogue
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
dialogue
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->TODO: describe this module.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2game.story.dialogue — the conversation runtime for Amelia. Story.talk(key) play the conversation `key` from game.story.content Story.play(sequence) play any sequence of nodes (see content.module) Story.playOpening() the opening scene Story.isOpen() true while the story has the player: a dialogue box is on screen (incl. fade) OR a cutscene holds it Story.boxOpen() true only while the dialogue box itself is up Story.hold(on) cutscenes take / give back the player (counted) Story.advance() finish the typewriter / next line / confirm the reply Story.move(d) move the reply cursor (-1 up, +1 down) Story.choose(i) pick reply i directly (pointer / tap) Story.tick(dt) drive typewriter + fades (StoryDirector calls it) Story.has / set story flags (live in game.world.state) Story.on(event, fn) hooks for { event = "..." } nodes: gotLantern, departMurmurwood, and "cutscene" for { cutscene = "id" } nodes (game.story.hooks) Story.onClose(fn) called whenever a conversation finishes Story.setObjective(txt) the quest line in the top-left (nil hides it) Story.talkables entity id -> Talkable public table (registered by Talkable) Input is not read here: StoryDirector owns the dialogue inputMap and calls advance/move/choose. Rendering goes through game.ui.dialogue.view.
fire(name: string, arg: any?) → void
| arg | type | description |
|---|---|---|
| name | string | |
| arg | any? |
on(name: string, fn: (any) → void
| arg | type | description |
|---|---|---|
| name | string | |
| fn | (any |
onClose(fn: () → void
| arg | type | description |
|---|---|---|
| fn | ( |
has(flag: string) → boolean
| arg | type | description |
|---|---|---|
| flag | string |
set(flag: string, value: boolean?) → void
| arg | type | description |
|---|---|---|
| flag | string | |
| value | boolean? |
reset( ) → void
setObjective(text: string?) → void
| arg | type | description |
|---|---|---|
| text | string? |
render( ) → void
showLine(who: string, body: string, mood: string?, choices: { string }?) → void
Put one line on screen (who, text, mood, reply labels).
| arg | type | description |
|---|---|---|
| who | string | |
| body | string | |
| mood | string? | |
| choices | { string }? |
labels(node: any) → void
| arg | type | description |
|---|---|---|
| node | any |
say(node: any) → number
| arg | type | description |
|---|---|---|
| node | any |
run(seq: { any }) → void
| arg | type | description |
|---|---|---|
| seq | { any } |
finish( ) → void
resume(arg: any?) → void
| arg | type | description |
|---|---|---|
| arg | any? |
isOpen( ) → boolean
True while the story has the player: a box on screen or a cutscene running.
boxOpen( ) → boolean
True only while the dialogue box itself is up (incl. its fade).
hold(on: boolean) → void
Cutscenes take the player (true) and give it back (false); counted.
| arg | type | description |
|---|---|---|
| on | boolean |
releaseAllHolds( ) → void
current( ) → any
play(seq: { any }, convId: string?) → boolean
| arg | type | description |
|---|---|---|
| seq | { any } | |
| convId | string? |
line(who: string, body: string, mood: string?, replies: { string }?) → number
Story.line(who, text, mood?, replies?) shows one line from any task thread and waits (task.wait polling) until the player advances; returns the reply index (or nil). The box stays up between lines; Story.endLines() fades it.
| arg | type | description |
|---|---|---|
| who | string | |
| body | string | |
| mood | string? | |
| replies | { string }? |
endLines( ) → void
Fade the cutscene's box away (no-op when none is up).
pickBranch(key: string) → any
First branch of a conversation whose `when` holds.
| arg | type | description |
|---|---|---|
| key | string |
pick(key: string) → void
| arg | type | description |
|---|---|---|
| key | string |
talk(key: string) → boolean
| arg | type | description |
|---|---|---|
| key | string |
playOpening( ) → boolean
advance( ) → void
move(d: number) → void
| arg | type | description |
|---|---|---|
| d | number |
choose(i: number) → void
| arg | type | description |
|---|---|---|
| i | number |
closeNow( ) → void
isPause(ch: string) → number
| arg | type | description |
|---|---|---|
| ch | string |
tick(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
rotInv(q: any, v: { number }) → void
| arg | type | description |
|---|---|---|
| q | any | |
| v | { number } |
project(p: { number }, cameraName: string?) → void
Project a world point through the named camera into UI points.
| arg | type | description |
|---|---|---|
| p | { number } | |
| cameraName | string? |
registerTalkable(id: string, pub: any) → void
| arg | type | description |
|---|---|---|
| id | string | |
| pub | any |
unregisterTalkable(id: string) → void
| arg | type | description |
|---|---|---|
| id | string |
conversationFor(pub: any) → string
Conversation key for a Talkable: its own field, else the entity-name map.
| arg | type | description |
|---|---|---|
| pub | any |
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.