Repository navigation
NPC speech as KOD resources instead of dlg text files - #368
Merged
Merged
Conversation
- kod/util/npcspeech: one class per town/group, EN in .kod, DE in .lkod, same triggers, moods and actions as the old dlg files (3696 lines) - triggers are resources as well (one per EN/DE pair); German triggers changed where one word contains another, because two trigger resources are compared only by their English value - Library adds them in CreateSpeechLibrary / CreateRandomLibrary; LIBACT_QUOTE_RSC sends %NAME etc. as resource parameters; spam keys after the class's own keys - dlg txt/tab sources and "read npcdlg.txt" removed (event tabs stay)
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
NPC talk (keyword answers and random quotes) is no longer loaded from the
dlg text files with
read npcdlg.txt. It is now normal KOD code:kod/util/npcspeech/: one class per town/group, English text in.kod,German text in
.lkod(same as all other translated resources)kod/util/library.kod:CreateSpeechLibrary/CreateRandomLibraryaddthe entries of these classes; same triggers, moods and actions as before
LIBACT_QUOTE_RSC: quotes with%NAMEetc. are sent as resourceparameters, so they work in both languages
read npcdlg.txtare removed; the event.tabfilesand their converter stay in
dlg/Why
every new world
.kod/.lkod)Notes
.kod, DE in.lkod). Two triggerresources are compared only by their English value, so a few German
triggers were changed where one word is part of another
(e.g. hi -> hallo, rat -> ratsmitglied).
recreateall(or a new world) once so the library isbuilt from the new classes.
Tested
random quotes and moods work
qbscripts/build-105.ps1) and Linux build