Trouble loading game after creating a module with nothing in

Users who are viewing this thread

I have followed all the instructions on the documentation and followed a youtube video and cannot get the game to run it just crashes as soon as i load the game
The module appears and i click the checkmark the game runs perfectly without it selected
Can someone help please
 
Solution
Try this way:
  • Create your 'module/folder' in the 'Modules' folder and name it ' zzz_MyModule'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule'.
  • Inside your 'module/folder' create a file and name it 'SubModule.xml'. Copy the xml structure for your SubModule:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Module>
    <Name value = "My Module"/>
    <Id value = "zzz_MyModule"/>
    <Version value = "v1.0.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <Official value ="false" />

    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>...
<Module>
<Name value="My Module"/>
<Id value="MyModule"/>
<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>
<!-- The following SubModule element is optional. You can remove this portion if your mod does not have a DLL associated with it. -->
<SubModule>
<Name value="MySubModule"/>
<!-- Path to the DLL File, if your Mod is called MyModule then it should be -->
<DLLName value="ExampleMod.dll"/>
<SubModuleClassType value="ExampleMod.MySubModule"/>
<Tags>
<Tag key="DedicatedServerType" value="none" />
<Tag key="IsNoRenderModeElement" value="false" />
</Tags>
</SubModule>
</SubModules>
<Xmls>
<XmlNode>
<XmlName type="1" id="Items" path="customitems"/>
</XmlNode>
<XmlNode>
<XmlName type="1" id="SPCultures" path="customcultures"/>
</XmlNode>
<XmlNode>
<XmlName type="1" id="NPCCharacters" path="customcharacters"/>
</XmlNode>
</Xmls>
</Module>
It is called SubModule and is an xml file, inside a modules folder called My Module
It is the copy paste from the documentation available
 
Upvote 0
I'm having a similar issue where I can't get my own mods to work, but others' mods work great. I'd like to know the answer to this...

As for the XML code, do you have a DLL named "MySubModule.dll"? If you don't, you should remove the related lines. From what I've seen, the syntax might be:

XML:
<SubModules>
</SubModules>
or:
XML:
<SubModules/>
 
Upvote 0
1) As stated above, make sure you have created a C# DLL with the namespace "ExampleMod" and the class "MySubModule".

2) Check that your "customitems.xml", "customcultures.xml", and "customcharacters.xml" files are all present in your "ModuleData" folder.

3) Define the included game types for each of your XML files. Also note you don't need the type attribute, even the native mod doesn't use it. Here's part of my working "SubModule.xml" for example:
Code:
<XmlNode>
<XmlName id="Items" path="CustomItems"/>
<IncludedGameTypes>
<GameType value = "Campaign"/>
<GameType value = "CampaignStoryMode"/>
<GameType value = "CustomGame"/>
</IncludedGameTypes>
</XmlNode>

4) Confirm each XML file is properly written. If any tags or closing tags are missing, or have been accidentally duplicated with copy and paste, it will fail. I suggest commenting out all your XMLs like this:
Code:
<Xmls>
<!--
<XmlNode>
<XmlName type="1" id="Items" path="customitems"/>
</XmlNode>
<XmlNode>
<XmlName type="1" id="SPCultures" path="customcultures"/>
</XmlNode>
<XmlNode>
<XmlName type="1" id="NPCCharacters" path="customcharacters"/>
</XmlNode>
-->
</Xmls>

After commenting them all out, test if the game loads into a new campaign. If it does the problem is in your XML files. Uncomment them one at a time as shown below, and try loading into a new campaign. When it fails you'll know which file has the problem.
Code:
<Xmls>
<XmlNode>
<XmlName type="1" id="Items" path="customitems"/>
</XmlNode>
<!--
<XmlNode>
<XmlName type="1" id="SPCultures" path="customcultures"/>
</XmlNode>
<XmlNode>
<XmlName type="1" id="NPCCharacters" path="customcharacters"/>
</XmlNode>
-->
</Xmls>

Sorry the formatting is all crap. This website is proving to be rubbish at maintaining the code indentation, and it keeps removing it.
 
Upvote 0
Try this way:
  • Create your 'module/folder' in the 'Modules' folder and name it ' zzz_MyModule'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule'.
  • Inside your 'module/folder' create a file and name it 'SubModule.xml'. Copy the xml structure for your SubModule:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Module>
    <Name value = "My Module"/>
    <Id value = "zzz_MyModule"/>
    <Version value = "v1.0.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <Official value ="false" />

    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>

    <SubModules/>
    <SubModule/>

    <Xmls>
        <XmlNode>
            <XmlName id="Items" path="customitems"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "CampaignStoryMode"/>
            </IncludedGameTypes>
        </XmlNode>
    </Xmls>
