Clans banners: my XML is overridden

Users who are viewing this thread

Suffren

Recruit
Hi,

I'm trying to make a mod that modify clans banners.

So i have created a submodule with a 'XmlName' tag with an id 'Factions' to override the 'Mount & Blade II Bannerlord\Modules\SandBox\ModuleData\spclans.xml':

Code:
<?xml version="1.0" encoding="utf-8"?>
<Module>
    <Name value=">"Test Banners"/>
    <Id value="TestBanners"/>
    <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/>
    <Xmls>
        <XmlNode>
            <XmlName id="Factions" path="bannersclans"/>
            <IncludedGameTypes>
                <GameType value = "Campaign"/>
                <GameType value = "CampaignStoryMode"/>
                <GameType value = "CustomGame"/>
            </IncludedGameTypes>
        </XmlNode>
    </Xmls>
</Module>

I've also created 'bannersclans.xml' (in a 'ModuleData' folder in my module folder) that contains a copy of 'spclans.xml'. The banners are modified when I start a new game but if I load a save, there are no changes. I assume that the save or a script overrides my XML. Any ideas of where the problem comes from or what can i do ?

Thanks.

Note: 'spclans.xml' comes from 'SandBox' folder. In order to test, i've tried to modify troop skills from 'SandBoxCore' with the 'spnpccharacters.xml' file and the changes applys even if i load a save.
 
When a new campaign starts, the game initializes clans banners with the data from XML files. The game does it only once. When you loading the save file, the game does not initialize banners, instead, it takes them from the save file. So if you modify XML files in mid-game, the changes will not be applied. You have to start a new campaign to see the changes.
However, game not always store data in the save file, for example, troop skills. This is why you can see these changes.
 
Upvote 0
Oh right, i see, thanks for your reply.

It is currently possible to apply the changes in mid-game ? (by modifying file obviously but how!)

I mean, i checked the doc but it's pretty confusing. I saw your code above... i don't get it (why '84' and what the expected '_banner' format)
 
Last edited:
Upvote 0
Back
Top Bottom