Skip to content

3c - Chests and NPC loot on XRI - #431

Merged
JaXt0r merged 4 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-3c
Oct 24, 2026
Merged

JaXt0r merged 4 commits into
engine/hvr-replacementfrom
engine/hvr-replacement-3c

Conversation

@JaXt0r

@JaXt0r JaXt0r commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Merge order: 1a → 1b → 1c → 1d → 2a → 2b → 3a → 3b → 3c, all into engine/hvr-replacement (no stacking). Each branch still contains the commits of the earlier steps, so after the earlier PR is merged the diff of this one shrinks to its own step. Plan: Docs/HVR-replacement/.

Description

Phase 3c: chests and NPC loot on the Xri backend (needs 3b). Completes Phase 3. Also adds Docs/HVR-replacement/found-bugs.md.

  • VrChestSlots (chest content, slots fitted to the chest mesh, silent bulk spawn) on oCMobContainer; separate Xri slot children and a DropZone so dropping an item into the open chest stores it.
  • Interim chest lid VrChestLidToggle (grip = open/close, supports lock picking) until Phase 4's physical hinge.
  • VRNpcLoot uses VR Socket Slot on Xri; taking an item moves it to the player, equipped items show [E].
  • IVrHinge.IsActive/VrHinges.FindActive; door/container code tolerates a missing hinge. Opening a chest on Hvr no longer plays a burst of weapon sounds.
  • Slots keep their items when a chest closes.

To test

  • - Hvr: open a chest by physics, take/put items, loot an NPC; unchanged (apart from silent opening).
  • - Xri: grip the chest lid → opens, items appear small in the slots; take one; drop one into the chest; close/reopen → same items, none doubled.
  • - Xri: loot a dead NPC → equipped weapon marked [E]; taking it removes its mesh from the corpse; closing removes the slots.
  • - Xri: lock-pick a locked chest (untested).
  • Not tested: sounds, save → load, invalid ring on a full slot.
  • Known: > 12 items need pagination (logged as before); taking items doesn't change the saved chest contents; grabbing runtime-spawned chest items logs a culling error (found-bugs.md).

Test on (delete if irrelevant)

  • PCVR
  • Mobile VR (Quest/Pico)

🤖 Generated with Claude Code

…gs it open, the content spawns silently into slots laid out to the chest mesh, items can be taken out and dropped back into the open chest (VrContainerDropZone), closing hides the slots and reopening shows the same items; looting an NPC shows its items in XRI "VR Socket Slot"s, equipped weapons with [E], taking one removes it from the NPC (inventory, equipped list, weapon mesh). VRVobContainerPhysicsChest split: backend-neutral VrChestSlots (layout, content, silent spawn, one slot inventory per backend in oCMobContainer.prefab) and HvrPhysicsChest as HVR lid only; interim Xri lid VrChestLidToggle (IVrHinge, lock picking and open/close sounds) until VrHinge in Phase 4; IVrHinge.IsActive + VrHinges.FindActive, IVrBackend.Kind, IVrSocketContainer.IsActive/IsSilent; slots keep their items while deactivated (XRI let go of them when a chest closed); no weapon draw sounds while a chest spawns its content (also on HVR) (HVR phase 3c). Otherwise no player-visible change on the default Hvr backend.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JaXt0r
JaXt0r force-pushed the engine/hvr-replacement-3c branch from c34b159 to 4d87997 Compare October 24, 2026 04:34
@JaXt0r JaXt0r changed the title 3c - Chests and NPC loot on XRI, found-bugs doc 3c - Chests and NPC loot on XRI Oct 24, 2026
@JaXt0r

JaXt0r commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Locks not tested but Chest. Works as expected here.

@JaXt0r

JaXt0r commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Lockpicking tested. Works too.

@JaXt0r
JaXt0r merged commit bc56bcd into engine/hvr-replacement Oct 24, 2026
@JaXt0r
JaXt0r deleted the engine/hvr-replacement-3c branch October 24, 2026 18:59
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.

1 participant