DAI 3.0 · STEP-BY-STEP
Sounds & Music
Create event-driven sound and music customization tied to gameplay phases and locations.
What you are building
Primary path:
Create event-driven sound and music customization tied to gameplay phases and locations.
data/<namespace>/dai_sounds/ + dai_music/Create event-driven sound and music customization tied to gameplay phases and locations.
Step-by-step
- Define one cueChoose a specific gameplay moment: weapon fire, room clear, boss start, ship alarm.
- Register or map the soundKeep IDs stable and separate ambience/music from one-shot effects.
- Trigger from authoritative phase changesDo not poll every tick when a one-time state transition is available.
- Handle stop/replace rulesMusic must stop when leaving the scene or entering a higher-priority state.
- Test volume overlapTrigger rapid events and verify audio does not stack uncontrollably.
Definition of done
- The feature still works after save/reload.
- Server state is authoritative; presentation mirrors it.
- Invalid input cannot duplicate rewards or bypass costs.
- Two players can use the system without sharing unintended temporary state.
- Any optional resource pack can be disabled without breaking datapack logic.
Next integration
Once this feature works alone, connect it to a complete loop instead of adding more isolated content. Use the complete-game tracks to see where it belongs in ACMS, Space Between Blocks, MineTrigger or Hollow Spiral.