Skip to content

fix: G2 Old Camp NPCs sleep in their beds (oCMobDoor beds are NPC mobs) - #542

Merged
JaXt0r merged 1 commit into
developfrom
fix/g2-oc-beds
Nov 22, 2026
Merged

JaXt0r merged 1 commit into
developfrom
fix/g2-oc-beds

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

What

In G2 the Old Camp NPCs (Valley of Mines) sleep in their beds again instead of standing next to them.

  • VobService.AddToMobInteractableList: a bed stored as oCMobDoor (G2's BEDHIGH_2_OC) is listed as a bed mob for AI_UseMob / ZS_Sleep, like the engine. It is recognised by its visual (ZenKitExtension.IsBed: BED*), which is also how VobInitializerDomain already builds it with the bed prefab.
  • Real doors are unchanged: they stay hinge-only, not AI_UseMob mobs.
  • Log: [VobService] '<visual>' is an oCMobDoor bed - usable by NPCs. (category Vob)

Why

The lost-fixes analysis of the experimental branch on 2026-11-22 found that c496efa16 (Old Camp beds) never reached develop. Develop skips every oCMobDoor when it builds the NPC mob list, so ZS_Sleep never finds these beds. There is no issue for it.

How to test manually

  • G2, chapter 2: go to the Old Camp in the Valley of Mines at night (after 22:00). Paladins and knights in the castle lie in their beds instead of standing next to them.
  • G2: the log has oCMobDoor bed - usable by NPCs lines for BEDHIGH_2_OC beds when the Valley of Mines loads.
  • G2: doors in the Old Camp still open and close by hand with the VR hinge, and no NPC "uses" a door.
  • G1: NPCs in the Old Camp still sleep in their beds as before.
  • Hero: lying down in a BEDHIGH bed still works in G2 Khorinis and in the Valley of Mines.

Save/load

No new state. The mob list is rebuilt each time a world loads.

Known gaps / follow-ups

  • Compiled in the Editor together with the other fixes of this playtest round (EditMode tests 87/87), not play tested yet.
  • The log line fires once per such bed on every world load (a few dozen lines in the Old Camp).

AI usage

Claude ported the fix from the experimental branch (c496efa16) and made the bed check stricter (IsBed() instead of "visual doesn't start with DOOR"). The lost-fixes analysis found the gap.

…obs (BEDHIGH_2_OC) are AI_UseMob mobs

Like the engine, a bed is a bed even when the world stores it as oCMobDoor. VobService skipped every oCMobDoor
for the NPC mob list, so ZS_Sleep never found these beds and the Old Camp slept standing next to them. Real doors
stay excluded (ZenKitExtension.IsBed: visual BED*). Ported from the experimental branch (c496efa).
@JaXt0r
JaXt0r merged commit a844642 into develop Nov 22, 2026
1 check passed
@JaXt0r
JaXt0r deleted the fix/g2-oc-beds branch November 22, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants