Spielerando

Let food go stale and rot by the calendar, even across a long sleep

Bread bought on Monday should not be as good on Saturday, whether the player slept once or the story skipped three days. Fresh and old bread must not melt into one pile, and eating should use the oldest first. This entry works from the day an item was gained.

Why this works

Age is a fact about when something began, not a number you have to keep adding to. Remembering the day it was gained lets any amount of skipped time give the right answer at once, and eating the oldest first rewards a player who pays attention.

When not to use it

Skip it in a game where food is only a healing item and the player is not meant to plan around it. Rotting then becomes an annoying tax. Also skip it when time passes only in cutscenes: use a simple fixed use-by chapter instead.

In the full entry

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

Say this to your AI

Use the Spielerando entry "Let food go stale and rot by the calendar, even across a long sleep" (read_entry food-goes-bad-while-the-player-sleeps) 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