Progress / Phase 8
Phase 8: Items and Loot
Mobs drop loot, players carry it in bags, wear gear that changes their stats and trade with vendors, without an item ever being lost or duplicated.
Phase 80 / 22 · 0%
This phase is still ahead.
8.1 Item data
0 of 3 done- Item definitions in
content/items/(id, name, icon, quality, slot, stats, stack size, vendor price, flavor text) with a validator inmake check. - Weighted loot tables in
content/loot/, with tests of drop distributions. - Item instances in Postgres with unique ids, plus inventory and equipment tables; every move is one transaction.
8.2 Items on the server
0 of 9 done- Decision Loot model: personal loot per eligible player, or a shared corpse. Pick one and record why.
- Looting with range checks and a loot timeout.
- Inventory operations (move, split, stack, destroy) made idempotent with request ids.
- Equipment slots (head, chest, legs, feet, hands, main hand, off hand, trinket) feeding the stat system.
- Gold, and vendor NPCs that buy, sell and offer buyback for the session.
- Inventory changes persisted immediately in transactions, not on the periodic save.
- The client is told about an item change only after it commits, so a crash between the game event and the commit never shows an item the player doesn’t have.
- Request ids survive reconnects: a command replayed after a reconnect is applied once.
- Duplication tests: concurrent requests, disconnects mid-operation and replayed messages never duplicate or lose an item.
8.3 Items in the client
0 of 3 done- Bags window and character window with a paper-doll preview, drag and drop, and tooltips with stat comparison.
- Loot window and loot notifications.
- Vendor window.
8.4 Art Batch 08: items
0 of 2 done- Draw Batch 08 by hand: 32×32 item icon sheets, quality borders, bag and character window art, coin icons and a vendor NPC.
- Intake and integrate.
8.5 Walkthrough
0 of 2 done-
docs/walkthroughs/phase-08-items.md: transactions, idempotency and how duplication bugs happen and are prevented. - Devlog draft, release notes, tag
v0.8.0and publish builds.
Acceptance criteria
0 of 3 done- Kill, loot, equip, see the stat change, and sell to a vendor all work end to end.
- Duplication and loss tests pass, including killing the server mid-transaction.
- Inventories survive server restarts and come back intact from a backup restore.
