A bug I dont understand "Failed to load module info in ....."

Users who are viewing this thread

I'm having some issue with a bug I can't wrap my head around, but maybe someone here knows. So I can load the mod game verion 1.4.1, with any and all mods no conflicts what so ever. But there are two guys who also have 1.4.1 that gets the error "Failed to load module info in mod files path. This prevents launcher to start. Remove this module and report it to that mod's author." and crashes the game instantly, independant if they load other mods or not so its not a compatability issue. The logs (both look like this, essentially identical https://pastebin.com/Rvk4mX3Z ) indicates that there is something going tits up when reading xml-files. The only xml files in the mod are the SubModule.xml(which looks like this https://pastebin.com/XDwZcu3F ) and a modified version or GUI/Brushes/Nameplates.xml (https://pastebin.com/ier5j42e). I've gone over the files a few times and I cant see what the issue would be, I'm completely lost atm. ( link to mod discussion page https://www.nexusmods.com/mountandblade2bannerlord/mods/1837?tab=posts ). The only thing I have noted that is different to me and their setups is that I think they have polish language windows, but i think thats grasping at straws(is .NET packaged differently for different languages?).
 
The game is very particular about properly formatted XML files and the SubModule.xml is missing an opening <Xmls> tag. The closing tag is present but the slash is on the wrong side (shown red) and you must add the opening tag (shown green). I haven't looked into it further but start with that.

<Module>
<Name value="oet"/>
<Id value="SettlementFactionNameplate"/>
<Version value="v0.1.0"/>
<SingleplayerModule value="true"/>
<MultiplayerModule value="false"/>
<DependedModules>
<DependedModule Id="Sandbox"/>
</DependedModules>
<SubModules>
<SubModule>
<Name value="SettlementFactionNameplate"/>
<DLLName value="SettlementFactionNameplate.dll"/>
<SubModuleClassType value="SettlementFactionNameplate.SettlementFactionNameplateModule"/>
<Tags>
</Tags>
</SubModule>
</SubModules>
<Xmls>
</Xmls>
</Module>
 
Last edited:
Upvote 0
For comparison here is an example of one that works.

HTML:
<Module>
    <Name value="MyMod"/>
    <Id value="MyMod"/>
    <Version value="v1.0.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>
    <SubModules>
        <SubModule>
            <Name value="MyMod"/>
            <DLLName value="MyMod.dll"/>
            <SubModuleClassType value="MyMod.Main"/>
            <Tags>
                <Tag key="DedicatedServerType" value="none" />
                <Tag key="IsNoRenderModeElement" value="false" />
            </Tags>
        </SubModule>
    </SubModules>
    <Xmls>
    
        <XmlNode>
            <XmlName id="Items" path="cust_items"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "Sandbox"/>
                <GameType value = "SandBoxCore"/>
                <GameType value = "CampaignStoryMode"/>
                <GameType value = "CustomGame"/>
            </IncludedGameTypes>
        </XmlNode>
        
        <XmlNode>
            <XmlName id="NPCCharacters" path="cust_companions"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "Sandbox"/>
                <GameType value = "SandBoxCore"/>
                <GameType value = "CampaignStoryMode"/>
                <GameType value = "CustomGame"/>
            </IncludedGameTypes>
        </XmlNode>
        
        <XmlNode>
            <XmlName id="strings" path="cust_conversations"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "Sandbox"/>
                <GameType value = "SandBoxCore"/>
                <GameType value = "CampaignStoryMode"/>
                <GameType value = "CustomGame"/>
            </IncludedGameTypes>
        </XmlNode>
        
        <XmlNode>
            <!-- This file prevents vanilla wanderers from spawning -->
            <XmlName id="NPCCharacters" path="remove_vanilla_wanderers"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "Sandbox"/>
                <GameType value = "SandBoxCore"/>
                <GameType value = "CampaignStoryMode"/>
                <GameType value = "CustomGame"/>
            </IncludedGameTypes>
        </XmlNode>
        
    </Xmls>
</Module>

I have also had issues in the past with using a different value for the version number and with putting <!-- comments --> outside the root node in some files. The comments issue only crashed the game when done for certain files but not others. Your files don't do this, but I mention it because it may save you some headaches as it isn't very logical or consistent.
 
Upvote 0
Thank you so much for the reply. Do you know if the game requires these tags at all even if not used per se? Can you ommit the xml tags compleatly or are they needed simply because?
 
Upvote 0
So to update this, the people who have the crash still do so this is obviously not the solution to this crash/bug (not ruling out that this is good practise and can prevent other crashes). I have not gotten any further in my search for a fix yet so it is still open.
 
Upvote 0
(In writing this response I noticed your <SubModule /> tag does not match my example. Regardless it is best if you work through the steps below.)

My approach would be to disable all mods, verify the integrity of local game files, and run the game, so as to confirm you have a clean start. Then add incremental changes until you find the broken part.

Once you have confirmed the game runs properly without any mods, edit your SubModule.xml file so it looks like this:
HTML:
<Module>
    <Name value="MyMod"/>
    <Id value="MyMod"/>
    <Version value="v1.0.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>
    <SubModules>
        <!-- DLLs go here -->
    </SubModules>
    <Xmls>
        <!-- XMLs go here -->
    </Xmls>
</Module>

Run the game again making sure to select "MyMod" from the available mods. Do not activate any other mods. If the game runs properly, exit and edit your SubModule.xml file so it looks like this:
HTML:
<Module>
    <Name value="oet"/>
    <Id value="SettlementFactionNameplate"/>
    <Version value="v0.1.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>
    <SubModules>
        <!-- DLLs go here -->
    </SubModules>
    <Xmls>
        <!-- XMLs go here -->
    </Xmls>
</Module>

Run the game again making sure to select "oet" from the available mods. Do not activate any other mods. If the game runs properly, exit and edit your SubModule.xml file so it looks like this:
HTML:
<Module>
    <Name value="oet"/>
    <Id value="SettlementFactionNameplate"/>
    <Version value="v0.1.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>
    <SubModules>
        <SubModule>
            <Name value="SettlementFactionNameplate"/>
            <DLLName value="SettlementFactionNameplate.dll"/>
            <SubModuleClassType value="SettlementFactionNameplate.SettlementFactionNameplateModule"/>
            <Tags>
                <Tag key="DedicatedServerType" value="none" />
                <Tag key="IsNoRenderModeElement" value="false" />
            </Tags>
        </SubModule>
    </SubModules>
    <Xmls>
        <!-- XMLs go here -->
    </Xmls>
</Module>

If the game fails to run properly at any point you will know which change is responsible.
 
Last edited:
Upvote 0
Note that if you get to step 3 and the game launcher starts but the game crashes at some point during operation, the problem should be with your DLL. None of the SubModule.xml versions above attempt to load any other XML, so unless you're loading XML files within your DLL the problem is somewhere in your C# code.
 
Upvote 0
Thank you so much for the answear and the walkthrough you wrote :smile:

The thing is that on my computer the mod works flawlessly and I can't reproduce the crash, yet still it occurs forr others. The message and logs from the crash are very indescriptive so I don't have much to go on. Since the xml seem to be correctly formatted now and the crash still occurs for those players I feel it is almost impossible for me to fix unless someone who has had this message before and fixed their error finds this thread. I'll leave the thread unsolved for the mean time and move on for the time being.
 
Upvote 0
It could be that the other users have corrupted their files somehow. I had a situation where the launcher wouldn't start at all even after removing my mod. I had to verify local files in steam before the game would run again. After doing that my mod worked fine. Perhaps ask the other users to clean up their installations?
 
Upvote 0
Back
Top Bottom