bake
<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this module provides and who consumes it, then delete both comment lines. -->
bake
<!-- 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/v2bake — how the clip library under game/audio/clips is made. Run from a tool (an `execute`, the shell), NEVER from a component: an asset created on the gameplay path is filed in the ephemeral `/runtime/assets` store and re-made on every load, which would re-buy the Old Keeper's voice out of the run's credit each time the world opened. Run from a tool the same calls write `/source/game/audio/clips/*.soundClip`, which is what ships. local Bake = require("game.audio.bake") Bake.synth() -- the synthesised clips (free, always works) Bake.speech() -- the Old Keeper's lines (2 credits each) Bake.effects() -- the generated sfx and music Every entry point is idempotent: a clip already on disk is left alone unless `force` is passed, so a re-run costs nothing and spends nothing.
has(name: string) → boolean
| arg | type | description |
|---|---|---|
| name | string |
write(name: string, pcm: any, rate: number, channels: number, settings: { [string]: any }) → void
| arg | type | description |
|---|---|---|
| name | string | |
| pcm | any | |
| rate | number | |
| channels | number | |
| settings | { [string]: any } |
describe(name: string) → void
What a written clip turned out to be, read back off its own payload.
| arg | type | description |
|---|---|---|
| name | string |
synth(only: { string }?, force: boolean?) → void
Build the synthesised clips. `only` restricts to a list of names.
| arg | type | description |
|---|---|---|
| only | { string }? | |
| force | boolean? |
service( ) → void
generate(op: string, input: { [string]: any }, timeout: number?) → void
Run one generation to completion and hand back the produced asset's PATH, or (nil, why). `timeout` is in seconds.
| arg | type | description |
|---|---|---|
| op | string | |
| input | { [string]: any } | |
| timeout | number? |
refile(name: string, srcPath: string, settings: { [string]: any }) → void
Take a generated clip's audio and re-file it under our own name and settings, so the library is one folder with one naming scheme and the looping material is PCM whatever the generator handed back. The produced asset is read by PATH rather than resolved by a computed identity, so nothing here records an unpinnable dependency.
| arg | type | description |
|---|---|---|
| name | string | |
| srcPath | string | |
| settings | { [string]: any } |
speech(keys: { string }?, force: boolean?) → void
The Old Keeper's readings. 2 credits a line. The words come from `FL.lines`; a line whose cached reading already says exactly what the line says now is skipped, so a re-run costs nothing and a rewritten line costs one generation. `keys` restricts it; `force` re-buys regardless.
| arg | type | description |
|---|---|---|
| keys | { string }? | |
| force | boolean? |
effects(only: { string }?) → void
Every call here SPENDS: a generated clip lands on the name a synthesised one already holds, so there is nothing on disk to tell the two apart and nothing to skip on. Call it deliberately, with `only` naming what to buy.
| arg | type | description |
|---|---|---|
| only | { string }? |
manifest( ) → void
Everything the game plays, and what each clip turned out to be.
Sub-parts
Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.
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.