Spielerando

Fill a dangerous room with loot worth exactly what the danger deserves

A room with three armed guards and a room with a sleeping rat should not hold the same reward. Giving each room a spending allowance is easy, but filling it naively spends everything on one huge item, or loops while hunting for something small enough. Here is a way that always ends.

Why this works

A reward feels fair when it matches the risk, and a spending limit makes that match exact. Choosing only among what still fits can never overspend, and it needs no endless retrying, so each room ends with a clear, bounded result.

When not to use it

Skip it for rooms that tell a story or hold a key item the player must find, since a budget may leave them empty or full of junk. Place those items by hand and use the budget only for the filler around them.

In the full entry

  • What to build, step by step
  • Starting values and the reason for each
  • 3 common mistakes and the fix
  • 24 lines of example code with 3 checks that pass
  • How your AI shows you that it works

Say this to your AI

Use the Spielerando entry "Fill a dangerous room with loot worth exactly what the danger deserves" (read_entry danger-budget-fills-a-room) in my game. Build it step by step, and show me how you checked that it works.

Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP