[GH-ISSUE #8255] [Feature]: Tint Roleplay roll cards by outcome (success / failure, optional crits) #8206

Closed
opened 2026-10-26 04:03:19 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @ylli-selmani on GitHub (Oct 24, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8255

Originally assigned to: @ylli-selmani on GitHub.

What problem does this solve?

When a Roleplay character uses the roll command with a DC, the dice card always renders in the chat's accent color. A failed check (1d20+1 = 2 vs DC 12) looks exactly like a clean success, so the outcome only shows up in small text or in the narration that follows.

The skill-check card (AnimatedSkillCheckResult) already solves this: it tints the same dice card green / red / gold / deep red by outcome. The [roll:] card just never receives a tone.

Proposed solution

  1. Reuse, don't rebuild. Move the tone choice and TONE_ACCENT colors out of AnimatedSkillCheckResult.tsx into a shared dice helper. Both cards call it, so the two look identical for the same outcome.
  2. Trust the server's verdict. roll_dice already returns success whenever a DC was given (tool-executor.ts). The card reads that field and never recomputes total < dc itself. No DC means no tint (accent color, as today), and so does a success-counting pool without a verdict.
  3. A per-chat selector under the Rolls toggle (Chat Settings → Agents → Commands, next to "Who can roll dice"):
    • Off: accent color, as today
    • Success / failure (default): green on a pass, red on a miss, only when a DC was given
    • Success / failure and crits: also gold on a natural max and deep red on a natural 1. This counts only for a single die, the same rule rulesets use for checks. As on the skill-check card, a critical overrides the sum.

Crits are opt-in on purpose. Not every table plays nat 1 / nat 20 rules, and the card shouldn't introduce a rule the user didn't choose.

Alternatives considered

  • Client computes total < dc: rejected. Systems differ (meet-or-beat, roll-under), and the server already decided.
  • Always-on crit tones: rejected. They quietly add a 5e-style rule to every system, d100 and dice pools included.
  • Tinting only the die: rejected in favor of matching the skill-check card exactly (glow, border, total), so similar results look the same across ME.

Additional context

Precedent: packages/client/src/components/dice/AnimatedSkillCheckResult.tsx (tone mapping) wraps AnimatedDiceRoll. The settings precedent is the "Who can roll dice" select in RoleplayCommandsSettings.tsx.

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 @ylli-selmani on GitHub (Oct 24, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8255 Originally assigned to: @ylli-selmani on GitHub. ## What problem does this solve? When a Roleplay character uses the `roll` command with a DC, the dice card always renders in the chat's accent color. A failed check (`1d20+1 = 2` vs DC 12) looks exactly like a clean success, so the outcome only shows up in small text or in the narration that follows. The skill-check card (`AnimatedSkillCheckResult`) already solves this: it tints the same dice card green / red / gold / deep red by outcome. The `[roll:]` card just never receives a tone. ## Proposed solution 1. **Reuse, don't rebuild.** Move the tone choice and `TONE_ACCENT` colors out of `AnimatedSkillCheckResult.tsx` into a shared dice helper. Both cards call it, so the two look identical for the same outcome. 2. **Trust the server's verdict.** `roll_dice` already returns `success` whenever a DC was given (`tool-executor.ts`). The card reads that field and never recomputes `total < dc` itself. No DC means no tint (accent color, as today), and so does a success-counting pool without a verdict. 3. **A per-chat selector under the Rolls toggle** (Chat Settings → Agents → Commands, next to "Who can roll dice"): - **Off**: accent color, as today - **Success / failure** (default): green on a pass, red on a miss, only when a DC was given - **Success / failure and crits**: also gold on a natural max and deep red on a natural 1. This counts only for a single die, the same rule rulesets use for checks. As on the skill-check card, a critical overrides the sum. Crits are opt-in on purpose. Not every table plays nat 1 / nat 20 rules, and the card shouldn't introduce a rule the user didn't choose. ## Alternatives considered - **Client computes `total < dc`**: rejected. Systems differ (meet-or-beat, roll-under), and the server already decided. - **Always-on crit tones**: rejected. They quietly add a 5e-style rule to every system, d100 and dice pools included. - **Tinting only the die**: rejected in favor of matching the skill-check card exactly (glow, border, total), so similar results look the same across ME. ## Additional context Precedent: `packages/client/src/components/dice/AnimatedSkillCheckResult.tsx` (tone mapping) wraps `AnimatedDiceRoll`. The settings precedent is the "Who can roll dice" select in `RoleplayCommandsSettings.tsx`. ## 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.
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#8206
No description provided.