mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #6405] [Feature]: a ruleset catalog entry cannot change how a check is rolled, so charms that re-roll or add successes are flavour text #3583
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#3583
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?
Originally created by @kolacheee on GitHub (Sep 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6405
Originally assigned to: @kolacheee on GitHub.
The gap
A ruleset author can write a charm, a knack or a feat whose whole point is that it changes a check: "re-roll all 1s until none remain", "this check succeeds automatically", "add two dice to this one check", "count 9s as two successes this time". Today none of that can be said, and a contributor who writes it gets a row that costs a resource and changes nothing about the dice.
Three separate things stop it, and fixing any one alone is not enough:
rowsFromCatalogEntry(packages/shared/src/schemas/ruleset.schema.ts) copies a picked entry'srow.valuesplus the_catalogmarker.label,summaryandmechanicsstay in the catalog, so the sheet row is a name and nothing else.renderRulesetSheetBlock(packages/shared/src/features/rulesets/sheet-prompt.ts) prints only each row'snameColumn. An entry'ssummaryreaches exactly one place in the codebase,features/rulesets/combat-bridge.ts, which is the combat subsystem. No entry prose is in the non-combat prompt at all.mechanicscannot describe a check. Every key ofcatalogMechanicsSchemais combat shaped:kind(attack, heal, buff, debuff, utility),range,area,amount,damageType,attackRoll,save,cost,applies,budget. There is nothing about dice, thresholds or successes, and nothing in the skill-check path readsmechanicsat all.And the roll itself is the Engine's:
rollDicePoolCheckinpackages/shared/src/features/rulesets/sheet-math.tsthrows every die with a crypto RNG, andisRulesetRollableSkillCheckTagdeliberately ignores anydice=orresolution=the model wrote. That is the right design, and it is exactly why the rule has to be expressible as DATA rather than left to the model.What exists today, so nobody reimplements it
resolution.explodeadds a die on a HIGH face. It is not a re-roll and never replaces a face.resolution.situationalDiceplus the Game Master'sbonus=adds dice to one check, clamped to the declared range.[sheet: op="use" name="..."]already pays an entry'smechanics.cost, all or nothing. The spending half of this already works; only the effect is missing.docs/extending/writing-rulesets.mdalready says this out loud: "Two things this kind does not model are re-rolls bought with a resource and automatic successes."Suggested shape
A closed, neutral
mechanics.checkblock on a catalog entry, read by the skill-check resolver the waymechanicsis read by the combat bridge. A first cut, all optional:with the same discipline the rest of the format keeps: bounded numbers, an Engine ceiling on a
"until"loop, refused at import when the ruleset'sresolutionkind cannot honour it (adice-sumruleset has no successes to add), and a Capability API bump so an older Engine refuses the package rather than silently ignoring the charm.Invocation can stay exactly as it is: the player says it narratively, the Game Master writes the
usetag it already knows, and the Engine pays the cost and applies the effect to that turn's check instead of only paying.Why it matters
This is the difference between a ruleset that can describe its own character options and one where every interesting charm is flavour text. It came up from a contributor question about a charm that re-rolls 1s.
@kolacheee commented on GitHub (Sep 20, 2026):
Context from the contributor who ran into this, which sharpens the shape:
Those two sentences are not the same feature, and the difference matters:
1. A standing rule of the system, not of any one entry. "Spend 1 willpower for one automatic success" is true of every check in that game, whether or not the character has picked anything. It has no catalog entry to hang on, so
mechanics.checkis the wrong home for it. It belongs besideresolution, something like:one or two entries at most, bounded, with a per-check cap so a full pool cannot buy an unlosable roll.
2. An effect an entry gives, scaled by what the character bought. "A point of blood for Potence, three automatic successes" is Potence's own rule, and the three comes from the rating on the sheet. That is
mechanics.checkon the catalog entry, and the existing pairmechanics.costplusmechanics.perCostStepalready expresses the scaling half: one blood buys one step, three blood buys three. So the entry says what a step is worth and the Engine does the arithmetic, exactly as it already does for a spell cast at a higher level.Both end in the same place: the Engine adds successes to the roll it is about to make. Neither can work by being read out of the sheet in prose, because the Game Master model cannot influence a pool roll at all:
isRulesetRollableSkillCheckTagdeliberately discards any dice the model writes, androllDicePoolCheckthrows every die itself. The look-up the contributor is imagining has to end in data, not in text the model is trusted to honour.One consequence worth stating in the design: a ruleset whose
resolutionisdice-sumhas no successes to add, so both forms must be refused at import for that kind rather than silently ignored.@kolacheee commented on GitHub (Sep 20, 2026):
One ordering fact for whoever builds this, because it decides the shape.
Both halves are read out of the SAME generated reply, in this order (
packages/server/src/routes/generate.routes.ts):resolveSkillCheckTagsInContent(fullResponse, ...)rolls the checkapplyGameRulesetSheetTurn(...)applies the[sheet: ...]ops, which is whereusepays a cost andspendtakes a resourceSo in one turn the dice are already thrown by the time the spend happens. A design that says "the GM spends a point, therefore the roll gains a success" cannot work as two independent tags in one message: the roll would have to be re-resolved after the fact, and the Engine has no notion of an already-rolled check being changed.
The way out is for the check tag itself to carry what was spent, so one resolution does both:
resolveRulesetSkillCheckthen reads the named entry'smechanics.check, or the ruleset's ownresolution.spend, validates the pool has it, applies the effect to the roll it is about to make, and emits the resource change as part of the same result. All-or-nothing, exactly asplanRulesetUsealready is: a spend the pool cannot cover means the effect does not apply and nothing is deducted.That also keeps the one property that matters: the model names what the player said they were spending, and the Engine decides what it costs and what it does. The model still never touches the dice.
Worth noting what already works, so this is not rebuilt: the Game Master can already spend for a narrative activation today, both by
[sheet: who="X" op="use" name="Potence"](the Engine looks the entry up by the name on the sheet or the catalog label, reads itsmechanics.costand pays it, refusing when the pool is short, withpool=to pay from a higher pool of the same group) and by[sheet: who="X" op="spend" pool="Willpower" amount="1"]. Only the effect on the roll is missing. Note thatusematches rows that came from a catalog, so a hand-typed row has no declared cost to pay.@kolacheee commented on GitHub (Sep 20, 2026):
Reframing this, because "the charm does nothing" overstates it and the real ask is smaller.
A dice-pool ruleset already gives the Game Master three levers, all taught in the prompt and all honoured and clamped by the Engine (
renderRulesetSkillCheckLineinpackages/server/src/services/game/gm-prompts.ts):bonus="+N"/bonus="-N", clamped to the declaredresolution.situationalDicerange (the Gravewatch example allows -3 to +3)threshold="N", moved insideresolution.target.min..max(Gravewatch: 5 to 9, default 7)dc="N", how many successes are neededSo "I spend a blood point for Potence to intimidate him" can already end in a real mechanical benefit today: the Game Master writes the
usetag, the blood is deducted, and it writes[skill_check: skill="Intimidation" dc="3" bonus="+3"]. Three extra dice, rolled by the Engine.What is missing is fidelity and repeatability, not effect:
+3is the model's judgement, not the rating on the sheet. The same request next turn may get+2, or a lowered threshold instead, or nothing if the model does not think of the lever. A rule the book states as a number becomes a suggestion.situationalDiceleaves the Game Master no dice lever at all, only an easier difficulty.So this issue is really: let the ruleset state the number, and let the Engine apply it, instead of leaving a printed rule to be approximated within bounds. That is also why the spend and the effect must be decided together at roll time, as in the comment above: the lever and the cost are one decision, and today they are two tags resolved in the wrong order.
@SpicyMarinara commented on GitHub (Sep 20, 2026):
Implemented and merged into staging in #6416, with integration fixes and regression coverage.