main
Aiming maluses now match p.70 (head/arm -20, hand -10, chest/ abdomen/leg -50) and aimed shots hit the aimed location; generic limb aims expand to a random left/right key so they resolve in the actor's hit-location schema. Fix the opposed-roll comparison reading degrees from the wrong path (first roller always won), allow untrained weapon use per p.58 (0% base, only 01 succeeds), and re-roll initiative each round with the matrix turns rebuilt (p.62). Defence per p.69: dodge offered against melee only, parry prefers the attacker's weapon skill and applies the shield's AP one-shot on a successful parry, persisted on the attack message flag so any client rolling damage sees it. Melee damage gains +1 per degree of success alongside the existing +1 penetration. Also add AGENTS.md with repo conventions and commands.
Dark Stars RPG for Foundry VTT
A system for playing the Dark Stars space-punk RPG (by Morgan Lean & Matthew Corrin) on Foundry VTT.
- System ID:
fvtt-dark-stars - Foundry VTT compatibility: 14 (verified on 14.368)
- Author: Uberwald (LeRatierBretonnien)
- Manifest: https://www.uberwald.me/gitea/uberwald/fvtt-dark-stars/raw/branch/main/system.json
Features
- Character and NPC sheets (ApplicationV2) with the full attribute set (STR, DEX, CON, SIZ, ATT, INT, EDU, CHA, EMP, Self-Control), all derived statistics computed per the rulebook (CSB, ASB, SSB, MSB, PSB, EGO, HUP, SS, MCDB, SI), hit points, fatigue points, per-location hit points and encumbrance.
- Data-driven models: every document type is a
TypeDataModelwith strict schemas and ProseMirror-enriched description fields. - Full item types: skills, perks, abilities, weapons (with ammunition links), armor (per-location protection, force fields, shield flag), equipment (with containers), money, cybernetics, genetics, psychic powers, spells and extended (cumulative) tests.
- Roll engine: d100 roll-under with special success (01 always special), fumble on 100, degrees of success, aiming and range modifiers per the rulebook; d10 attribute checks; Self-Control x 5 saves; live-updating roll dialog; reroll charges; opposed rolls; extended tests.
- Combat: initiative is one d6 per point of SI, with additional turns every 5 points down the initiative matrix (duplicated combatants), cleaned up each round.
- Chat commands:
/rtarget(weapon attack against the targeted token) and/rsave(Self-Control x 5 save). - Hotbar: drag a weapon or skill onto the hotbar to create a roll macro.
Compendium packs
| Pack | Type | Content |
|---|---|---|
| Conditions | Items | Status conditions |
| Currency | Items | Money |
| The Sprawl | Items | The Sprawl setting content |
| Darkstars-SF | Items | Dark Stars sci-fi content |
| Aldebaran | Items | Aldebaran setting content |
| Beyond the Black Sea | Items | Beyond the Black Sea setting content |
| Nightborough | Items | Nightborough setting content |
| Tables | RollTables | Roll tables |
Installation
- In Foundry VTT, open Configuration and Setup > Game Systems > Install System.
- Paste the manifest URL above and click Install.
Development
Clone the repository into your Data/systems/fvtt-dark-stars folder (or symlink it):
git clone https://www.uberwald.me/gitea/uberwald/fvtt-dark-stars.git
npm install # tooling (gulp, less, eslint)
npx gulp css # compile styles/*.less -> css/fvtt-dark-stars.css
npx gulp # compile + watch
npm run lint # eslint
node tools/release-package.mjs # build the release zip (checks version)
Regression smoke suite
The migration is covered by a re-runnable smoke suite. In the Foundry console (as GM):
const r = await game.system.api.runSmoke() // => { pass: true, results: [...] }
It re-runs the roll-math unit tests, the legacy v12 data migration simulation and a load of every compendium pack.
Troubleshooting
- Console error in
CombatTracker._onRender("Cannot use 'in' operator to search for 'turn'") — a Foundry core bug (v14.358/368, unguardedArray.findresult) triggered when a combat update does not concern the tracker's viewed combat. It is caught by the core renderer and does not affect the combat tracker or the system.
Architecture
fvtt-dark-stars.mjs entrypoint: CONFIG wiring, sheets, hooks
module/config/system.mjs SYSTEM constants (globalThis.SYSTEM)
module/models/ TypeDataModels (2 actor + 13 item types)
module/documents/ Actor, Item, Combat, Roll, ChatMessage
module/applications/ ApplicationV2 sheets + roll dialog
module/commands.mjs /rtarget, /rsave
module/hotbar.mjs, module/socket.mjs, module/utils.mjs
templates/*.hbs flat, PARTS-based templates
styles/*.less -> css/ LESS, compiled by gulp
lang/en.json full i18n (TYPES, FIELDS via prefixes, labels)
Field names are kept identical to the legacy v12 template.json — existing
worlds and compendium packs migrate without data conversion.
Credits
- System development: Uberwald (LeRatierBretonnien)
- Dark Stars RPG by Morgan Lean & Matthew Corrin; all game terms and content remain the property of their respective owners.
License
See LICENSE.txt.