[GH-ISSUE #6314] [Feature]: Game Mode: selectable rulesets and ruleset character sheets (5e first) #3523

Closed
opened 2026-10-21 06:03:56 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

Game Mode checks are locked to a d20 plus Marinara's own modifiers, and the character sheet is six attributes. People who want to play another tabletop system cannot do it natively. The community Marinara-RPG-Extension works around this with four or five extra agents per system, each adding a model call every turn, and its author has asked to run natively instead.

Proposed solution

Let a game be created on a ruleset, chosen once and kept for that game's lifetime.

  • A ruleset is validated data, not code. It picks one of a small, closed set of resolution kinds that the Engine implements (the first is "roll dice, add the sheet's modifiers, meet or beat a difficulty"), and it declares a full character sheet from a closed set of building blocks: abilities, skills, saves, typed fields, derived values, lists, and live state such as hit points and spell slots.
  • A capability package ships it as a reserved-filename asset, ruleset.json, the same way gm-verbs.json works today. No package code, no expression strings, no permission, no agent.
  • A ruleset never adds a model call. Checks ride the existing dice flows and sheet changes ride tags in the Game Master's own narration.
  • The Engine owns rolls, modifiers and resource arithmetic. The Game Master chooses what to check and how hard, and narrates the real result.
  • Sheets live on character cards and personas as starting builds. A game takes a copy, and nothing in a game writes back to the library.
  • No ruleset chosen means today's behaviour exactly, prompts included.
  • First-party scope is 5e on SRD 5.1. The format is deliberately not 5e-shaped (no id such as "level" or "dex" is special), so community authors can write other systems with the same file format.

Work is sliced so each PR is small: (1) schema, game pin, registry and Capability API 1.20, with no behaviour change; (2) the check resolver; (3) sheets on cards and personas; (4) the Rules choice in the setup wizard; (5) the in-game sheet, live state and rests; (6) the 5e package in Marinara-Agents; (7) community import lanes and a dice-pool kind.

The full plan, the format decisions and the first ruleset file arrive with the first PR as docs/development/game-rulesets-and-sheets-implementation.md and docs/development/ruleset-5e-2014.example.json.

Alternatives considered

  • A scripting language or executable rules packages. Rejected. The combat ruleset handoff already says not to add one, and data the Engine validates is safer to share and review.
  • One hardcoded adapter per system in Engine TypeScript. This keeps optional rules content in the base distribution and makes every community system an Engine PR. Combat adapters do stay in Engine TypeScript, keyed by the same ruleset id, because turn order and action economy are not sensibly expressed as data.
  • Keep the overlay approach with per-turn agents. It works today but costs several model calls per turn per system.

Additional context

Two points need a maintainer decision, because they read the combat ruleset handoff (docs/development/game-combat-rulesets-implementation.md) in a specific way:

  1. That document says to start with "a closed registry of built-in, pure TypeScript adapters". This proposal reads the closed registry as the set of resolution kinds and combat adapters, and treats a ruleset definition as data that parameterises a kind. Is that acceptable?
  2. That document's RulesetRef closes id to four built-in names. This proposal widens id to a string and adds packageId and an optional source, so community rulesets can exist and a shared setup can say where a missing ruleset came from. Both documents would share the one type.

Combat is unchanged by this work and stays with the combat handoff. Until a combat adapter exists for a ruleset, its battles run on the current combat and the UI says so.

Investigated and drafted with AI assistance. Please verify against the code before relying on any detail.

Originally created by @kolacheee on GitHub (Sep 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6314 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? Game Mode checks are locked to a d20 plus Marinara's own modifiers, and the character sheet is six attributes. People who want to play another tabletop system cannot do it natively. The community [Marinara-RPG-Extension](https://github.com/Kenhito/Marinara-RPG-Extension) works around this with four or five extra agents per system, each adding a model call every turn, and its author has asked to run natively instead. ## Proposed solution Let a game be created on a **ruleset**, chosen once and kept for that game's lifetime. - A ruleset is validated data, not code. It picks one of a small, closed set of resolution kinds that the Engine implements (the first is "roll dice, add the sheet's modifiers, meet or beat a difficulty"), and it declares a full character sheet from a closed set of building blocks: abilities, skills, saves, typed fields, derived values, lists, and live state such as hit points and spell slots. - A capability package ships it as a reserved-filename asset, `ruleset.json`, the same way `gm-verbs.json` works today. No package code, no expression strings, no permission, no agent. - A ruleset never adds a model call. Checks ride the existing dice flows and sheet changes ride tags in the Game Master's own narration. - The Engine owns rolls, modifiers and resource arithmetic. The Game Master chooses what to check and how hard, and narrates the real result. - Sheets live on character cards and personas as starting builds. A game takes a copy, and nothing in a game writes back to the library. - No ruleset chosen means today's behaviour exactly, prompts included. - First-party scope is 5e on SRD 5.1. The format is deliberately not 5e-shaped (no id such as "level" or "dex" is special), so community authors can write other systems with the same file format. Work is sliced so each PR is small: (1) schema, game pin, registry and Capability API 1.20, with no behaviour change; (2) the check resolver; (3) sheets on cards and personas; (4) the Rules choice in the setup wizard; (5) the in-game sheet, live state and rests; (6) the 5e package in Marinara-Agents; (7) community import lanes and a dice-pool kind. The full plan, the format decisions and the first ruleset file arrive with the first PR as `docs/development/game-rulesets-and-sheets-implementation.md` and `docs/development/ruleset-5e-2014.example.json`. ## Alternatives considered - **A scripting language or executable rules packages.** Rejected. The combat ruleset handoff already says not to add one, and data the Engine validates is safer to share and review. - **One hardcoded adapter per system in Engine TypeScript.** This keeps optional rules content in the base distribution and makes every community system an Engine PR. Combat adapters do stay in Engine TypeScript, keyed by the same ruleset id, because turn order and action economy are not sensibly expressed as data. - **Keep the overlay approach with per-turn agents.** It works today but costs several model calls per turn per system. ## Additional context Two points need a maintainer decision, because they read the combat ruleset handoff (`docs/development/game-combat-rulesets-implementation.md`) in a specific way: 1. That document says to start with "a closed registry of built-in, pure TypeScript adapters". This proposal reads the closed registry as the set of resolution kinds and combat adapters, and treats a ruleset definition as data that parameterises a kind. Is that acceptable? 2. That document's `RulesetRef` closes `id` to four built-in names. This proposal widens `id` to a string and adds `packageId` and an optional `source`, so community rulesets can exist and a shared setup can say where a missing ruleset came from. Both documents would share the one type. Combat is unchanged by this work and stays with the combat handoff. Until a combat adapter exists for a ruleset, its battles run on the current combat and the UI says so. Investigated and drafted with AI assistance. Please verify against the code before relying on any detail.
bsakaguchi 2026-10-21 06:03:56 +07:00
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#3523
No description provided.