Any way to mod how AI chooses melee weapons?

Currently viewing this thread:

My fellow modders, title says it all. Do any of you know how to affect how AI chooses from multiple melee weapons? Recent vanilla patches resulted in spear being preferred even over axes and maces (at least in RBM). If any of you know which part of the code is responsible for this behaviour I would be really grateful.

Edit: just realized this is wrong section, would it be possible to move this thread to Bannerlord smithy instead?
Last edited:


Spanish Gifquisition
Grandmaster Knight
Hopefully some bright mind will create a switch-weapon order soon. It is beyond my understanding how Taleworlds has managed to go from having that kind of mechanic (use of weapons) in the previous installments and now in Bannerlord betting everything on the AI's decision without the player having the remotest chance. I don't get it... this should belong to the "basics" within the UI.
Hmm, found workaround. Game only needs to "think" that some weapons have certain damage, their real damage can be totally different.
Yes thats what is happenning since I increased damage of 1h weapons to 60-120. However I reworked entire troop tree prior to that with focus on mixed units (part of units only with polearm while part of unit got polearm vs cav and sidearm such as axe, sword or mace vs foot infantry. However this turned into spears only when I gave all weapons roughly the same damage (60-120). So I had to reduce thrust damage in its calculation for all weapons (this primarely hit polearms), so the game things that thrust damage of spears is low, then I buff the damage again in different part of the code so the damage is still comparable to sword / axe raw damage. I hope this makes sense.

What I found out is that if swords and axes need to deal at least twice as much damage then spears in order to be preferred and three times as much if you want them preferred for cav vs cav melee.
Top Bottom