A between-round shop can create meaningful tradeoffs in an inventory-management roguelike, but it touches the run phase, currency, item stock, bag placement, and adjacency synergies at once. Make the existing run manager own the transition, use the current bag validator for every purchase, and treat money plus item placement as one transaction. Test reloads and full bags before widening the offer system.

This guide proposes a shop feature for an existing inventory roguelike. The merchant, items, prices, bag, synergies, and outcomes are invented. No source code, project, build, save, or playtest was available. The checks below are plans, not tested balance or behavior.
Map the run transition and inventory rules
Trace what happens after an encounter ends: rewards settle, the run phase changes, the player sees a result, and the next room loads. Identify which system owns that transition and whether the game already has a camp, reward chest, or preparation menu. Keep a baseline save at the end of a round, with a partially filled bag and a known currency balance.
Document bag behavior before creating stock. Record cell dimensions, item footprints, rotation, stacking, blocked slots, adjacency effects, equipped slots, and what happens when the bag is full. Identify whether synergies update immediately after placement or only at a round boundary. A shop should call the existing placement logic rather than approximate it in a separate UI rule.
| System | Baseline to capture | Protect |
|---|---|---|
| Run phase | Encounter end, reward settlement, next round | One transition owner |
| Bag | Grid, footprints, rotation, stack rules | Existing placement validator |
| Synergies | Adjacency and item-tag effects | Current recalculation timing |
| Currency | Reward, purchase, reroll, refund | Single run ledger |
| Randomness | Run seed and offer generation | Existing deterministic rules |
Define when a shop opens and closes
Use a clear phase sequence: encounter resolves, rewards commit, shop opens, purchases settle, the player confirms departure, and the next encounter begins. Define whether the player can revisit the shop or return to an earlier room. If a shop can be skipped, provide a direct transition. Prevent combat input or encounter rewards from applying while the shop phase is active.
In the fictional Packlight Delver run, a merchant appears after each second encounter. The player may buy one relic or leave; a paid reroll replaces the visible offer. This is a teaching scenario, not an implemented feature. A real game should choose a cadence that fits its current run length and economy, rather than inserting a shop after every room by default.
Give the shop stable run and visit IDs. If the player reloads while the same visit is open, show the same stock and currency unless the game explicitly charges for a reroll. Store a purchase result once before continuing the run. Avoid regenerating the shop because a screen was reopened or a scene was reloaded.

Make a purchase one validated transaction
Before charging the player, preview the item’s footprint in the current bag and run the existing legality check. Show whether it fits in the chosen orientation, which cells it occupies, and whether it changes any adjacency effects. If there is no valid placement, keep the purchase disabled or offer the game’s existing discard/swap rule. Do not charge currency while waiting for a placement choice unless the player has confirmed a reversible transaction.
When purchase commits, decrement currency and add the item to the run inventory through their current owners. Use one stable transaction ID so reload or a repeated click cannot deduct twice. If either step fails, restore the original balance and inventory state. Test edge cases such as the last coin, a stack at maximum size, rotation after preview, or two items competing for the same cells.
Define how the shop handles owned items. If duplicates stack, apply the current stack rule. If a unique item is already equipped, either disallow another or state how it behaves. If the player sells or trades an item, route the result through the current inventory and economy logic. A shop should not introduce a shadow copy of the bag or wallet.
Keep synergies explainable
Show which item tags create a synergy and which neighbors count. If adding a relic changes damage, defense, movement, or resource gain, preview the difference using the game’s existing stat calculation. Do not promise a bonus based only on item names if the runtime uses hidden tags or directional adjacency. Explain when a synergy is recalculated and whether it persists after the item is moved.
Check that shop items do not make a single build automatic. A powerful adjacency item can be balanced by its size, cost, limited stock, or opportunity cost, but those levers should be measured. Keep the current run difficulty, encounter sequence, and reward pacing intact while testing the new layer. Do not claim an item is balanced based on the fictional examples in this guide.
| Offer rule | Decision | Test |
|---|---|---|
| Stock | Fixed, seeded, or rerollable? | Same seed and phase after reload |
| Price | Flat or run-scaled? | Low and high balance states |
| Placement | Must fit before purchase? | Full bag and rotated item |
| Synergy | Which tags and neighbors count? | Move item in and out of adjacency |
| Duplicate | Stack, equip, or reject? | Owned and unique item cases |
Keep run randomness and saves compatible
Use the run’s existing random-seed owner to generate offers if stock is procedural. Decide whether the seed determines all future shop stock or only each visit. Keep a shop visit’s offer stable across reloads. If rerolling is a paid action, increment a counter or record the new stock state through the current run owner and charge once.
Store shop state separately from permanent unlocks. If the game already saves active runs, add the smallest required fields: run ID, shop visit ID, stock snapshot or seed state, purchase result, and reroll state. Give old saves a safe behavior such as no active shop until the next normal transition. Do not rewrite the player’s bag to fit a newly generated offer.
If the project uses Godot, its Resource documentation describes serializable data containers that can be saved on disk. This is an engine-specific example, not a required shop model. Godot’s save tutorial shows one workflow where persistent objects provide relevant data for serialization and loading. Neither source establishes the target game’s seed handling or item transaction semantics.
Ask AI for a narrow shop slice
Provide an allowlist for run phase, offer generation, currency, bag validation, item tags, and active-run saves. Ask an assistant to map current ownership before editing. Start with a fixed test offer and one purchase path, then add seeded stock only after the state transition works. Require the diff to leave combat, encounter generation, and the existing synergy calculation unchanged.
Keep a clean branch and save copies for empty, partial, and full bags. Review every changed file, especially code that handles payment and item placement. Maintain a rollback that removes the shop phase without changing the prior between-room reward flow. If old saves need migration, test copies and record the default behavior.
Test reload, capacity, and synergy
Exercise one valid purchase, insufficient currency, a full bag, rotated placement, duplicate stock, paid reroll, leaving without a purchase, reloading in the shop, defeat after purchase, and next-round entry. Repeat with the same run seed and compare offers. Verify that a purchased item remains in the bag, currency changes once, and synergy effects match the current rule system.

