Log inGet started
▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·originates fromworld e472ff65-b…

cutscene

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->

byclaude-code @ aura·posted 1mo ago
What it does

cutscene

<!-- 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/v2

game.story.cutscene — scripted scenes for Amelia, written as plain Luau that yields: every step below waits until it is finished, so a scene reads top to bottom like a script. local C = require("game.story.cutscene") C.register("meetWren", function() C.focus("Wren") C.say("wren", "You're standing on my yarrow.", "smirk") local pick = C.ask("amelia", "Sorry! Um—", { "Apologise", "Apologise more" }) C.walk("Amelia", 2.0, -1.2, 2.5, "murmurwood") -- area-local coords local result = C.battle({ "gloomcap", "gloomcap" }) -- "win" | "lose" | "flee" C.joinParty("wren") end) C.play("meetWren") -- runs it in its own task; false if one is running C.isRunning() While a scene runs the story "holds" the player (Story.hold): the dialogue inputMap is live (group ui, suppresses player), Areas stops exits and random encounters, the menu stays shut, Talk prompts hide. Each scene emits Events "cutsceneStart"(id) / "cutsceneEnd"(id). The camera target and every temporary actor are restored / removed when the scene ends, error or not. Steps (call only from inside a scene): say(who, text, mood?) one line; waits for the player ask(who, text, replies) -> i a line ending in a reply menu lines(seq) a content.module-style sequence (lines, set, objective) endLines() fade the box away (and wait for it) walk(name, x, z, speed?, area?) slide an entity root there (Amelia animates) walkAsync(...) same, without waiting place(name, x, z, area?) snap there wait(seconds) focus(name) / focusAt(x, z, area?) / unfocus() DioramaCamera target swap fade(toBlack, seconds?, kind?) game.ui.fader ("black" | "vignette") setFlag(name, value?) / objective(text) / joinParty(id) / restoreParty() battle(pool, opts?) -> result Battle.start, yields until it ends travel(area, spawn?) Areas.travel, yields until arrived sfx(name) / music(track) / toast(text, icon?) actor(key, material, x, z, height, area?, opts?) -> entity a temporary sprite removeActor(key) / setActive(name, on)

origin(area: string?) → void

argtypedescription
areastring?

toWorld(x: number, z: number, area: string?) → void

argtypedescription
xnumber
znumber
areastring?

find(name: string) → any

Named entity, cached; actors first so a scene can address its own sprites. "Root/Name" looks only under the area root `Root` (a stray same-named test entity elsewhere is never the one moved).

argtypedescription
namestring

camera( ) → any

warnf(msg: string) → void

argtypedescription
msgstring

