Skip to content

fix: lock pick at a key-only lock - hero says he needs the key instead of exceptions - #551

Open
BoroBongo wants to merge 1 commit into
developfrom
fix/lock-pick-in-key-only-lock
Open

BoroBongo wants to merge 1 commit into
developfrom
fix/lock-pick-in-key-only-lock

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

What

A lock pick put into a lock that has no pick combination (key-only lock, or one that never opens) no longer starts lock picking. It works like touching the lock with an empty hand: the key in the inventory opens it, else the hero says why it doesn't open (G2 PL: "Bez właściwego klucza nigdy tego nie otworzę!" = $KEYMISSING, or $NEVEROPEN).

Gothic's locked doors/chests carry two separate fields in the world file: the key instance and the pick combination (e.g. LRRLR). Key only / pick only / both (key or pick) / neither (never opens). Before, the pick went into every lock; UpdateCombination then read the first char of the empty combination on every 45° turn of the hand and threw each time.

Why

Found while checking the lock types for the G2 playtest (no report yet, the code path throws for every key-only chest/door).

How to test manually

  • G2/G1: hold a lock pick and put it into a chest/door that the hero calls key-only when touched with an empty hand ("Bez właściwego klucza nigdy tego nie otworzę!"). The hero says that line, no exception in the log, turning the hand does nothing.
  • Same with the key in the backpack: the chest opens.
  • A chest with a combination (empty hand: "Przydałoby się parę wytrychów!" or "Hm... Nie mam ani klucza, ani wytrychu.", e.g. Xardas' chest upstairs in G2): picking works as before.

Save/load

No new state.

Known gaps / follow-ups

  • Breaking a pick is still a 50% coin flip (old FIXME), no dexterity/talent check.

… the hand - the hero says he needs the key, the key in the inventory opens it

Gothic's locks have a key and/or a pick combination (world file). A lock without combination (key only, never opens) took the pick anyway; UpdateCombination read the first char of the empty combination on every 45 degree turn. Now the pick works like an empty hand there: the key in the inventory opens the lock, else the hero says $KEYMISSING / $NEVEROPEN.
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