[GH-ISSUE #6610] [Feature]: Game Mode: let a ruleset's stat block carry the ruleset's own parameters, not a fixed shape #3701

Closed
opened 2026-10-21 06:06:19 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @kolacheee on GitHub (Sep 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6610

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

In a Game Mode fight resolved by a ruleset's own numbers, a party member has a sheet built from whatever the ruleset declares: its own fields, pools, tracks, skills and saves. An opponent has a stat block instead, and a stat block has a fixed shape:

  • one health number, one defense number, an initiativeModifier and a speed
  • saves keyed by the ruleset's own save ids, which is the one part that already speaks the ruleset's language
  • abilities, which are carried for the Game Master and never read by anything
  • damage types it resists, and conditions it ignores

It has no pools, no tracks, no skills and no fields. Rulesets do not all use the same stats, skills and other parameters, so an opponent can only be described as far as that fixed shape happens to fit a given system. Where it does not fit, the gap shows up in several places at once:

  • An opponent cannot spend anything. A block's actions cost nothing off any pool, so an opponent cannot cast out of spell slots, spend a resource, or pay for a spell out of a bigger pool. #6608 taught the Engine to upcast for a party member it plays, but it cannot do the same for an opponent, whether the Engine or a Game Master is playing it, because there is nothing to pay from. See the correction on #6528.
  • A ruleset whose health is a wound track cannot give an opponent one. health is a number. docs/extending/writing-rulesets.md lists this as a known limit: an opponent has no sheet to mark, so a blow against one cannot be softened by its kind.
  • One defense number is not every system's defense. A system that defends differently against different attacks, or that splits avoiding a blow from absorbing it, cannot describe an opponent faithfully.
  • Nothing on a block can be derived. An action carries a flat toHit, and a save must carry its own difficulty on the action, because, as the authoring guide puts it, a stat block is not a character sheet, so there is nowhere else for that number to come from.
  • Skills do not exist on a block, so anything that asks an opponent to roll one of the ruleset's own skills, such as the contests still to come in the combat arc, has nothing to read.

Proposed solution

Let a stat block carry the ruleset's own declared parameters, keyed by the same ids the ruleset's sheet declares, instead of a fixed set:

  • pools and tracks, as starting values, so an opponent can spend a pool and be marked on a track exactly as a party member is
  • fields and skills, so an action and a check can read an opponent's numbers from the ruleset's own names
  • whatever the ruleset declares as defense and health, read the way it is read for a party member, rather than one number of each

An action could then name a cost against the block's own pools, the same way a catalog entry does, and read its numbers from the block's own values instead of carrying flat ones. The fixed fields that exist today would stay valid, so every bestiary already shipped keeps working, and a block that names nothing new behaves exactly as it does now.

This is a format change, so a ruleset package that uses it would need a new Capability API minor. It must not be shaped around any one system: the keys are whatever the ruleset itself declares.

Alternatives considered

Make every creature a full sheet build, the same shape a party member has. That is the cleanest in principle, since a creature could then say anything a character can, but it is a lot to ask of a bestiary. The 5e package alone ships over three hundred creatures. It could still be offered as an option beside the lighter block.

Add pools to stat blocks and nothing else. That would let opponents spend and upcast, but it leaves wound tracks, several defenses and skills where they are. Fixing one parameter at a time would keep the block shaped around whichever systems were looked at first.

Additional context

Part of the ruleset combat arc. Raised in review of #6608, where the upcasting change turned out to reach only characters with sheets. The current block is RulesetStatBlock in packages/shared/src/features/ruleset-combat/types.ts, and the limits it causes are listed in the Not yet section of docs/extending/writing-rulesets.md.

Template check

Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @kolacheee on GitHub (Sep 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6610 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? In a Game Mode fight resolved by a ruleset's own numbers, a party member has a sheet built from whatever the ruleset declares: its own fields, pools, tracks, skills and saves. An opponent has a stat block instead, and a stat block has a fixed shape: - one `health` number, one `defense` number, an `initiativeModifier` and a `speed` - `saves` keyed by the ruleset's own save ids, which is the one part that already speaks the ruleset's language - `abilities`, which are carried for the Game Master and never read by anything - damage types it resists, and conditions it ignores It has no pools, no tracks, no skills and no fields. Rulesets do not all use the same stats, skills and other parameters, so an opponent can only be described as far as that fixed shape happens to fit a given system. Where it does not fit, the gap shows up in several places at once: - **An opponent cannot spend anything.** A block's actions cost nothing off any pool, so an opponent cannot cast out of spell slots, spend a resource, or pay for a spell out of a bigger pool. [#6608](https://github.com/Pasta-Devs/Marinara-Engine/pull/6608) taught the Engine to upcast for a party member it plays, but it cannot do the same for an opponent, whether the Engine or a Game Master is playing it, because there is nothing to pay from. See the correction on [#6528](https://github.com/Pasta-Devs/Marinara-Engine/issues/6528). - **A ruleset whose health is a wound track cannot give an opponent one.** `health` is a number. `docs/extending/writing-rulesets.md` lists this as a known limit: an opponent has no sheet to mark, so a blow against one cannot be softened by its kind. - **One defense number is not every system's defense.** A system that defends differently against different attacks, or that splits avoiding a blow from absorbing it, cannot describe an opponent faithfully. - **Nothing on a block can be derived.** An action carries a flat `toHit`, and a save must carry its own difficulty on the action, because, as the authoring guide puts it, a stat block is not a character sheet, so there is nowhere else for that number to come from. - **Skills do not exist on a block**, so anything that asks an opponent to roll one of the ruleset's own skills, such as the contests still to come in the combat arc, has nothing to read. ## Proposed solution Let a stat block carry the ruleset's own declared parameters, keyed by the same ids the ruleset's sheet declares, instead of a fixed set: - **pools** and **tracks**, as starting values, so an opponent can spend a pool and be marked on a track exactly as a party member is - **fields** and **skills**, so an action and a check can read an opponent's numbers from the ruleset's own names - whatever the ruleset declares as defense and health, read the way it is read for a party member, rather than one number of each An action could then name a `cost` against the block's own pools, the same way a catalog entry does, and read its numbers from the block's own values instead of carrying flat ones. The fixed fields that exist today would stay valid, so every bestiary already shipped keeps working, and a block that names nothing new behaves exactly as it does now. This is a format change, so a ruleset package that uses it would need a new Capability API minor. It must not be shaped around any one system: the keys are whatever the ruleset itself declares. ## Alternatives considered **Make every creature a full sheet build**, the same shape a party member has. That is the cleanest in principle, since a creature could then say anything a character can, but it is a lot to ask of a bestiary. The 5e package alone ships over three hundred creatures. It could still be offered as an option beside the lighter block. **Add pools to stat blocks and nothing else.** That would let opponents spend and upcast, but it leaves wound tracks, several defenses and skills where they are. Fixing one parameter at a time would keep the block shaped around whichever systems were looked at first. ## Additional context Part of the ruleset combat arc. Raised in review of [#6608](https://github.com/Pasta-Devs/Marinara-Engine/pull/6608), where the upcasting change turned out to reach only characters with sheets. The current block is `RulesetStatBlock` in `packages/shared/src/features/ruleset-combat/types.ts`, and the limits it causes are listed in the Not yet section of `docs/extending/writing-rulesets.md`. ## Template check Please **uncheck (untick)** the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
Author
Owner

@kolacheee commented on GitHub (Sep 24, 2026):

Taking this on, together with a leftover from https://github.com/Pasta-Devs/Marinara-Engine/pull/6525: docs/extending/writing-rulesets.md still says signature actions are only "stored, priced and spent today; see Not yet below", though that Not yet entry went away when they got their window between turns. One PR for both.

Working shape, to steer early if it is wrong: a bestiary entry may carry a partial character sheet in the ruleset's own terms (every part of a sheet build already defaults to empty, so { "fields": { "ac": 13 } } is a whole one). An opponent built from it goes through the same path a party member does, so its health (pool or track), defense, saves, speed, initiative, the abilities on its lists, their costs and upcasting all come from the ruleset's own declarations, and its block actions still add to that. The fixed numbers a sheet replaces are not also given, so there is one source of truth. A creature the Game Master invents mid-scene stays a plain block, because the clamp that holds an invention to its tier cannot vouch for a sheet. An opponent's sheet lives for the fight only and is never written back to any character, which needs a fix first: the write-back today picks out party members by "has a sheet".

<!-- gh-comment-id:5813216972 --> @kolacheee commented on GitHub (Sep 24, 2026): Taking this on, together with a leftover from https://github.com/Pasta-Devs/Marinara-Engine/pull/6525: `docs/extending/writing-rulesets.md` still says signature actions are only "stored, priced and spent today; see Not yet below", though that Not yet entry went away when they got their window between turns. One PR for both. Working shape, to steer early if it is wrong: a bestiary entry may carry a partial character sheet in the ruleset's own terms (every part of a sheet build already defaults to empty, so `{ "fields": { "ac": 13 } }` is a whole one). An opponent built from it goes through the same path a party member does, so its health (pool or track), defense, saves, speed, initiative, the abilities on its lists, their costs and upcasting all come from the ruleset's own declarations, and its block actions still add to that. The fixed numbers a sheet replaces are not also given, so there is one source of truth. A creature the Game Master invents mid-scene stays a plain block, because the clamp that holds an invention to its tier cannot vouch for a sheet. An opponent's sheet lives for the fight only and is never written back to any character, which needs a fix first: the write-back today picks out party members by "has a sheet".
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#3701
No description provided.