Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose RulesPackageBuilder class in @datasworn/core #56

Open
3 tasks
rsek opened this issue Jun 20, 2024 · 0 comments
Open
3 tasks

Expose RulesPackageBuilder class in @datasworn/core #56

rsek opened this issue Jun 20, 2024 · 0 comments
Milestone

Comments

@rsek
Copy link
Owner

rsek commented Jun 20, 2024

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
@rsek rsek added this to the v0.1.0 milestone Jun 20, 2024
@rsek rsek changed the title Expose RulesPackageBuilder class Expose RulesPackageBuilder class in @datasworn/core Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant