The successor to the original Datasworn repository and Dataforged package, which provide game rules from the Ironsworn and Ironsworn: Starforged TTRPGs in JSON.
A RulesPackageBuilder instance assembles multiple DataswornSource.RulesPackage objects in to a single Datasworn.RulesPackage file. It does so by merging the objects and assigning IDs. It performs some validations that aren't possible with JSON schema.
Datasworn-specific validations
checks table row dice ranges for coherence against the dice property of their parent OracleRollable
when provided with an iterable of valid IDs, it checks all ID-type properties for validity, as well as any datasworn ID references made in markdown links or template macros
Notes
it does not handle read/write operations; if you want to build from JSON/YAML files, you'll need to load + deserialize them first
it must be provided with some external source of JSON schema validation for both the DataswornSource (incoming data) and Datasworn (outgoing data) schemata.
TODO
The coding side of this is mostly done, but there's some nontrivial documentation outstanding.
[ ] finishing JSdoc annotations for exposed methods/properties
[ ] provide example(s) of use
[ ] (optional) add validation of referenced stats in moves/assets
A
RulesPackageBuilder
instance assembles multipleDataswornSource.RulesPackage
objects in to a singleDatasworn.RulesPackage
file. It does so by merging the objects and assigning IDs. It performs some validations that aren't possible with JSON schema.Datasworn-specific validations
dice
property of their parentOracleRollable
Notes
DataswornSource
(incoming data) andDatasworn
(outgoing data) schemata.TODO
The coding side of this is mostly done, but there's some nontrivial documentation outstanding.