rsek / datasworn

The successor to the original Datasworn repository and Dataforged package, which provide game rules from the Ironsworn and Ironsworn: Starforged TTRPGs in JSON.
https://ko-fi.com/r_sek
125 stars 29 forks source link

Add `tags` property to `Rules` objects like `SpecialTrackRule` #75

Open rsek opened 2 days ago

rsek commented 2 days ago

SpecialTrack often implies some kind of specialized behaviour. Datasworn currently doesn't describe such behaviour at all, making it less useful for describing hacks.

The problem with describing this in a constrained way (e.g. an enum of pre-set methods defined in the Datasworn schema) is that hacks, by their nature, are likely to do something different. It's not practical to add a method to the main schema for every hack.

The problem with describing this in an unconstrained way is that now we're describing mathematical functions in JSON, and I'm uneasy about opening that can of worms. In this context I think the best description of a function is the function itself -- in other words, actual code.

I think the ideal solution would involve including some kind of reference implementation (e.g. a web component) of the SpecialTrack in a Datasworn package subdirectory; the JSON definition would then identify this + provide an embedded schema for values the component exposes.

In the mean time, adding tags would at least make it possible to describe special track behaviour in an ad-hoc way.

rsek commented 2 days ago

example usage: tags.starforged.legacy_track_xp, accepts a boolean value. applies to all Starforged legacy tracks. other RulesPackages could use it and it'd be pretty clear what they're referring to, even in isolation.