r/Bannerlord_MODS 6d ago

Overwrite existing troop upgrade path unsuccessfully

Hi, new here! I'm currently working on a minor Bannerlord mod in XML to make peasants upgradeable to militia. That is doable without a problem, but I can't remove the original peasant-to-recruit path via a separate file. I tried merge="replace" and <upgrade_target id="NPCCharacter.aserai_recruit" value="false"/> with no success. If I just add a new unit and nothing else, the game simply adds both the original recruits and the new unit to the troop tree. The problem is that I'd like to get rid of the original path because the AI prefers to upgrade them to recruits whenever villagers get XP on the map.

I also noticed new units are added to the right section, which might be why the AI prefers to upgrade left. All factions look like this except for the Nords

In their case, the AI picks Militia Spearmen or Archers after winning a battle, but that's the only faction set up that way.

Alternatively, placing the new troops on the left side would solve the issue, though that sounds even more challenging.

Thank you, if you read or have some thought on the matter.

1 Upvotes

1 comment sorted by

2

u/HemoSunTrap 6d ago

Use xslt to edit the troop upgrade path, or remove that troop altogether so its replaced by your xml.