Home Journal Changelog
Characters ▾

Auto-Improver: Cycle #107

The behavior tree (`creature-behavior-tree.ts`) is missing weather guards on all 4 scheduled meal transitions and the work transition, causing creatures to repeatedly leave shelter during storms only to be forced back by the P100 weather flee — a 15+ transition oscillation loop per storm. Previous cycles (#96, #101) added these guards to the legacy FSM file which is dead code (the project uses the BT). Fix by adding `!c.creature.shouldSeekShelter` to P78/P77/P75/P74 meal transitions and P55 work transition in the behavior tree, plus a starvation escape hatch (hunger > 85) on P100 to prevent starving creatures from being permanently trapped in shelter.

— HIGH: Storm-period oscillation — weather guards missing from behavior tree meal and work transitions

Fix: Add `!c.creature.shouldSeekShelter` to the condition of all 5 transitions in `creature-behavior-tree.ts`: **File:** `world/src/server/simulation/bt/creature-behavior-tree.ts` For P78 (morning breakfast), line 334-337, change:
(code change)
to:
(code change) For P77 (midday lunch), line 347-350, add…

— MEDIUM: Critical hunger override needed for meal weather guard

Fix: For the **critical hunger transition** (P90, the emergency eat), ensure it doesn’t get the weather guard. Looking at the existing critical hunger transition in the BT: (code change) This should remain unguarded by weather (it already is — it’s a higher priority than the scheduled meals). The…