A Survivor Who Gets Hungry — and Does Something About It
Hunger, thirst, Home food searches, visible physical actions, and real container interaction are turning autonomous decisions into observable survival behavior.
Needs became decisions
A survivor carrying a real inventory still needs to understand when that inventory is no longer enough.
True MP NPC now derives bounded hunger and thirst state from Project Zomboid's authoritative survivor state. The Brain does not receive mutable game objects. It receives a safe summary of the survivor's needs, carried food calories, and available drink reserve.
vanilla survivor state
↓
bounded Needs snapshot
↓
Brain decision
↓
EAT | DRINK | FETCH_HOME_FOOD | REFILL_WATER
↓
physical server-owned action
Food and water behavior is driven by need instead of an arbitrary activity animation. An NPC can prefer an already opened food item, preserve sealed cans as reserve, drink from a suitable carried container, or return Home when its supplies run low.
No knowledge through walls
Home food search deliberately avoids omniscience.
The NPC may identify kitchen containers inside its assigned Home, but it does not know what they contain from a distance. It must navigate to a valid side of each container and physically arrive before the contents can be inspected.
Visited container facts are bounded and durable. Containers that contain no suitable food are remembered without turning the Brain into a remote inventory scanner.
During isolated runtime testing, survivors physically visited their Home kitchen containers and increased their carried safe-food reserve beyond the 2,000-calorie target.
Cans, tools, and trash
Sealed safe canned food counts toward the survivor's reserve without being opened unnecessarily.
When a hungry survivor actually needs the food, the server uses Project Zomboid's real canned-food recipe. A required can opener may be borrowed from the observed Home container and returned afterward. Empty cans are excluded from food, drink, and water-capacity calculations and can be carried to a discovered Home trash container.
These are real inventory transfers. The system does not create replacement items, inspect distant containers, or silently delete leftovers.
Actions the player can see
A server-side action is not automatically visible to another player.
The first implementation correctly progressed reading, eating, drinking, filling water, and opening cans on the server, but an unmodified client could not see those actions. Starting a server-side BaseAction alone was not enough.
The accepted network path now publishes a balanced vanilla
PlayerActionsState lifecycle:
prepare action
↓
StatePacket Enter
↓
vanilla action variables, event, and held models
↓
progress toward the declared commit point
↓
StatePacket Exit
The owner has confirmed visible reading, eating, drinking, water filling, and can opening on an unmodified client.
A manual seated-reading composition has been confirmed on an unmodified client. The same presentation during a fully autonomous seated-reading choice still needs one focused owner-visible retest on the current candidate.
The survivor has a mood, too
Mood is separate from spoken decisions.
Current Mood and a bounded internal history are derived from vanilla Moodles and projected through the authenticated telemetry boundary. The public survivor view deliberately shows the current mood summary, not the historical series, and exposes no raw NPC identifiers, internal reasoning, or mutable game state.
Autonomy becomes believable when a decision leaves evidence in the world: an opened cupboard, food in a backpack, an empty can in the trash, and an action another player can actually see.