Music and sound
Lives in: audio/bgm/ and audio/sfx/
Music beds and one-shot effects during the story. Title defaults and UI clicks live in game.json — Music and sounds by default. Folders: Pictures, sound, and folders.
Names and formats
| On disk | In the story |
|---|---|
audio/bgm/theme.ogg | [bgm theme] |
audio/sfx/door.mp3 | [sfx door] |
Formats: .ogg or .mp3. Use the name without the extension.
Music
[bgm theme]
[bgm theme fadein 1.5]
[bgm stop]
As data:
{ "type": "bgm", "value": "theme", "volume": 0.7, "fadein": 1.0 }
{ "type": "bgm", "value": null, "fadeout": 1.0 }
| Key | Effect |
|---|---|
value | Track name; null / stop clears |
volume | Loudness 0–1 |
fadein / fadeout | Seconds |
fadein_from / fadeout_to | Volume fractions at the ends of the fade |
Playing the same track again does not restart it (volume can still update). Different track with both fade-in and fade-out → crossfade.
Title screen music uses sounds.main_bgm* in game.json, not these command defaults.
Sound effects
[sfx door]
{ "type": "sfx", "value": "door" }
One-shot. Optional volume and similar fields exist in data form. Button clicks and typing beeps are separate defaults under sounds — Text speed and voice beeps.
On a moment vs on a button
| Where | Typical use |
|---|---|
| Script / moment commands | Story stings, room ambience changes |
game.json → sounds | Title BGM, UI click / hover, typing beep |
| Screen / choice packs | Per-button overrides when you customise menus |
Usually you need
| Want | Write |
|---|---|
| Start music | [bgm theme fadein 1.5] |
| Stop music | [bgm stop] |
| Door sting | [sfx door] |
Next
Look of the dialogue box and menus: Theme and the dialogue box. Or directing heavy staging: When the script is not enough.