mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #6771] [MERGED] feat(game): rulesets describe items: an items block and catalogs of items #7322
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#7322
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6771
Author: @kolacheee
Created: 9/27/2026
Status: ✅ Merged
Merged: 9/27/2026
Merged by: @kolacheee
Base:
staging← Head:feat/ruleset-items-format📝 Commits (3)
a7d908cfeat(game): rulesets describe items: an items block and catalogs of items2a2ba89Merge remote-tracking branch 'origin/staging' into feat/ruleset-items-format8d8d4b4docs(rulesets): the guide's items block declares what its hunting bow uses📊 Changes
20 files changed (+2152 additions, -45 deletions)
View changed files
📝
CHANGELOG.md(+2 -0)📝
docs/development/game-rulesets-and-sheets-implementation.md(+32 -0)📝
docs/examples/rulesets/ember-roads.json(+144 -0)📝
docs/examples/rulesets/gravewatch.json(+131 -0)📝
docs/extending/ruleset.schema.json(+845 -2)📝
docs/extending/writing-rulesets.md(+118 -3)📝
packages/server/src/services/capability-packages/package-manager.service.ts(+14 -0)📝
packages/server/src/services/game/gm-prompts.ts(+4 -4)📝
packages/shared/src/schemas/capability-package.schema.ts(+6 -1)📝
packages/shared/src/schemas/ruleset.schema.ts(+236 -19)📝
scripts/generate-ruleset-schema.mjs(+12 -7)📝
scripts/regressions/capability-package-lifecycle.regression.ts(+4 -4)📝
scripts/regressions/game-ruleset-catalogs.regression.ts(+6 -3)📝
scripts/regressions/game-ruleset-combat-core.regression.ts(+3 -0)📝
scripts/regressions/game-ruleset-combat-creature-sheets.regression.ts(+3 -0)📝
scripts/regressions/game-ruleset-combat-creatures.regression.ts(+5 -2)📝
scripts/regressions/game-ruleset-dice-pool.regression.ts(+3 -0)➕
scripts/regressions/game-ruleset-items.regression.ts(+578 -0)📝
scripts/regressions/game-ruleset-layers.regression.ts(+3 -0)📝
scripts/regressions/game-ruleset-wound-tracks.regression.ts(+3 -0)📄 Description
Linked issue
Closes #6765
Why this change
A ruleset cannot describe items today. Armor, weapons, potions, gear and money can only be typed in as rows of a sheet list, which belong to one character and which Game Mode's inventory knows nothing about. So a 5e game has no Padded Armor with an Armor Class, a weight and a rarity, and a V20 game has no pistol with its range and clip.
This is slice I1 of the ruleset items plan: the data an item carries, and the words a ruleset declares for its items. It is data only. The inventory, the sheet and fights read it in the slices after it. Keys that make an item do something (worn effects, attacks, use, charges, rarity caps, loot tables) arrive with the slice that acts on them, so a ruleset never declares one the Engine ignores.
What changed
Capability API 1.49.
itemsblock declares what every item is written in:categories(at least one),rarities,tags;stats, declared exactly like list columns, withpromptVisiblefor what the Game Master sees;slotswith counts, andbinding(a label and a maximum read off the sheet, such as attunement 3);carry: the weight stat, what a character carries before being encumbered, and the most they can carry, both read off the sheet;currencies: families of coins that change into each other by value. Two families never do;native(defaulttrue) andfreeform("plain"or"refuse").holds: "items". It declares nofeedsand needs theitemsblock. Each entry carries anitem: category, rarity, tags, stat values, slots,stack,costandbinds. An entry now has exactly one ofrows,creatureoritem, and an item carries nomechanics.carry;op="use"line is now taught only for a catalog of rows. It used to be taught for any catalog that was not a bestiary, which would have included item catalogs.feeds.loadderived value and pays in two families, coin and salt.holdsand capability notes there, the implementation record, and the CHANGELOG.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Run by the agent on this branch's one commit on staging
aa3cceabf:pnpm checkexits 0.pnpm regression:nodepasses 412/412.pnpm smoke:uipasses 7/7.pnpm regression:ui e2e/ruleset-wound-sheet.e2e.ts e2e/game-combat-director.e2e.ts e2e/ruleset-live-states.e2e.ts e2e/ruleset-sheet-sections.e2e.ts --project=desktop-chromium --workers=1passes 12/12. These are the browser specs that load the example rulesets.pnpm ruleset:schema -- --checkreports the schema up to date.The new lane
scripts/regressions/game-ruleset-items.regression.tscovers:perWeightwithoutcarry;useline;Thirty-nine deliberate breaks of these rules, in the schema, the install gate and the prompt, were each caught.
Local CodeRabbit (
coderabbit review --agent --base staging), two passes, 2 and 0 findings. Both were in the new lane and both were fixed: a missing 1.49 acceptance beside a 1.48 refusal, and two non-null assertions ahead of theassert.okthat narrows them.Still to verify by hand (not done by the agent):
docs/examples/rulesets/ember-roads.jsonandgravewatch.jsonthrough Rules, and confirm both import without issues."slots": { "hands": 3 }) and confirm the import names the line.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)Docs touched:
docs/extending/writing-rulesets.md(carried bydocs-i18n),docs/development/game-rulesets-and-sheets-implementation.md, the two example rulesets, the generateddocs/extending/ruleset.schema.json, andCHANGELOG.md. Translations are batched for the items arc: this section joins the batched[docs-i18n]issue opened after the arc's last slice, so no per-PR issue is opened.UI evidence (if applicable)
None: no screen changes. The only visible change is the new Load value on an Ember Roads sheet.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.