Skip to content

fix: every SVM key finds its C_SVM line - G2 smalltalk/fight lines, G1 guard warnings - #543

Merged
JaXt0r merged 1 commit into
developfrom
fix/svm-keys
Nov 22, 2026
Merged

JaXt0r merged 1 commit into
developfrom
fix/svm-keys

Conversation

@BoroBongo

Copy link
Copy Markdown
Contributor

What

Every SVM key a script uses now finds its line in the game's C_SVM. The "key $X not (yet) implemented" errors are gone, and G1's full key names work.

  • ZenKitExtension.GetAudioName: keys that aren't in the switch are found by name among all members of ZenKit's SvmInstance (G1 and G2). The lookup ignores $, _ and case, and the member list is built once. Examples: $SMALLTALK28 → Smalltalk28, $MONSTERKILLED, $GOLD_30 → Gold30.
  • The lookup also covers G1's full names $IWillTeachYouRespectForForeignProperty and $YouViolatedForbiddenTerritory. With those, guards only moved their lips; this is the missing part of experimental f2efdc0.
  • $DOESNTWORK → ZenKit's DoesntMork (a typo in ZenKit).
  • $NOLEARNYOUREBETTER now plays its own line instead of NoLearnYouAlreadyKnow.
  • A key ZenKit doesn't know, such as a mod's own C_SVM member, logs one warning per world: [Svm] Key ... is no C_SVM member ZenKit knows. OutputSvm then still tries the vanilla SVM_<voice>_<key> name.

Why

The playtest log from 2026-11-22 (G2 Night of the Raven, develop) had Error [Misc] key $X not (yet) implemented for $SMALLTALK28-30, $MONSTERKILLED, $CHEERFRIEND01/02, $GOODMONSTERKILL, $NOTBAD, $MISSINGITEM, $DIEENEMY, $PICKLOCKORKEYMISSING and more. The switch only knew G1's keys. Most lines still played through the fallback, but the log was flooded, and GoToNpc treated those keys as "no line". The lost-fixes analysis of the experimental branch also found the two G1 key names from f2efdc0 missing. No issue exists.

How to test manually

  • G2: stand next to NPCs chatting in Khorinis (marketplace, harbour). The SMALLTALK lines play with subtitles, and no "not (yet) implemented" appears in the log.
  • G2: let an NPC kill a wolf or a meatbug near you. They say their MONSTERKILLED or GOODMONSTERKILL line.
  • G1: take an item from a hut in the Old Camp in front of its owner or a guard. The guard says "I will teach you respect for foreign property" with sound, not just moving his lips.
  • G1: walk into a forbidden area (e.g. Gomez' castle without permission). The guard's "You violated forbidden territory" line plays.
  • G1 and G2: try a locked chest without a key. The hero's comment still plays.

Save/load

No state.

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.
  • A mod's extra C_SVM members aren't in ZenKit's SvmInstance. They still rely on the SVM_<voice>_<key> naming fallback.
  • Reflection over SvmInstance assumes its string properties are only C_SVM members.

AI usage

Claude found the cause in the user's playtest log and wrote the fix. The lost-fixes analysis compared the experimental branch with develop.

…ented" errors, G1 full key names work

The SVM key -> C_SVM member switch only listed G1's keys, so G2's ($SMALLTALK25-30, $MONSTERKILLED,
$CHEERFRIEND01/02, $GOODMONSTERKILL, $NOTBAD, $DIEENEMY, $PICKLOCKORKEYMISSING, ...) logged an error. The lines
still played through OutputSvm's SVM_<voice>_<key> fallback, but GoToNpc.HasSvm saw no line and the log was
flooded. Keys not in the switch are now found by name among all string members of ZenKit's SvmInstance (G1 and
G2, cached once, '_' ignored), which also covers G1's full names $IWillTeachYouRespectForForeignProperty and
$YouViolatedForbiddenTerritory (experimental f2efdc0). $DOESNTWORK maps to ZenKit's DoesntMork typo,
$NOLEARNYOUREBETTER to its own line instead of NoLearnYouAlreadyKnow. Unknown keys (a mod's own C_SVM member)
warn once per world.
@JaXt0r
JaXt0r merged commit eb2b2ee into develop Nov 22, 2026
1 check passed
@JaXt0r
JaXt0r deleted the fix/svm-keys branch November 22, 2026 14:03
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