No-Commander / no-order fallback behaviour #7
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The plan
An NPCEntity can exist without a Commander, and an order can go stale. Both cases need a defined behaviour, or NPCs freeze in ways that look broken. The fallback must be safe and must stay inside the brain's job: it is an execution-level default, not a decision. The brain still never decides WHAT to do — the fallback is what "nothing to do" executes as.
Current state
Nothing.
addons/daisy/src/npc_entity.gdhas no fallback: an NPC with no Commander simply never receives orders, and an NPC whose order goes stale keeps its lastorder_state—executingforever if it never completes,donewith no next step. The design doc lists this as an open question ("hold position, patrol, keep the last order?") and the smoke test only ever drives NPCs that have a Commander.What changes
Settle and implement the fallback, in order:
stuck(and a Commander re-plan) or in the fallback, never in silentexecutingforever.npc_entity.gd. A fallback state and stale-order detection on the brain. Keep it small: the fallback is a behaviour, not a Commander in miniature.executingforever.What done looks like
The fallback rules are written in the design doc, implemented on the brain, and proven by tests — including the negative test that an NPC never stalls in
executingforever. The smoke test's world still passes unchanged.Open questions