Maplebirch Framework Skill
Estimated reading time: 4 minutesThis skill helps AI assistants build mods using maplebirchFramework for Degrees of Lewdity (DoL). The framework provides stable, additive interfaces for injecting content without modifying vanilla game files.
Trigger Scenarios
This skill activates automatically when you need to:
- Configure boot.json with maplebirchAddon
- Register named NPCs (appearance, stats, schedule, sidebar)
- Add combat action buttons
- Manage audio playback
- Register dynamic events (time/state/weather)
- Use language macros (
<<language>>,<<lanSwitch>>, etc.) - Register character rendering layers
- Use the tool collection (traits, location, bodywriting, foodstuff, antiques)
- Extend the module system
Quick Start
1. Create Mod Directory Structure
2. Write boot.json
3. Verify Framework Load
addonPlugin Parameters
See AddonPlugin System.
Core API Quick Reference
Module Access Paths
Services
Event System
Common events: :passagestart, :passageend, :storyready, :onSave, :onLoad, :language
Logging
See Core Services, Event Emitter, Module System.
NPC Registration
JS API
boot.json Declarative
See NPC Registration, NPC Stats, NPC Schedule, NPC Clothes.
Combat Actions
actionType: leftaction, rightaction, feetaction, mouthaction, penisaction, vaginaaction, anusaction, chestaction, thighaction
See Combat Actions.
Audio System
boot.json config: "audio": true (import audio/ directory) or "audio": ["bgm", "sfx"]
Supported formats: mp3, wav, ogg, m4a, flac, webm
See Audio Management.
Language Macros
Translation API: maplebirch.t(key) — lookup by key; maplebirch.auto(text) — reverse translation
See SugarCube Macro Extensions, Language Manager.
Variables Namespace
Game state stored at V.maplebirch:
Options at V.options.maplebirch (persists across saves).
Common Pitfalls
- Using
moduleinstead ofscript—moduleruns when the framework may not be fully initialized; usescriptunless necessary - Missing GameVersion dependency —
dependenceInfomust includeGameVersion >= 0.5.9.7 - Modifying
V.maplebirch.player.clothingdirectly — It's a read-only proxy ofV.worn; useV.wornto modify equipment - Calling framework APIs before Init — Use
maplebirch.on(":passagestart", ...)to ensure readiness - Circular module dependencies — ModuleSystem uses topological sort; circular dependencies are rejected at registration
- Audio files not in additionFile — Audio paths must be listed in
additionFilein boot.json
