[GH-ISSUE #6774] [Bug]: Regenerating or swiping a Game Mode reply applies its inventory changes again #3793

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

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

Originally assigned to: @kolacheee on GitHub.

Summary

In Game Mode, a reply's [inventory:] changes are never undone. Regenerating a reply, or switching to another swipe of it, keeps everything the earlier telling gave or took, and the new telling applies its own changes on top. A turn where the Game Master hands over a sword, regenerated twice, leaves three swords.

This is not new: the browser applied every swipe's tags the same way. #6772 moves the application to the server (every tag is applied once when its reply is saved), which makes it easy to see and to fix. Ruleset sheet state does not have this problem: each message and swipe keeps its own game-state row, and a regenerated turn starts from the turn before it.

Expected behavior

  • A regenerated or re-swiped reply changes the inventory as if the earlier telling never happened.
  • Switching back to an earlier swipe shows the inventory that swipe left.
  • An inventory change the player made after the turn is never thrown away without saying so.

Actual behavior

Every telling's changes add up. The only way back is to fix the inventory by hand.

Steps to reproduce

  1. In a Game Mode game, get a reply where the Game Master gives an item, such as [inventory: action="add" item="Sword"].
  2. Regenerate that reply, and get another one that gives the sword.
  3. Open Inventory: there are two swords.
  4. Swipe back to the first telling: there are still two.

Environment

  • Marinara Engine version: staging 3ec25a04e, with #6772
  • Install type: source
  • OS + version: Fedora
  • Browser or app shell: any

Logs, screenshots, or video

None needed. The stacks live in the chat's metadata (gameInventory), which is one value per chat, while the game state is kept per message and swipe.

Additional context

One possible approach, in keeping with how live sheet state works:

  • Record, for the latest turn whose tags changed the inventory, the stacks the turn started with and what each swipe left.
  • When that turn is regenerated or swiped, start from its starting stacks, but only when the inventory is still exactly what the active swipe left. Otherwise the player changed something since, and the change is applied on top as today.
  • The journal is a log and keeps its entries.

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 27, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6774 Originally assigned to: @kolacheee on GitHub. ## Summary In Game Mode, a reply's `[inventory:]` changes are never undone. Regenerating a reply, or switching to another swipe of it, keeps everything the earlier telling gave or took, and the new telling applies its own changes on top. A turn where the Game Master hands over a sword, regenerated twice, leaves three swords. This is not new: the browser applied every swipe's tags the same way. #6772 moves the application to the server (every tag is applied once when its reply is saved), which makes it easy to see and to fix. Ruleset sheet state does not have this problem: each message and swipe keeps its own game-state row, and a regenerated turn starts from the turn before it. ## Expected behavior - A regenerated or re-swiped reply changes the inventory as if the earlier telling never happened. - Switching back to an earlier swipe shows the inventory that swipe left. - An inventory change the player made after the turn is never thrown away without saying so. ## Actual behavior Every telling's changes add up. The only way back is to fix the inventory by hand. ## Steps to reproduce 1. In a Game Mode game, get a reply where the Game Master gives an item, such as `[inventory: action="add" item="Sword"]`. 2. Regenerate that reply, and get another one that gives the sword. 3. Open **Inventory**: there are two swords. 4. Swipe back to the first telling: there are still two. ## Environment - Marinara Engine version: staging 3ec25a04e, with #6772 - Install type: source - OS + version: Fedora - Browser or app shell: any ## Logs, screenshots, or video None needed. The stacks live in the chat's metadata (`gameInventory`), which is one value per chat, while the game state is kept per message and swipe. ## Additional context One possible approach, in keeping with how live sheet state works: - Record, for the latest turn whose tags changed the inventory, the stacks the turn started with and what each swipe left. - When that turn is regenerated or swiped, start from its starting stacks, but only when the inventory is still exactly what the active swipe left. Otherwise the player changed something since, and the change is applied on top as today. - The journal is a log and keeps its entries. ## 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.
bsakaguchi 2026-10-21 06:07:31 +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#3793
No description provided.