Repository navigation
fix: G2 locked doors and chests open with their key again, and lock picking works in G2 - #537
Merged
Merged
Conversation
…icking works in G2 G2 has no _STR_SOUND_PICKLOCK_* symbols. The sound name getters called GetString(0) on null, the NullReferenceException stopped the unlock before LockPickComboFinished, so a key (in the backpack or in the hand) never opened the lock and every lock pick step threw. G2 uses its SFX instances PICKLOCK_SUCCESS/ FAILURE/BROKEN/UNLOCK instead, like the experimental branch did (9debdbd).
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
In Gothic 2, a locked door or chest opens with its key again, and lock picking works.
VmService: the lock pick sound names (PickLockSuccess/Failure/Broken/UnlockSoundName) no longer throw when thegame has no
_STR_SOUND_PICKLOCK_*symbol. G2 has none, so its SFX instancesPICKLOCK_SUCCESS,PICKLOCK_FAILURE,PICKLOCK_BROKENandPICKLOCK_UNLOCKare used. G1 is unchanged.Why
Playtest 2026-11-22 (G2 Night of the Raven, PCVR build from develop): with the key in the backpack or in the hand,
touching the locked chest in Xardas' tower did nothing (no comment, no opening). Without the key the hero said
"$PICKLOCKORKEYMISSING", so only the key path was broken. The session log shows why:
The sound is played before
LockPickComboFinishedandUnlockAndPushOpen, so the exception stopped the unlock.The same getters are used on every lock pick step, so picking a lock threw in G2 too. The experimental branch had this
fix (9debdbd); only its hand roll part reached main. No issue exists for it.
How to test manually
ITKE_XARDASin the backpack: touch thechest with an empty hand - unlock sound, the lid opens.
success/failure/broken sounds and opens the lock, no NullReferenceException in the log.
Save/load
No new state. An unlocked chest/door is saved as before (
IsLocked = falseon the VOB).Known gaps / follow-ups
key $PICKLOCKORKEYMISSING not (yet) implemented(LogCat Misc) is still logged; the SVM line plays anyway.AI usage
Claude found the cause in the user's session log and ported the fix from the experimental branch. The user found the
bug in a playtest.