Repository navigation
Development
Eric Teninty edited this page Dec 2, 2026
·
1 revision
| Part | Where | Committed? |
|---|---|---|
System code (TypeScript, bundled to dist/crawlspace.mjs) |
src/ |
Source only. dist/ is built. |
| Sheets, chat cards and dialogs |
templates/, styles/, lang/
|
Yes |
| Homebrew and rules compendiums |
packs-src/, compiled to packs/
|
JSON source only. The LevelDB packs are built. |
Game-database content module (crawlspace-content) |
Built by npm run packs:content
|
No. It holds book text. It is built and published from a separate private repository, never with the system. |
npm install
npm run build # dist/crawlspace.mjs
npm run packs # homebrew + action packs, and the content module (reads CrawlSpace's Postgres)
npm run link # junction into %LOCALAPPDATA%/FoundryVTT/Data-
Database URLs. The pack builders read them from CrawlSpace's
.env(../Dungeon Crawler Carl RPG/.env). PointCRAWLSPACE_ENVat another file to override it. -
No database?
npm run packs:homebrew -- --offlinecompiles the committedpacks-srcwithout one. - Locked packs. Stop Foundry, or close the world, before rebuilding packs: Foundry locks the LevelDB files.
-
Watching.
npm run watchrebuilds the bundle on save. Reload Foundry (F5) to pick it up. -
Checks.
npm testruns the rules tests;npm run typecheckchecks the TypeScript.
tests/foundry-time.mjs has integration checks for a disposable Foundry copy only. They create and delete their own documents. Never run them in a live campaign.
-
Effects are Active Effects.
- Plain bonuses use core
addchanges onsystem.*paths. - Rank, health-slot, percent, roll-mode, triggered and special bonuses use custom change types:
crawlspace.skillRank,crawlspace.spellRank,crawlspace.baseSkillRank,crawlspace.baseSpellRank,crawlspace.healthBonus,crawlspace.statPercent,crawlspace.modLoss,crawlspace.rollMode,crawlspace.triggeredandcrawlspace.special. - The effect sheet's rule elements write these. See Effects and Rules.
- Plain bonuses use core
- Debuffs replace core status effects.
-
Combat keeps Foundry's Combat document. Its phase state lives in
flags.crawlspace.phase, and "next turn" steps through the phases. - Damage and healing use chat-card buttons. Players apply damage to tokens they don't own through a socket relay to the active GM.
-
Personal Spaces are
personalSpaceactors holdingspaceUpgradeandcraftingTableitems. A crawler is in one whileflags.crawlspace.inPersonalSpaceholds the space's actor id. -
Crafting uses the
materialandcraftingTableitem types. Recipes are kept on the item they make; a crafted copy records where it came from inflags.crawlspace.craftedFrom. -
Quests and the leaderboard are world settings (
quests,leaderboard,population). A party title isflags.crawlspace.partyTitleon the crawler. -
Party membership is
flags.crawlspace.inPartyon crawlers. Other parties are thepartiesworld setting, and a crawler's other party isflags.crawlspace.partyId. -
Headshots are
flags.crawlspace.headshoton actors. -
Region journals are the journal page types
neighborhood,borough,city,province,countryandfloor. Items that open a document to whoever holds them list its UUID inflags.crawlspace.grants. -
Imports record
flags.crawlspace.importKey, so importing again updates documents in place. -
Rounding. All rules round down (
Math.floor).
-
Bump
versioninsystem.jsonandpackage.json. -
Set
downloadinsystem.jsonto.../releases/download/v<version>/system.zip. -
Commit, then push a matching tag:
git tag v0.9.7 git push origin main v0.9.7
The Release workflow (.github/workflows/release.yml) then:
- tests and builds the system;
- compiles the homebrew and action packs;
- runs
npm run release -- <tag>, which writesrelease/system.jsonandrelease/system.zip; - publishes them as a GitHub Release.
The tag must match system.json's version or packaging stops. The content module is never part of a release.
Foundry reads the manifest from releases/latest/download/system.json, so installed worlds see the new version as soon as the release is published.
To try a release locally:
npm run build && npm run packs:homebrew -- --offline && npm run packs:actions
npm run release -- v0.9.7Getting started
Playing
Running the game
- GM Guide
- Boss Battles
- Personal Spaces
- Gear Sets
- Atlas Journals
- Automation
- Effects and Rules
- Damage Formulas
Modules
Advanced