Check that a villager's day does not put them in two places
The baker opens the shop at noon and is at the market at noon, or walks from the mill to the church in no time at all. Here is a check for daily routines that finds overlaps and impossible walks, including the night shift that runs past midnight.
Why this works
A day is a circle: the evening has to lead into the next morning, and every move between two places takes time. Checking each neighbouring pair of slots, including the wrap past midnight, finds the impossible days before a player ever sees them.
When not to use it
Skip it when villagers simply appear at fixed spots and vanish when unseen, as in a small game with a handful of people. Also skip it for people who wander freely; there you test their movement rules instead of a timetable.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- A diagram of every state
- 37 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 "Check that a villager's day does not put them in two places" (read_entry villager-schedule-clashes) 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