[GH-ISSUE #6759] [Feature]: Change an inventory stack by any amount, and split it into a chosen size #3786

Closed
opened 2026-10-21 06:07:22 +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/6759

Originally assigned to: @kolacheee on GitHub.

What problem does this solve?

Game Mode's inventory changes a stack one item at a time. The inventory screen only has +1 and -1, so adding or removing 300 of something takes 300 clicks. There is also no way to split a stack, so a player cannot set part of a pile aside (100 of 300 apples to give away or to keep apart).

Behind that, inventory entries have no id: every operation finds a stack by its name. Adding by name adds to every stack with that name, which is harmless only because two stacks of one name never exist today, and taking more than a stack holds drops the stack without taking anything from the next.

Proposed solution

For every Game Mode game, with or without a ruleset:

  • Any amount. A stack's menu takes a number: add N, take N, or set the count.
  • Split. "Split" asks how many go into the new stack. 300 apples split by 100 leaves 200 in the old stack and 100 in a new one beside it. The size is at least 1 and less than the stack, and a split never changes the total.
  • Merge. Dropping a stack on another stack of the same item merges them. Stacks never merge by themselves, so a split stays made.
  • Stack ids. Every stack gets an id. An entry saved without one gets one when it is read, so saved games need no migration.
  • Named operations across stacks. The Game Master's [inventory: ...] tag and the combat director still name items:
    • adding by name adds to the first stack of that name, or makes a new one;
    • taking by name takes from those stacks top to bottom until the count is met, removing any it empties;
    • asking for more than there is takes all of it.
  • The Game Master sees totals. The Game Master's inventory block shows one line per item with the total across its stacks, so a split does not read as two different things.

Alternatives considered

  • A quantity field without splitting. It fixes the 300 clicks, but not setting part of a pile aside.
  • Splitting by name alone. Two stacks of one name cannot be told apart without an id, so every rename, remove and use would pick the wrong one half the time.

Additional context

This is slice I0 of the ruleset items plan (per-character bags, ruleset item catalogs, currencies and loot come after it and build on stack ids). It needs no ruleset and no Capability API change.

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/6759 Originally assigned to: @kolacheee on GitHub. ## What problem does this solve? Game Mode's inventory changes a stack one item at a time. The inventory screen only has +1 and -1, so adding or removing 300 of something takes 300 clicks. There is also no way to split a stack, so a player cannot set part of a pile aside (100 of 300 apples to give away or to keep apart). Behind that, inventory entries have no id: every operation finds a stack by its name. Adding by name adds to every stack with that name, which is harmless only because two stacks of one name never exist today, and taking more than a stack holds drops the stack without taking anything from the next. ## Proposed solution For every Game Mode game, with or without a ruleset: - **Any amount.** A stack's menu takes a number: add N, take N, or set the count. - **Split.** "Split" asks how many go into the new stack. 300 apples split by 100 leaves 200 in the old stack and 100 in a new one beside it. The size is at least 1 and less than the stack, and a split never changes the total. - **Merge.** Dropping a stack on another stack of the same item merges them. Stacks never merge by themselves, so a split stays made. - **Stack ids.** Every stack gets an id. An entry saved without one gets one when it is read, so saved games need no migration. - **Named operations across stacks.** The Game Master's `[inventory: ...]` tag and the combat director still name items: - adding by name adds to the first stack of that name, or makes a new one; - taking by name takes from those stacks top to bottom until the count is met, removing any it empties; - asking for more than there is takes all of it. - **The Game Master sees totals.** The Game Master's inventory block shows one line per item with the total across its stacks, so a split does not read as two different things. ## Alternatives considered - **A quantity field without splitting.** It fixes the 300 clicks, but not setting part of a pile aside. - **Splitting by name alone.** Two stacks of one name cannot be told apart without an id, so every rename, remove and use would pick the wrong one half the time. ## Additional context This is slice I0 of the ruleset items plan (per-character bags, ruleset item catalogs, currencies and loot come after it and build on stack ids). It needs no ruleset and no Capability API change. ## 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#3786
No description provided.