Work out the total raw materials for an item made in several steps
A chair needs planks, planks need logs, and one batch makes several planks. The shopping list on screen is often wrong, either too short or too long, and a recipe that needs itself freezes the game. This entry builds the correct list and catches loops.
Why this works
Products are built in batches, so what is left from one step is real and should be used by the next. Adding up needs for everything at once, using leftovers first, gives the true shopping list that no step-by-step sum can.
When not to use it
Do not add up the full tree when players buy or find intermediate goods directly, or when some parts are already in the bag. Start from what they hold and list only the gap, or the list will mislead.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 48 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 "Work out the total raw materials for an item made in several steps" (read_entry raw-materials-for-multi-step-recipes) 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