r/rpg_generators • u/Broad_Pirate12 • 16h ago
Generator I open-sourced the deterministic 5e rules engine behind my game
I open-sourced Nat20, the rules engine behind the game I am building.
It is a host-agnostic Python library for D&D 5e SRD 5.2. Combat, skill checks, saves, effects, and grid or zone-graph movement run without a game host, network connection, or database. The engine code is MIT. The bundled SRD dataset is CC-BY-4.0.
I split it out because I did not want an LLM, a browser app, or a virtual-tabletop runtime deciding the rules. The model can narrate a goblin slipping in the rain. Nat20 should still answer the same way about cover, spell slots, and Sneak Attack.
The repo includes a small local demo and a clean-install smoke test. It implements much of SRD 5.2, not all of it, so there is a capability matrix in the docs before anyone depends on a specific mechanic.
Source: https://github.com/tapestria/nat20
I would like feedback from people who have built on open game rules: what makes a rules library actually useful outside the game that created it?