Skip to content

An AI GM's tools say a request_roll is the roll of the character it names, and offer dice alone for a trap's or a hazard's harm, where they offered a damage roll made first as a second way to deal it - #1076

Open
Smoebo wants to merge 1 commit into
Lebbitheplow:mainfrom
Smoebo:fix/request-roll-own-roll

Conversation

@Smoebo

@Smoebo Smoebo commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Ruling 3 of #915, answered there on Nov 22: a request_roll with a characterId is that character's roll, always, and the descriptions stop offering the two-call path for harm. Words only: no handler changes, and the number gate takes what it took.

What a table sees

Nothing in the rules. An AI GM is no longer told to roll a trap's or a hazard's damage with request_roll first and then send the total. Rolled that way with the id of the character it lands on, the roll is stored and shown as that character's own ("Aria · Damage (falling rocks)"), which is the reading ruling 2 set out to end. The tools that deal harm (apply_hazard, cast_at_player, apply_damage with dice) roll it themselves.

I did not run a real model, so I cannot say how often one took the two-call path before or takes it now.

The words

Where Before Now
request_roll, the tool "Roll dice for an uncertain outcome; ..." "Roll a character's own dice for an uncertain outcome; ..."
request_roll.characterId "Exact characterId from GAME STATE." adds "Who rolls, never who a trap or hazard harms."
apply_damage.amount "A damage total the server rolled this turn (request_roll kind=damage)." "A character's own damage total, rolled this turn (request_roll kind=damage)."
the refusal of a bare damage number (AI_NUMBER_REFUSAL) "... send dice ... or roll it first with request_roll kind damage and send that total." "... send dice ("2d6") instead of amount and the server rolls them."
the same for healing the same offer, to roll healing as request_roll kind damage dice alone
the fight rule on harm by hand (prompt-rules.ts) "... send dice ... or send a total it rolled this turn (request_roll kind damage); ..." "... send dice ("2d6") and it rolls them; a number of your own is refused. request_roll is the roll of the character it names ("roll your damage"), never the dice of a trap, a hazard or anything else that harms them."

Two budgets shaped the wording

  • The trimmed tool set has a token budget (scripts/test-prompt-window.mjs), and on main a table with every optional family on is 5 tokens under it. So the new words in request_roll are paid for by one sentence cut from the end of request_roll.targetEnemyId: "A party character's damage goes through pc_attack or the spell tools." The server says the same itself when a model tries it (invoke-roll.ts: "... damage on an enemy comes from pc_attack (or the spell tools) ..."), with a retry. The trimmed set is one token smaller than on main.
  • A compact call keeps each description's first sentence, and a 16K window had no room for more: with the new words in characterId's first sentence, scripts/test-tool-profiles.mjs failed ("the shop group rides from the start"). So they are its second sentence, which a compact call drops. A compact call still reads "Roll a character's own dice" and apply_damage.amount's new words.

If you would rather give either budget room than cut that sentence, say so and I will put it back.

Not covered

Tests

  • scripts/test-tool-descriptions.mjs: one new case and three new facts the compact cut must keep. Both refusals offer dice and name no request_roll; the fight rule offers dice and says whose roll a request_roll is; no rule offers "a total it rolled this turn" or a roll made first; characterId's full words say whose roll it is not; apply_damage.amount no longer reads "the server rolled this turn". On the source as it was the suite stops at the first of them.
  • scripts/test-prompt-window.mjs and scripts/test-tool-profiles.mjs pass; both failed on my first wording, which is how I met the two budgets above.
  • npm test on Windows, on this commit: 1,264 of 1,268 files passed. The four that failed fail on main on my machine for its own setup: test-backup-in-app and test-backup-restore (Git Bash's tar reads C: as a host), test-enforce-last-combat and test-enforce-monster-blocks (no sqlite3 command).
  • tsc, npm run dead-code, lint on the changed files and npm run build pass on this commit. The build ran against the Next.js my checkout has installed (16.4.1), not the 16.4.6 the repository pins.
  • No reader went through this cold: it changes words and no logic.

Checks

  • npm run lint, npm test and npm run build pass, and the change has a test that fails without it. (Lint on the changed files. npm test: see Tests.)
  • Anything a player sees has screenshots below: the website and the app, day and night themes, phone width. (None. No screen changes.)
  • No hostnames, IP addresses, logs, keys, .env files or players' names in the code, the tests or this description.

Settings, options and controls

  • This adds no new setting, toggle, option or other control.

🤖 Generated with Claude Code

…ames, and offer dice alone for a trap's or a hazard's harm, where they offered a damage roll made first as a second way to deal it

Ruling 3 of issue 915: a request_roll with a characterId is that
character's roll, the one who would pick up the dice at a table. The words
the model reads offered it as a second way to roll harm ("roll it first with
request_roll kind damage and send that total"), and a trap's damage rolled
that way with the id of the character it lands on is stored and shown as
that character's own roll.

Words only; no handler changes and the number gate takes what it took.
request_roll's first sentence says "a character's own dice", characterId
says whose roll it is not, apply_damage's amount is a character's own
total, both refusals of a bare number offer dice alone, and the fight rule
on harm by hand says whose roll a request_roll is.

Two budgets shaped the wording. The trimmed tool set is 5 tokens under its
budget on main at a table with every optional family on
(test-prompt-window), so the new words are paid for by the sentence
targetEnemyId ended on, which the server says itself when a model tries
it. A compact call keeps a description's first sentence and a 16K window
had no room for more (test-tool-profiles), so characterId's new words are
its second sentence.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant