Repository navigation
Conversation
… hero had no body state and never walked, ran or sneaked The hero's BodyState stayed 0 the whole game (BS_STAND is 98304, it carries flags), so UpdateHeroBodyState returned early every frame: hearing (walk/run only), sneaking, ZS_Attack_Loop's run-away and the pickpocket rules never saw a moving hero. Under the XRI rig CharacterController.velocity was also 0 in every moving frame (the ground snap's downward Move comes last), so the speed now comes from the rig's movement per frame. G2: Mika turns and talks when approached from behind, sneaking up makes him observe the hero. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…nt as standing for the scripts, not as no body state NpcProperties.BodyState had no start value, so every NPC, the hero (VR and Flat) and NPCs rebuilt on save load started at 0. BS_STAND is 98304 (it carries the interruptable and free-hands flags), so 0 is no Gothic body state: Npc_GetBodyState gave 0 to the scripts, C_BodyStateContains(npc, BS_STAND) and Npc_HasBodyFlag were false for every idle NPC until a walk action ran, and the writers (VR hero movement, swimming, water, falling) skipped it. The start value now lives next to the field, so VRHeroMovement no longer patches the hero's 0. G1: a standing hero blocking an NPC gets the B_MoveNpc reaction; spells on idle NPCs no longer make them stand up first. NPCs already chest-deep in water at spawn count as swimming. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Haiku 5.5 <[email protected]>
Contributor
Author
Review (architecture-reviewer + gothic-reviewer) on 73a8054Verdicts:
Editor checks (G2, save in Khorinis), all passed:
|
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
NPCs hear the VR hero again: a guard turns around when the hero walks or runs up behind him. Sneaking works again too: crouching with the sneak talent makes the hero quiet, and guards watch him (
ZS_ObservePlayer).Two bugs together kept the hero from ever walking, running or sneaking for the scripts:
NpcProperties.BodyStatestarted at 0, butBS_STANDis 98304 because it carries the interruptable and free-hands flags. So 0 is no body state at all.VRHeroMovementonly updates stand/walk/run/sneak, so it skipped the hero every frame, for the whole game. Every idle NPC was 0 too, andC_BodyStateContains(npc, BS_STAND)was false for it. The field now starts atBsStandfor NPCs, the hero (VR and Flat) and NPCs rebuilt on load.CharacterController.velocitywas 0 in every frame the rig moved:XriRig.SnapToGrounddoes a downwardMove()after the walk, and Unity's velocity only reflects the lastMove(). The speed now comes from how far the rig root moved this frame.Why
Regression from the XRI rig (HVR reported a real velocity) and the PR split. Reported in a playtest: Mika at Khorinis' east gate (G2) ignored the hero standing right behind him.
How to test manually
Hero body states are not logged per frame. The script reactions below are the visible proof.
ZS_ObservePlayerin the log), or stays unaware where the scripts say so.B_MoveNpcnow gets past itsC_BodyStateContains(other, BS_STAND)check (it always returned early before), so the NPC reacts.ZS_Attack_Loopgives up the chase after a while ($RUNCOWARD).AI_StandUp.No DeveloperConfig flags.
Save/load
BodyStateis not saved. After a load, every NPC starts standing again (dead NPCs are set dead afterwards, as before). Nothing is applied twice.Known gaps / follow-ups
VRSpellTransformPuppetstill readsCharacterController.velocity, so a transformed hero never counts as running. Also two open questions: should room-scale walking count, and should standing on a moving platform?🤖 Generated with Claude Code