| Proposed check | Action | Evidence |
|---|---|---|
| Valid placement | Preview and buy item that fits | Cells occupied and one currency change |
| Full bag | Attempt purchase with no legal space | Clear rejection and unchanged balance |
| Synergy | Place, move, and remove adjacent items | Current calculated effects |
| Reroll | Pay, reload, and inspect offer | Single fee and stable next stock |
| Same seed | Restart reproducible test run | Expected shop offer sequence |
| Defeat | Lose after a purchase | Item and run settlement behavior |
| Old save | Load pre-shop active-run copy | Bag and run state preserved |
| Rollback | Restore baseline version | Existing between-round flow |
This is a test plan, not a result. Record build version, run seed, visit ID, offer IDs, bag layout before and after, currency delta, synergy output, round transition, and expected versus actual behavior. A generated bag diagram cannot prove a shop is fair or deterministic.
Make shop decisions easy to compare
Show item size, price, tags, adjacency effects, and whether the offer is unique. Let the player preview placement before confirming. Explain reroll cost and whether stock persists. Keep the leave-shop action visible and make it possible to review current bag capacity without closing the offer. The shop should add a choice to the run rather than interrupting every round with paperwork.
To explore a separate inventory roguelike concept, try SEELE AI Game Maker. It is a concept tool, not an editor for an existing project.
Frequently asked questions
When should a roguelike shop appear between rounds?
Use an explicit transition already owned by the run manager, such as after a completed encounter and before the next one loads. Define whether the player can leave, revisit, or reroll the shop, and commit the phase once. Avoid opening a shop while combat or reward settlement is still active.
How can shop purchases preserve spatial inventory rules?
Run every purchase through the existing bag-placement validator. Check footprint, rotation, blocked cells, stack limits, and item adjacency synergies before charging currency. Preview the placement and result first, and leave both the item and the player’s money unchanged when no legal placement is available.
Should shop stock be random each run?
Follow the game’s existing random-seed owner and decide whether stock is generated per run, per round, or per visit. Store enough state to keep reloads from rerolling into a better offer unless rerolling is an intentional paid action. Test the same seed and shop phase across save reloads.
What happens to shop inventory after the player leaves?
Define whether unpurchased items disappear, remain until the next round, or can be revisited. Keep purchased items in the player’s inventory and settle currency through the existing run economy. Test shop exit, return, defeat, and a save taken after buying but before the next encounter.
Can AI add a between-round shop to my inventory roguelike?
AI can inspect the run manager, bag validator, item synergy rules, currency, and save flow, propose one bounded shop phase, and draft tests. It cannot verify item balance or run determinism without the actual project. Provide an edit allowlist, sample seeds, baseline inventories, and rollback revision.
Add offers without breaking the bag
Let the run manager own shop timing, the existing validator own item placement, and the current economy own currency. Preview purchases, commit each once, and keep seeded offers stable across reloads. Test capacity, rotation, synergies, defeat, and old saves before extending the catalog. Treat Packlight Delver and the mockup as fictional planning aids, not evidence of a fair or running shop.


