Adding weapon parts, game crashes at launch

Users who are viewing this thread

schnoodly

Recruit
Hello, I thought I had followed examples to a T with the xml files, however when I enable my mod, it seems to just make the game crash while trying to load the main menu. Running the dump file, it seems the issue came from not being able to find the files I refer to in SubModule.xml?

Code:
An unhandled exception of type 'System.IO.DirectoryNotFoundException' occurred in Unknown Module.
Additional information: Could not find a part of the path 'E:\SteamLibrary\steamapps\common\Mount & Blade II Bannerlord\Modules\MoreMaceParts\SubModule.xml'.

The contents of my SubModule.xml:

XML:
<?xml version="1.0" encoding="utf-8"?>
<Module>
  <Name value = "More Mace Parts"/>
  <Id value = "MoreMaceParts"/>
  <Version value = "v0.0.1"/>
  <SingleplayerModule value="true"/>
  <MultiplayerModule value="false"/>
  <DependedModules/>
  <SubModules/>
  <Xmls>
    <XmlNode>
      <XmlName id="CraftingPieces" path="crafting_pieces_maceparts"/>
      <GameType value = "Campaign"/>
      <GameType value = "CampaignStoryMode"/>
      <GameType value = "CustomGame"/>
    </XmlNode>
  </Xmls>
</Module>

and the layout of my mod:

Code:
- MoreMaceParts
    - ModuleData
        - crafting_pieces_maceparts.xml
    - SubModule.xml

I will say, if I make the changes from my mod to the crafting_pieces.xml file in native, there's no issue. Any ideas for what's causing the crash, did I miss something?
 
Last edited:
Not sure if related but add DependedModules just to be safe

XML:
<DependedModules>
    <DependedModule Id="Native"/>
    <DependedModule Id="SandBoxCore"/>
    <DependedModule Id="Sandbox"/>
    <DependedModule Id="CustomBattle"/>
    <DependedModule Id="StoryMode" />
</DependedModules>
 
Upvote 0
Are you trying to add custom parts or copies of existing items? If you are using copies You can just add them to the game files. Create a copy of the parts you want in craftingpieces.xlm. Give them a name. Create the weapon in the Spitem.xlm with the custom name parts. Then add the parts to craftingtemplate.xlm. Just create a copy of everything you create because when they update you will probably have to add the parts again.
 
Upvote 0
Back
Top Bottom