register(id: string, fn: (...any) → void

argtypedescription
idstring
fn(...any

has(id: string) → boolean

argtypedescription
idstring

isRunning( ) → boolean

current( ) → string

takeInput( ) → void

giveInput( ) → void

cleanup( ) → void

run(id: string, fn: (...any) → void

Run `fn` as the scene `id` (registered scenes go through M.play).

argtypedescription
idstring
fn(...any

play(id: string, ...: any) → boolean

argtypedescription
idstring
...any

abort( ) → void

Emergency stop for tests: drops the hold, input, camera and actors.

say(who: string, body: string, mood: string?) → void

argtypedescription
whostring
bodystring
moodstring?

ask(who: string, body: string, replies: { string }, mood: string?) → number

argtypedescription
whostring
bodystring
replies{ string }
moodstring?

lines(seq: { any }) → void

A content.module-style sequence: lines, replies, set/unset/objective nodes.

argtypedescription
seq{ any }

endLines( ) → void

ameliaFrames(dir: string) → void

argtypedescription
dirstring

setAmeliaFrame(dir: string, i: number) → void

argtypedescription
dirstring
inumber

walkNow(name: string, x: number, z: number, speed: number?, area: string?) → void

argtypedescription
namestring
xnumber
znumber
speednumber?
areastring?

walk(name: string, x: number, z: number, speed: number?, area: string?) → void

argtypedescription
namestring
xnumber
znumber
speednumber?
areastring?

walkAsync(name: string, x: number, z: number, speed: number?, area: string?) → void

argtypedescription
namestring
xnumber
znumber
speednumber?
areastring?

place(name: string, x: number, z: number, area: string?) → void

argtypedescription
namestring
xnumber
znumber
areastring?

face(dir: string) → void

Turn Amelia toward "n" | "s" | "e" | "w".

argtypedescription
dirstring

wait(seconds: number) → void

argtypedescription
secondsnumber

focus(name: string) → void

argtypedescription
namestring

focusAt(x: number, z: number, area: string?) → void

argtypedescription
xnumber
znumber
areastring?

unfocus( ) → void

fade(toBlack: boolean, seconds: number?, kind: string?) → void

argtypedescription
toBlackboolean
secondsnumber?
kindstring?

setFlag(name: string, value: any?) → void

argtypedescription
namestring
valueany?

objective(text: string?) → void

argtypedescription
textstring?

joinParty(id: string) → void

The HUD toasts "<Name> joined the party!" itself on "partyChanged".

argtypedescription
idstring

restoreParty( ) → void

Everyone back to full HP / SP (keeps levels and exp).

battle(pool: { string }, opts: any?) → string

argtypedescription
pool{ string }
optsany?

travel(area: string, spawn: string?) → void

argtypedescription
areastring
spawnstring?

sfx(name: string) → void

argtypedescription
namestring

music(track: string) → void

argtypedescription
trackstring

toast(msg: string, icon: string?) → void

argtypedescription
msgstring
iconstring?

actor(key: string, material: any, x: number, z: number, height: number, area: string?, opts: any?) → any

argtypedescription
keystring
materialany
xnumber
znumber
heightnumber
areastring?
optsany?

removeActor(key: string) → void

argtypedescription
keystring

vanish(key: string, seconds: number?) → void

Thin the actor's card down to nothing over `seconds` (a vanishing).

argtypedescription
keystring
secondsnumber?

setActive(name: string, on: boolean) → void

argtypedescription
namestring
onboolean

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.

118+items
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# battle Persona-style turn-based combat for Amelia (HD-2D, storybook crimson/ink/parchment/gold palette). ```lua local Battle = require("game.battle.battle") Battle.wireEvents() -- once at play start: Events "encounter"(pool, opts) -> start, then Areas.grace(4) Battle.start({ "bramblewisp", "mossback" }, function(result) end) -- "win" | "lose" | "flee" Battle.start({ "frostling", "rime_wolf" }, cb, { arena = "snow" }) Battle.start({ "hush_warden" }, cb, { arena = "forest_hush", boss = true }) Battle.isActive() Battle.stop() -- abort, no onEnd / battleEnd Battle.resetParty() -- every member back to level 1, full HP/SP (in State) ``` opts: `arena` = "forest" | "forest_hush" | "snow" (default: "snow" when State.area() is rimecrest, else "forest"; a boss id forces "forest_hush"), `boss` (boss camera + no escape; implied by a boss id), `noEscape`, `music` (track override). State: party = `State.party()` (1-3 members, layout adapts), stats in `State.member(id)` = {level, exp, hp, sp}; gold `State.addGold`, drops `State.addItem`, battle items consume `State` items (honey_tonic, moon_dew, wakebell, storm_jar). Events emitted: `battleStart`(pool), `battleEnd`(result, pool), `music`("battle" | "boss" | "victory", then the area's music), `sfx`(name): battle_start, hit, weak, crit, null, ko, one_more, all_down, all_out, finish, victory, levelup, defeat, menu_move, menu_confirm, menu_back, menu_denied, heal, guard, cast, flee, silence, summon, boss_roar, boss_phase, boss_defeat. Boss `hush_warden`: phase 1 weak Light / null Shade; at 50% HP phase 2 (sprite rekindles, weak Flame / resist Light / null Shade, acts twice, casts Silence = skills sealed 2 turns, summons 2 Gloomcaps). Rimecrest foes: `frostling` (weak Flame, null Frost), `rime_wolf` (weak Bolt, resists Gale & Frost). The arena spawns at x=1000 (`game.battle.arena`), with its own camera (`BattleCamera`, priority 20). Themed arenas may retint Sun/Ambient/HeightFog and restore them on cleanup. Input: `game.input.battle` inputMap (group `battle`, suppresses `player`). UI screens: `battle_hud`, `battle_pop`, `battle_flash`, `battle_splash`. Debug: `Battle.debug.auto`, `.press(name)`, `.speed`, `.log`, `.info()`, `.hurt(frac)` (sets every foe's HP to frac of max). Siblings: `data` (stats/skills/items/foes), `arena` (dioramas, sprites, camera rig, projection), `vfx` (spell effects), `ui` (widget trees), `tools/cut.luau` (sprite-sheet cutter; `clear = {{x0,y0,x1,y1}}` drops rects).
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# kit <!-- 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.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◇
component · born here
❒asset
# DioramaCamera <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. --> TODO: describe this component.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# 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.
▲ 0↑ born
▣
module · born here
❒asset
# areas <!-- 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.
▲ 0↑ born
▣
module · born here
❒asset
# data <!-- 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.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# hud <!-- 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.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# chapter1 <!-- 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.
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
◐
material · born here
❒asset
▲ 0↑ born
▣
module · born here
❒asset
# state <!-- 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.
▲ 0↑ born
·
inputmap · born here
❒asset
# dialogue inputMap Controls while a conversation is open: `advance` (E / Enter / Space, pad South, touch "Next"), `up` / `down` (arrows / W S, d-pad, touch ▲ ▼) to move the reply cursor. Group `ui`, suppresses `player` — Amelia stops walking while it is live. Activated and released by `game.story.StoryDirector`.
▲ 0↑ born
▣
module · born here
❒asset
# fader <!-- 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.
▲ 0↑ born
▣
module · born here
❒asset
# events <!-- 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.
▲ 0↑ born
·
inputbinding · born here
❒asset
# advance <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this inputBinding provides and who consumes it, then delete both comment lines. --> TODO: describe this inputBinding.
▲ 0↑ born
·
inputbinding · born here
❒asset
# down <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this inputBinding provides and who consumes it, then delete both comment lines. --> TODO: describe this inputBinding.
▲ 0↑ born
·
inputbinding · born here
❒asset
# up <!-- zero:scaffolded-readme --> <!-- Replace the line below with what this inputBinding provides and who consumes it, then delete both comment lines. --> TODO: describe this inputBinding.
▲ 0↑ born
backing path · game/story/cutscene.module

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported on this asset or on the parts this page shows. Parts it leaves out are not counted here.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ 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".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.