[GH-ISSUE #6400] Refresh from ruleset cannot give a picked row a NEW number column, so a ruleset that adds one strands every existing character #3581

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

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

Originally assigned to: @kolacheee on GitHub.

What happens

A ruleset that adds a number column to a sheet list has no way to give that column to a row a player already picked from a catalog. "Refresh from ruleset" never offers it, so the row keeps the column missing, and a fight reads the missing value rather than the column's default.

Found while building the next 5e package release, which adds reach, range and long_range columns to its Attacks list for a fight on a board (Capability API 1.28, #6397).

Why

planCatalogRefresh in packages/client/src/lib/ruleset-catalog.ts builds its review from refreshableText, which returns null for anything that is not text, on purpose: "a number or a switch is where the player's own state lives". That is right for a number the player edits. It is wrong for a column the row has never had at all, which is not the player's state, because the player has never seen it.

planCatalogAddition with the same entry writes all three numbers, so picking the weapon again works. Refreshing does not.

What a player sees today

A character made before the package update keeps a longbow row with no range. On a board that weapon has no range at all and falls back to reaching the next square, so the bow can only be fired at somebody standing next to the archer. The only fix is to delete the row and pick the weapon again, or type the numbers by hand. The 5e package's README says so, which is not a good place for it to have to be said.

Suggested fix

Offer a column the row does not carry at all, whatever its type, as its own reviewable line in the refresh: "this weapon gained Reach: 5". A column the row already has keeps today's rule (text is reviewed, a number is the player's). That keeps the promise that a refresh never overwrites what a player typed, and lets a ruleset grow.

An alternative, if that is too broad: let a list column be marked as owned by the ruleset (like scaled rows), and refresh those columns always.

Either way this will come up on every ruleset release that adds a number column, not only this one.

Originally created by @kolacheee on GitHub (Sep 20, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6400 Originally assigned to: @kolacheee on GitHub. ## What happens A ruleset that adds a **number** column to a sheet list has no way to give that column to a row a player already picked from a catalog. "Refresh from ruleset" never offers it, so the row keeps the column missing, and a fight reads the missing value rather than the column's default. Found while building the next 5e package release, which adds `reach`, `range` and `long_range` columns to its Attacks list for a fight on a board (Capability API 1.28, #6397). ## Why `planCatalogRefresh` in `packages/client/src/lib/ruleset-catalog.ts` builds its review from `refreshableText`, which returns `null` for anything that is not text, on purpose: "a number or a switch is where the player's own state lives". That is right for a number the player edits. It is wrong for a column the row has never had at all, which is not the player's state, because the player has never seen it. `planCatalogAddition` with the same entry writes all three numbers, so picking the weapon again works. Refreshing does not. ## What a player sees today A character made before the package update keeps a longbow row with no `range`. On a board that weapon has no range at all and falls back to reaching the next square, so the bow can only be fired at somebody standing next to the archer. The only fix is to delete the row and pick the weapon again, or type the numbers by hand. The 5e package's README says so, which is not a good place for it to have to be said. ## Suggested fix Offer a column the row does not carry at all, whatever its type, as its own reviewable line in the refresh: "this weapon gained Reach: 5". A column the row already has keeps today's rule (text is reviewed, a number is the player's). That keeps the promise that a refresh never overwrites what a player typed, and lets a ruleset grow. An alternative, if that is too broad: let a list column be marked as owned by the ruleset (like `scaled` rows), and refresh those columns always. Either way this will come up on every ruleset release that adds a number column, not only this one.
bsakaguchi 2026-10-21 06:04:29 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 20, 2026):

Implemented and merged into staging in #6416, with integration fixes and regression coverage.

<!-- gh-comment-id:5750152692 --> @SpicyMarinara commented on GitHub (Sep 20, 2026): Implemented and merged into staging in #6416, with integration fixes and regression coverage.
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#3581
No description provided.