Skip to main content

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.

Keeping your shelves stocked is the foundation of every profitable day. Without inventory, customers have nothing to buy — but overspending on restock before you know what customers want can leave you unable to pay rent. Understanding the restocking system is essential to surviving past the early days.

Viewing inventory

Whenever you choose option 1 from the main menu, the game prints a formatted inventory table before asking what you want to restock:
  Name  Stock  Price

1 Apple  5  5
2 Bread  5  10
3 Potion  5  25
The three columns tell you everything you need to know at a glance:
  • Name — the item identifier used when matching customers to stock.
  • Stock — how many units are currently on the shelf.
  • Price — the base selling price in dollars. This can change mid-day if you bargain with customers.

Restocking an item

1

Open the restock menu

From the main menu (open or closed), enter 1 and press Enter. The inventory table is printed automatically.
2

Choose an item

Enter the item’s number (e.g., 1 for Apple, 2 for Bread, 3 for Potion) and press Enter.
3

Enter a quantity

Type the number of units you want to add and press Enter.
4

Cost is deducted immediately

The total cost (quantity × item price) is subtracted from shop.cash straight away. The item’s stock is then incremented by the quantity entered.

Default items

All three items are loaded from res/items.json at startup. Each begins with 5 units of stock regardless of price.
ItemBase PriceStarting Stock
Apple$55
Bread$105
Potion$255

Cash management

You begin every game with $100 in cash. That budget must cover both restocking and daily rent, so spending it wisely matters.
  • Restock cost is charged immediately: buying 4 Potions (25each)costs25 each) costs 100 — your entire starting wallet.
  • Rent is charged at the end of each day and scales with the day number: Day 1 costs 10,Day2costs10, Day 2 costs 20, and so on.
  • Revenue only comes in when customers successfully complete a purchase, so you need to balance stock investment against guaranteed income.
A common early-game mistake is maxing out a single expensive item before knowing whether customers can afford it. Customers have random budgets (1717–286), so some simply cannot buy Potions regardless of stock levels.
The cash check in the source code compares your entered quantity directly against your cash balance: stock_choice > shop.cash. This is a bug — the intended check should be stock_choice * item.price > shop.cash (total cost vs. cash). In practice this means the guard only triggers when the quantity you type is numerically larger than your cash amount, not when the actual purchase cost exceeds it. For example, entering a quantity of 5 with 20cashpassesthecheckeveniftheitemcosts20 cash passes the check even if the item costs 10 per unit ($50 total). If the buggy check does fire, the game prints “You dont have enough cash” and cancels the restock with no stock added and no cash spent.
You can restock at any time — even while the shop is open between serving customers. There is no restriction on when option 1 is available, so you can top up mid-day if you notice a popular item running low.

Build docs developers (and LLMs) love