Conductor
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->
Conductor
<!-- 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.
Interface
What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.
conforms to
zero/source-extract/v2Conductor — the audio slice's one moving part. It stands on the `Ambience` anchor, owns every emitter under it, answers the `playSfx` / `playBark` / `playMusic` signals for the whole game, and rides `state.blightShare` so the score sours as the blight takes the floor. Nothing here changes game state, and nothing here is on a clock: the only things that move on their own are volumes easing toward their targets and a caption fading out, which are cosmetic.
clip(name: string) → any
Every clip is reached through `game.audio.clips`, which names each asset with a literal. A component may not resolve an asset from a computed name. Guarded because a hot reload can run this component's `awake` in the window where the clips module is mid-reload and `Clips` is still nil.
| arg | type | description |
|---|---|---|
| name | string |
voiceClip(key: string) → any
| arg | type | description |
|---|---|---|
| key | string |
buildEmitters( ) → any
Re-derived from the world every wake rather than remembered in a local, so a hot reload cannot leave a second set of sources playing over the first.
seconds(c: any) → number
How long a clip actually runs, read once off its own payload. A one-shot source is reaped by age, so guessing this wrong either cuts a line off or leaves dead entities under the anchor.
| arg | type | description |
|---|---|---|
| c | any |
reapAll( ) → void
fireShot(c: any, at: { number }?, volume: number, seconds: number) → void
| arg | type | description |
|---|---|---|
| c | any | |
| at | { number }? | |
| volume | number | |
| seconds | number |
reapShots(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
audioOf(name: string) → any
| arg | type | description |
|---|---|---|
| name | string |
showCaption(speaker: string, text: string, tint: { number }, spoken: boolean, hold: number?) → void
| arg | type | description |
|---|---|---|
| speaker | string | |
| text | string | |
| tint | { number } | |
| spoken | boolean | |
| hold | number? |
hideCaption( ) → void
playSfx(name: string, at: { number }?, volume: number?) → void
--!desc Play a published sound effect by name, optionally at a board position. --!arg name One of Mixer.SFX_NAMES. --!arg at Optional world position {x, y, z} for a spatial one-shot. --!arg volume Optional gain multiplier, default 1. --!example conductor:playSfx("ui_click")
| arg | type | description |
|---|---|---|
| name | string | |
| at | { number }? | |
| volume | number? |
speak(key: string, speaker: string, text: string, tint: { number }?) → void
--!desc Speak a cached line and put its written form on screen. --!arg key A line key from game.audio.lines. --!arg speaker The name shown above the line. --!arg text The words, verbatim. --!arg tint The speaker's identifying colour. --!example conductor:speak("title", "The Cloister", Lines.NARRATION.title.text, {0.8,0.7,0.3})
| arg | type | description |
|---|---|---|
| key | string | |
| speaker | string | |
| text | string | |
| tint | { number }? |
playBark(unit: string, event: string) → void
--!desc Have a monk say one of their lines, aloud and in writing. --!arg unit A monk id. --!arg event "move", "attack", "kill", "wound" or "death". --!example conductor:playBark("vespera", "attack")
| arg | type | description |
|---|---|---|
| unit | string | |
| event | string |
narrate(key: string) → void
--!desc Say one of the narrator's lines, aloud and in writing. --!arg key A key of Lines.NARRATION. --!example conductor:narrate("brief_heart_chamber")
| arg | type | description |
|---|---|---|
| key | string |
playMusic(cue: string) → void
--!desc Set the music cue. The blight bends whatever cue is running. --!arg cue A key of Mixer.CUES. --!example conductor:playMusic("tension")
| arg | type | description |
|---|---|---|
| cue | string |
setBlight(share: number) → void
--!desc Tell the score how much of the board the blight holds. --!arg share 0..1. --!example conductor:setBlight(0.5)
| arg | type | description |
|---|---|---|
| share | number |
mix( ) → any
--!desc The mix, as one readable table — for verification from anywhere. --!return A table of the current cue, share, layer levels and last sounds. --!example local m = conductor:mix()
unit(payload: any) → string
| arg | type | description |
|---|---|---|
| payload | any |
monkOf(id: string?) → string
A unit id is not necessarily a monk id; the barks only exist for the four.
| arg | type | description |
|---|---|---|
| id | string? |
tileAt(payload: any) → void
| arg | type | description |
|---|---|---|
| payload | any |
wire(self: any) → void
| arg | type | description |
|---|---|---|
| self | any |
on(name: string, fn: (any) → void
| arg | type | description |
|---|---|---|
| name | string | |
| fn | (any |
awake( ) → void
applyLevels( ) → void
step(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
update(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
editorUpdate(dt: number) → void
| arg | type | description |
|---|---|---|
| dt | number |
onDestroy( ) → void
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.