40kdc-data
A community-authored Warhammer 40K data layer.
Source on GitHub ↗
JSON Schemas for every game entity, plus an embedded dataset shipped
behind a linked, typed API in the @alpaca-software/40kdc-data
npm package, the wh40kdc Rust crate, the
wh40kdc Python package, and the wh40kdc
Go module. Includes ListForge and NewRecruit roster importers and
exporters that mirror byte-for-byte across all four implementations.
The package is the load-bearing artifact; everything else on this page is documentation or a demo built on top of it.
Reference
TypeScript API
TypeDoc reference for the @alpaca-software/40kdc-data
npm package — every exported type, view, and resolver.
Rust API
docs.rs reference for the wh40kdc crate — the same
linked Dataset API, importers, and exporters for Rust.
Python package
The wh40kdc package on PyPI — the same embedded
dataset behind a linked Dataset API, all importers and exporters,
the cruncher, and a validator for Python.
Go module
The wh40kdc Go module on pkg.go.dev — the same
embedded dataset behind a linked Dataset API, all importers and
exporters, the cruncher, and a validator for Go.
Toollets
List Builder
Build a Warhammer 40K army list: pick a faction and detachment, add units with their wargear and enhancements, and track your points against the limit — then export to ListForge or NewRecruit. Showcases the linked dataset API and the roster exporters.
Salvo
A 40k damage calculator. Pick a unit, a phase, the abilities you want to apply, and a target — see expected hits, wounds, saves, and models killed. Showcases the cruncher and abilities-resolver APIs.
Mission Matrix
Pick your Force Disposition and your opponent's to reveal the asymmetric primary-mission matchup for 11th-edition play. Showcases the linked dataset API — dispositions to matchups to missions to scoring cards.
Teams Planner
Plan a 40K team event: enter each player's factions (optionally narrowed to specific detachments) and see a coverage grid that flags any Force Disposition no one can field. Saves to your browser and packs the whole plan into a share link. Showcases the linked dataset API — factions to detachments to dispositions.
Layout Editor
Author a terrain layout on a portrait board: drag pieces from the template catalog, rotate and flip them on-canvas, and let 180°-symmetric twinning mirror every placement across the board centre. Transcribe a reference card's edge measurements to back-solve a piece's centroid. Showcases the terrain resolver and the card-measurement solver; exports canonical terrain-layout JSON.
Hull Tracer
Trace a model's collision hull from a top-down photo and export a geometry-only hull-shape — the 2D polygon a vehicle uses instead of a round base. Calibrate the scale, click the outline, and download JSON to tag onto a model. Your image stays in your browser; only the polygon is exported.
Data Explorer
Browse the embedded dataset as Wahapedia-style datacards — stat lines, weapon tables, and abilities. A roundtrip view sets each ability's source rule beside its community DSL and the description that DSL generates, so you can flag mismatches and export notes for fixing. Showcases the linked dataset API and the DSL describer.
Ecosystem
Shadowboxing ↗
A browser-based Warhammer 40K game board and post-game review tool: measure, move, draw, snapshot the timeline, and rewind. Annotation- first rather than rules-enforcing, with army-list import and an OBS overlay for streaming.
Army Assist ↗
A mid-game rules reference for the table: import a list and get per-phase unit cards, stratagems, and army rules, optimised for your phone during a game.