Simple Shop Sim is intentionally small and hackable. The README explicitly encourages patching bugs and extending the code — everything you need to change lives in two JSON files and a handful of Python functions. The sections below walk through the most common modifications.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/mukybaby/Simple-Shop-Sim/llms.txt
Use this file to discover all available pages before exploring further.
Adding new items
Openres/items.json and append a new [name, price] entry. The game loads this file fresh on every launch, so no Python changes are required.
Every item loaded from this file starts with a stock of
5 — that value is hardcoded in main.py. If you want a different initial stock for new items, see Changing initial stock below.Adding customer names
Openres/customer_names.json and append additional name strings to the array. The pool is sampled by make_customers() every time the shop opens for a new day.
More names are required for longer playthroughs — customer count grows as day × 3, so Day 10 alone needs 30 distinct names. A good rule of thumb: aim for at least (target_max_day × 3) + 10 names in the pool.
Changing starting cash
The shop’s starting cash is set as the third argument to theShop constructor in main.py:
Changing initial stock
The initial stock for every item loaded fromitems.json is the hardcoded 5 passed to the Item constructor in main.py:
items.json (e.g. ["Sword", 75, 2]) and reading item[2] here instead of a hardcoded value.
Known issues and suggested fixes
The following bugs exist in the current source. Each accordion explains the problem and shows a corrected snippet.Bargain price formula applies 90% markup instead of 10%
Bargain price formula applies 90% markup instead of 10%
Location: Fix: Replace the multiplier with
main.py, inside the case "2" branch.The comment says the successful bargain applies a 10% markup, but the formula price += price * 0.9 actually increases the price by 90%:0.1:Customer uniqueness check never matches — duplicate names are possible
Customer uniqueness check never matches — duplicate names are possible
Location: Because
res/shop.py, inside make_customers().The guard is intended to prevent the same name appearing twice in one day’s roster:customers holds Customer objects rather than strings, the in check never evaluates to True and duplicate names can slip through.Fix: Track used names in a separate list:Restock cash check compares quantity to cash instead of total cost
Restock cash check compares quantity to cash instead of total cost
Location: A player with
main.py, inside the case "1" branch.The guard is meant to prevent a restock the player can’t afford, but it compares the raw quantity against shop.cash rather than the total cost:$100 could buy 3 units of a Potion (price $25 each, total $75) — that is correctly allowed. But they could also “buy” 5 units for a total cost of $125, because 5 > 100 is False and the guard does not fire, yet $125 exceeds the available $100. The true cost is never checked.Fix: Multiply by the item’s price before comparing:These fixes are community suggestions based on a close reading of the source code. The project is open source — feel free to fork the repository and submit a pull request with your patches.