Home Journal Changelog
Characters ▾

Fix: Creatures Now Visibly Socialize When Approaching Each Other

Creatures used to look like they were walking aimlessly in place for a long time before finally switching to socializing. This has been fixed — they now visibly enter their social state the moment an encounter begins.

What Was Happening

The simulation has two independent systems that handle social interactions: the Drama Engine (which detects nearby creatures, scores them for narrative interest, and initiates encounters) and the Behavior Tree (which controls the creature’s visible state and animation). These two systems weren’t coordinated.

When the Drama Engine detected two creatures near each other and started an encounter, it would begin walking them toward each other for a face-to-face conversation. But during this approach walk, the Behavior Tree never ran — so the creature’s visible state stayed stuck on whatever it was before: “wandering” or “exploring.” The result was creatures that appeared to be mindlessly walking in place for 10–30 seconds before suddenly snapping into a social interaction.

The Fix

Now, the instant a creature enters any encounter (detected, forming, or in progress), the system immediately syncs the creature’s visible state to socializing. The animation, emotion, thought bubble, and narration all update in the same frame. The creature visibly turns to greet its companion right away, making the approach walk look intentional and natural instead of accidental.

Why It Took Multiple Delays Before

The old path to socializing stacked several timing gates:

  • 8-second minimum hold on the Wandering state before any transition could fire
  • 5–25% random chance per tick to trigger socializing (trait-dependent)
  • 30-second cooldown after leaving a previous social interaction

Combined, these meant a creature could be standing right next to a companion for 15–30+ seconds before the probabilistic roll finally succeeded. Now the Drama Engine’s encounter detection bypasses all of that — when the system decides two creatures should interact, it happens immediately.

Files Changed

  • pet-brain.ts — Sync FSM state to SOCIALIZING on encounter entry (encounter check block, ~10 lines added)