Skip to content

Editing SubModule.xml

SaulHE edited this page Apr 22, 2020 · 11 revisions

For the options to work, you should include the additional SubModule that Bannerlord.MBOptionScreen provides

    <SubModule>
      <Name value="MBOptionScreen" />
      <DLLName value="MBOptionScreen.dll" />
      <SubModuleClassType value="MBOptionScreen.MBOptionScreenSubModule" />
      <Tags>
        <Tag key="DedicatedServerType" value="none" />
        <Tag key="IsNoRenderModeElement" value="false" />
      </Tags>
    </SubModule>

In conclusion, let's say you are making a mod Aragas.MercenaryContract.

And you would like to use MBOptionScreen as a dependency.

Instead of your old ways with ModLib(when you add a DependedModule).

You should add another tag of SubModule inside the SubModules tag.

So basically your SubModules tag is supposed to hold two SubModule tag inside of itself.

And they should look like this:

<SubModules>
    <SubModule>
      <Name value="Aragas.MercenaryContract" />
      <DLLName value="Aragas.MercenaryContract.dll" />
      <SubModuleClassType value="Aragas.MountAndBlade.MercenaryContractSubModule" />
      <Tags>
        <Tag key="DedicatedServerType" value="none" />
        <Tag key="IsNoRenderModeElement" value="false" />
      </Tags>
    </SubModule>
    <SubModule>
      <Name value="MBOptionScreen" />
      <DLLName value="MBOptionScreen.dll" />
      <SubModuleClassType value="MBOptionScreen.MBOptionScreenSubModule" />
      <Tags>
        <Tag key="DedicatedServerType" value="none" />
        <Tag key="IsNoRenderModeElement" value="false" />
      </Tags>
    </SubModule>
  </SubModules>

Remember after you compile your mod, there is supposed to be an MBOptionScreen.dll inside the Win64_Shipping_Client folder of your module.

In this way, the Bannerlord launcher should load your module with MBOptionScreen without any problems.

Clone this wiki locally