So as I've been digging through the codebase to get a handle on how to do things, I came in with the expectation that dialogue would be contained in xml files. I see files like
The localization xmls gets use, I think. You can see extra ones in the Languages folders, like
We can see so much dialogue being hard coded in. As far as I can tell, the majority are in
How are folks working around this? Extending CampaignBehavior classes to swap in? Reaching in the guts of the ConversationManager to alter dialogue how you see fit? Has anyone gotten dialogue loading from xml in a satisfying way?
conversations.xml
, I see localizations of that file, and I figured "this must be where the dialogue is getting loaded from". And I think maybe that's how the developers had originally intended to approach it, because all of the dialogue in the extensive conversations.xml
is old. It's Warband dialogue, probably for testing purposes when they were building the Bannerlord engine. Looking at TaleWorlds.CampaignSystem.ConversationManager
, you can even see the internal method for loading that data: LoadConversations
.The localization xmls gets use, I think. You can see extra ones in the Languages folders, like
std_TaleWorlds.CampaignSystem.xml
(which, as far as I can tell, holds nearly all dialogue in the base campaign). But everything in them comes from the code.We can see so much dialogue being hard coded in. As far as I can tell, the majority are in
TaleWorlds.CampaignSystem.Sandbox.CampaignBehaviors
, in lines like campaignGameStarter.AddPlayerLine("child_dialogue_rhyme_start", "child_dialogue_regular_start", "child_dialogue_rhyme_start", "{=65PA77cZ}(Rhyme) \"Rain rain go away,\"", null, null, 100, null, null);
. But is that where they're supposed to live? Or is this just the state of the codebase for this early access release?How are folks working around this? Extending CampaignBehavior classes to swap in? Reaching in the guts of the ConversationManager to alter dialogue how you see fit? Has anyone gotten dialogue loading from xml in a satisfying way?