Add named world truth groups - #19
Conversation
|
Published experimental packages for b9bd274. npm i @datasworn-community/core@0.2.9-experimental.19.b9bd274b7db5
npm i @datasworn-community/core@pr-19
npm i @datasworn-community/build-tools@0.2.9-experimental.19.b9bd274b7db5
npm i @datasworn-community/build-tools@pr-19The |
Release policy needs a labelSchema-sensitive changes require exactly one of release:minor-schema, release:major-schema, release:patch, release:none; found none This PR touches schema-sensitive paths, so CI needs exactly one release intent label:
Current release labels: none Schema-sensitive files:
If this should ship a new core/build-tools package without changing the active schema line, use |
47586f5 to
0c16edf
Compare
|
Since I had a few comments, this looks good to me, but I think someone with more history/experience and stronger opinions on schema changes should still take a look and give approval then. |
|
Thank you for the comments! |
|
Coming at this from the perspective of a downstream fork operator (tbsvttr/datasworn) — the design reads well and the test coverage is more thorough than most schema PRs get (7 focused cases, including duplicate rejection, empty-array rejection, cross-package resolution, and unresolved-reference rejection). Non-blocking notes to consider before landing the 0.3.0 bump:
The |
|
I don't think I want to prevent display name collisions. Its not a concern for the vast majority of players, and something consuming apps can resolve fairly easily by including the ruleset name the world came from in the picker. If two worlds within the same ruleset have the same display name, that's on the author to fix. Good call on the world key. This is kinda making me rethink giving these an ID, so that a playset with I don't think they need the experimental release stage. This is all kinda experimental yet, but I think this shape is solid enough that I'm not concerned. Worlds should absolutely be opt-in. I should add some docs here as well, but the idea is that if there is no |
|
Thanks for engaging on all four — good calls across the board. Agree on 1, 3, 4. The name-uniqueness enforcement was overweighting a rare edge case; apps really can resolve it in the picker. The experimental marker's yours to skip since you feel the shape's stable. And the "no On #2 — adding Trade-off worth naming before you commit though: adding the ID quietly signals to future contributors that worlds are a first-class citizen — the kind of thing content can reference outward. Right now nothing points at a world from a move or oracle or asset. If someone shows up in six months proposing "let me tag a move with Cheapest way to keep the win without opening that door: add the ID, keep the world node's shape minimal ( Either direction (with or without ID) is defensible — just wanted the shape shift to be a conscious choice. |
|
Thinking on this again, I think keeping the ID off to start with might be the better move, because it allows storing the reference in a backwards compatible way. For example, if I have Starforged and Sundered Isles active, without worlds, I might just store the package key |
|
Agreed, and I think this lands in the right place — the composite key is a better fit than the ID for a reason worth making explicit. The disambiguation win isn't lost. The thing that made you reconsider in the first place was The fallback becomes one code path, which is the real payoff. You noted earlier that a package with truths but no It also matches existing schema precedent. And it's the reversible direction. Adding One thing worth folding into the docs you mentioned: with the ID gone, the reference shape is a consumer convention that the schema no longer expresses. If it stays undocumented, every app invents its own encoding and they won't interop — which matters as soon as two tools try to read the same saved character. Suggest documenting the three rules as one model, since they're the same rule seen from different angles:
The ID decision itself needs no change to the branch — Edit: I went through the rest of the PR to see whether it's ready to approve. The design and tests look good to me — on a trial merge all 23 tests pass, 1. The generated schema goes stale on merge — worth a regen before landing. The branch is 14 commits behind It merges cleanly textually and CI is green here — the branch is self-consistent on its own — so this only shows up once the two meet. I ran a local trial merge of
"title": "World",
"type": "object",
+"required": ["name", "truths"],
"properties": { … }
-"required": ["name", "truths"]So merging as-is would leave 2. The 0.3.0 bump needs a rollout order. This moves
Neither is a design objection — happy to approve once the regen is in, and glad to do the python-bindings regen against |
0c16edf to
b9bd274
Compare
This MR adds a new, optional, top level
worldsobject to rulesets and expansions. The goal of worlds is twofold -The new top level worlds package allows for multiple worlds, and each world contains a name and a list of truth ids. This keeps truths backwards compatible, because nothing changes in that definition, while allowing progressive enhancement for apps that choose to utilize this new feature.
Once packages & consumers update, I'd encourage storing the key of this world to determine which world a player is using. This world key can then be used to edit the experience in worlds - for example, determining whether or not to show "Sectors" if "The Forge" is our active world. This also allows for combining things like Ironsworn and Starforged - we can have both rulesets active, and have the user tell us which truths & world they would like to use.