Files
DeltaGreen/module/MODULES.md
T
2026-06-13 12:13:34 -07:00

6.5 KiB

Delta Green system — module/ layout

Entry point: deltagreen.js (registered in system.json).

Folder responsibilities

Path Purpose
config/ System constants (DG, skill list, template paths)
data/ TypeDataModels (actor/, item/, derived/)
active-effect/ Active effect metadata, data model, document class, runtime sync
profession/ Profession catalog, validation, character-creation math, deferred commit (commit-character-creation.js), Damaged Veteran modifiers (damaged-veteran-modifiers.js), disorder IDs (disorders.js)
roll/ Dice roll subclasses, roll pipeline, and roll UX. roll/roll.js is the public API. Internal Roll subclasses live in roll/classes/.
sheets/ ApplicationV2 sheets and mixins
applications/ Standalone dialogs, chargen orchestrator (profession-setup-flow.js), shared dialog UI (character-creation-ui.js), and dialog factory (dg-dialog.js)
actor/, item/ Document subclasses
chat/ Chat cards (dg-chat-card.js) and inline actions
integrations/ Optional module hooks (Dice So Nice)
utils/ Generic helpers only (Handlebars, migration, skill layout/tooltips)

Root-level modules: settings.js, templates.js.

Import conventions

Profession setup flow

profession-setup-flow.js orchestrates: Pick Statistics → Roll/Assign Stats → Character Creation → Damaged Veterans → (optional follow-ups) → commitProfessionSetup. Dialogs return { outcome: 'submitted' | 'back', ... } or null (window close aborts). Character Creation alone uses Cancel to abort the entire assignment.