Mount & Blade II: Bannerlord

In here I want to give everyone a little overview on how ATC and it's config files work so you can better understand what you can configure and how. Hopefully that enables you to play M&B II Bannerlord the way YOU want to play it.

Q: What does ATC actually do?
A: ATC in itself doesn't do anything. It relies on custom troop trees and their configuration files. As an example I provide a custom troop tree (Chael Nad'ra) that comes with its own configration file.

Q: Where do I have to put the configuration file!

A: Short answer: You don't need to put it anywhere. If everyhting is set up right it's plug & play. Here are the explanations of what files there are and what they do. (green = relevant for current version, yellow = outdated, should be deleted if present)

<MyMod>_ATC.modconfig.xml - Can exist multiple times. Contains the individual troop replacement information for a specific mod (in this case creatively named MyMod). The file has to follow the naming pattern *ATC.modconfig.xml. COMES WITH EACH TROOP TREE MOD!
ATC.config.merged.xml
- This is the xml representation of what the game internally is working with. Here you can check if your <ModName>_ATC.modconfig.xmls combined are looking like what you expected.Gets generated by ATC when loading a game (NOT in the main menu) for you to check.
ATC.debug.log
- As the name implies this is a log file generated by ATC to log several important key aspects of the mod, i.e. which config files it found and loaded.
ATC.settings.xml- This is the main configuration file. In some versions I tried out MCM and this was handled with the ingame Mod Options menu, but lately I removed MCM again and moved all relevant configuration options back into this xml file for better compatibility. ATC does not come with this file anymore to prevent overwriting the changes made by you. To generate this file you have to launch Bannerlord with ATC enabled at least once! 



Q: What does the Mod Scan option do?
A: The Mod Scan switch (found in the ATC.settings.xml) allows ATC to look into all folders in the /Modules subfolder for files named *ATC.modconfig.xml. If it is disabled it will look for config files named *ATC.modconfig.xml only in /ProgramFiles/Mount and Blade II Bannerlord/ATC/Config.

Q: Why do I have to handle XML files? I don't know how?!

A: As of 1.3.x you don't have to anymore. Mods released with an included *ATC.modconfig.xml will automatically be included in your troop replacement logic if you have the Mod Scan option enabled (see "What does the Mod Scan option do?"). you can check which troops are replaced by checking the ATC.config.merged.xml in the ATC /Config folder (/ProgramFiles/Mount and Blade II Bannerlord/ATC/Config). Also the new ATC.debug.log will give you an idea of what the mod found and included.

Q: My ATC.config.merged.xml is empty and my game doesn't seem to find any configurations!
A: You have to make sure the mod scan option is enabled. I added this option for your convenience, you don't have to use it for ATC to work. If you keep it disabled though you have to manually configure the troop replacement and the configuration files by putting them into the ATC/Config folder.

To DISABLE Mod Scan you have to go into the ATC.settings.xml and set the respective option to "false"!

Q: How can mod authors use ATC?

A: Easy. Just add a ATC.modconfig.xml (naming pattern described above) to your mod, it doesn't really matter where the file is as long as it follows the naming convention. There is NO need anymore to move the file into ATCs /Config folder anymore when you enable the mod scan option. The mod's configuration file can be easily distributed with the troop tree and the player does not need to move/copy/modify anything at all.

Q: How can I keep track of all the mod's configration files?
A: When ATC has loaded all config files it could find it will write a file called ATC.config.merged.xml. That file shows you what ATC is currently using for its troop replacements. Also the rather new ATC.debug.log shows what kind of information are loaded during the initialization.

Q: Some mods deliver their troops with 100% replacement rate? Won't those troops be the only ones recruitable?
A: No. If ATC detects, that all percentages of all target troops combined for a source troop are more than 100% it will redistribute the percentages evenly through all target troops. However if all combined troops are BELOW 100% ATC will not change the percentages. That means the remaining percentage will spawn the native troops of the settlement's culture.

Q: My troops don't get replaced!?
A: Existing troops in the settlements will NOT be replaced! Only NEW recruits will be replaced if they are configured properly.
Example:
* EmpireTown has 5 Imperial Recruits.
* Now you enable/change/install ATC to replace all Imperial Recruits with MyCustomBadAsses by using the following configuration
<MapFaction id="empire">
<Culture id="default">
<basicTroops>
<volunteer id="MyCustomBadAsses" percent="100" />
</basicTroops>
</Culture>
</MapFaction>
* Restart the game, load your save: The 5 Imperial Recruits will still be there! That is no bug!
* Recruit those 5 Imperial Recruits to free their slots and wait for new recruits to arrive. THOSE will be MyCustomBadAsses!


Q: I set my troops to cultureonly and/or kingdomonly. Why can I still recruit them?

A: The player is currently able to recruit ALL availble troops in any settlement. This is due to the fact that the player recruits troops in a completely different way.

Q: I'm sceptical about your code, is there any way to make sure you don't install spyware on my computer?

A: Sure, check out the source code at GitHub - Adonnay's Troop Changer (outdated)


ALWAYS CHECK YOUR /ProgramFiles/Mount and Blade II Bannerlord/ATC/ATC.debug.log, it can give you alot of information!

Article information

Added on

Edited on

Written by

Adonnay

1 comment

  1. milky04
    milky04
    • member
    • 0 kudos
    Q: Where do I have to put the configuration file!
    A: Short answer: You don't need to put it anywhere. If everything is set up right it's plug & play. Here are the explanations of what files there are and what they do. (green = relevant for current version, yellow = outdated, should be deleted if present)

    ^^^^^^^^^^^^^^^^^^^
    This answer doesn't help at all. the Idea behind plug and play is that you put it somewhere to be able to be plugged in. if I don't download the file and put it in the correct folder how does it read anything? it doesn't. this really aggravates me as I have been trying to get your mod to read my troop tree for hours now because there is no sufficient instruction on how to add a third party troop tree.  Your instructions should be written for a person who has never downloaded a mod before.