</Module>
  • Inside your 'module/folder' create a new folder and name it 'ModuleData'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule\ModuleData'.
  • Inside ''ModuleData'' create a file and name it ''customitems.xml''. Copy the xml structure for your customitems:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Items>
    <Item id="butter"
        name="{=VbL6GFmy}Butter"
        mesh="merchandise_cheese_b"
        item_category="butter"
        IsFood="true"
        value="25"
        weight="10"
        Type="Goods">
        <ItemComponent>
            <Food morale_bonus="1" />
        </ItemComponent>
        <Flags />
    </Item>
</Items>
  • Select 'My Module' in the launcher and play.
NOTE: Select only your mod and check if you have been successful with your first mod.
 
Upvote 0
Solution
Try this way:
  • Create your 'module/folder' in the 'Modules' folder and name it ' zzz_MyModule'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule'.
  • Inside your 'module/folder' create a file and name it 'SubModule.xml'. Copy the xml structure for your SubModule:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Module>
    <Name value = "My Module"/>
    <Id value = "zzz_MyModule"/>
    <Version value = "v1.0.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <Official value ="false" />

    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>

    <SubModules/>
    <SubModule/>

    <Xmls>
        <XmlNode>
            <XmlName id="Items" path="customitems"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "CampaignStoryMode"/>
            </IncludedGameTypes>
        </XmlNode>
    </Xmls>
</Module>
  • Inside your 'module/folder' create a new folder and name it 'ModuleData'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule\ModuleData'.
  • Inside ''ModuleData'' create a file and name it ''customitems.xml''. Copy the xml structure for your customitems:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Items>
    <Item id="butter"
        name="{=VbL6GFmy}Butter"
        mesh="merchandise_cheese_b"
        item_category="butter"
        IsFood="true"
        value="25"
        weight="10"
        Type="Goods">
        <ItemComponent>
            <Food morale_bonus="1" />
        </ItemComponent>
        <Flags />
    </Item>
</Items>
  • Select 'My Module' in the launcher and play.
NOTE: Select only your mod and check if you have been successful with your first mod.
Try this way:
  • Create your 'module/folder' in the 'Modules' folder and name it ' zzz_MyModule'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule'.
  • Inside your 'module/folder' create a file and name it 'SubModule.xml'. Copy the xml structure for your SubModule:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Module>
    <Name value = "My Module"/>
    <Id value = "zzz_MyModule"/>
    <Version value = "v1.0.0"/>
    <SingleplayerModule value="true"/>
    <MultiplayerModule value="false"/>
    <Official value ="false" />

    <DependedModules>
        <DependedModule Id="Native"/>
        <DependedModule Id="SandBoxCore"/>
        <DependedModule Id="Sandbox"/>
        <DependedModule Id="CustomBattle"/>
        <DependedModule Id="StoryMode" />
    </DependedModules>

    <SubModules/>
    <SubModule/>

    <Xmls>
        <XmlNode>
            <XmlName id="Items" path="customitems"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "CampaignStoryMode"/>
            </IncludedGameTypes>
        </XmlNode>
    </Xmls>
</Module>
  • Inside your 'module/folder' create a new folder and name it 'ModuleData'. '..\Mount & Blade II Bannerlord\Modules\zzz_MyModule\ModuleData'.
  • Inside ''ModuleData'' create a file and name it ''customitems.xml''. Copy the xml structure for your customitems:
XML:
<?xml version="1.0" encoding="utf-8"?>
<Items>
    <Item id="butter"
        name="{=VbL6GFmy}Butter"
        mesh="merchandise_cheese_b"
        item_category="butter"
        IsFood="true"
        value="25"
        weight="10"
        Type="Goods">
        <ItemComponent>
            <Food morale_bonus="1" />
        </ItemComponent>
        <Flags />
    </Item>
</Items>
  • Select 'My Module' in the launcher and play.
NOTE: Select only your mod and check if you have been successful with your first mod.

Thank you so much you are a god!
 
Upvote 0
This is why I hate it when mods can't be launched or downloaded via the Steam Workshop. I wouldn't know where to start to implement this.
I downloaded mods via Vortex and now nothing works.
 
Upvote 0
Back
Top Bottom