SP Native Custom Commander v1.396 for Warband 1.165+ (source code included)

Users who are viewing this thread


Is it possible to add parts of this mod to another one without having the sources for said mod, just by adding the right lines in the txt files ?


It's over three years since I visited the forum last time. In the past three years, I got married and had a two-year-old daughter. I come back to update my MOD at this forum now.
The newest version is 1.397 for Warband v1.165+. There are over 20 versions updated on a Chinese forum since v1.349. Sorry for my bad English, I can't translate all update notes of those versions.

The general features for those versions are as following:
1. Restoration and rebellion for AI factions.
2. Equip management for the player and NPCs.
3. Book management for the player and NPCs.
4. Two sets of weapons for the player and NPCs.
5. Perfect Troop Tree system. Automatically generate troop trees by my recursive and backtracking algorithm.
6. New skill: Precise Shot. Each point to this skill increases ranged damage by 6%%. Base on AGI
  New skill effect for Ironflesh: reduces damage suffered by 5%%.
  Get rid of original trainer skill and create a new trainer skill. They are almost the same.
  But the effective skill level of new trainer skill is not more than the difference on troop level between this hero and other member.
  The Max level for new trainer skill is 15. Experience gained goes as: {0,4,10,16,23,30,38,46,55,65,75,87,100,115,131,150}.
  Combine tracking skill with Path-finding skill.
7. Mercenaries in taverns are not a team with the same troop.
  They are 2-5 teams, and every team has 3 different troops. The teams have 3 different types.
8. A new town for Swadia: Keebur. Several castles and villages.
9. New crosshair. New style of main menu.
10. Lords can exchange members with their castles/towns automatically to balance the amount and the quality on members.
11. Lords (and their horses) get 1/2 damage and delivery double damage.
12. Many more MOD options in camp menu.
13. New battle mini-map.
14. 6 special weapon merchants for 6 towns. They sell the specified type of weapons, not all types of weapons.
15. You can recruit troops from towns and castles of a faction after you become a lord of the faction.
16. New improvement for towns: Smelter. A smelter increases the quality of weapons and armours in merchant's store and allow the weaponsmith and armorer to reinforce your weapons and armours.
  New improvement for castles: Training Field. A training field lets your party get one more training at 12 o'clock when you are in the castle.
  New improvement for towns and castles: Barrack. A barrack lets you recruit more elite troops and shorten the time period of recruiting.
17. A Lord can exchange villages with other lords of the same faction to make him has a town/castle and its branch village.
  The player can also exchange villages with other lords in camp menu.
18. New items: steel bow, steel lance, Flat Headed Arrows, Piercing Arrows, Vaegir War Horse and so on.
19. Many more features that you need to discover in gamming.

The full update notes are here:


MacCutCheoN said:
how can i get horsemans????

Look at the troop trees in reports menu. Cavalry of Swadia, Vaegirs, Sarranid are in a separate upgrade line, they can't be upgraded from footmen. You need to join one of these factions, then you can recruit troops in castles or towns of the faction, and have a possiblity to get cavalry. Or you can recruit mercenary horseman in taverns of towns. In addition, all Khergits are horsemen.


Sergeant at Arms
is there a modmerger version for custom commander... i want to add it to my mod that has diplo 4.+2pbod 93 and freelancer


Hi guys!

The only way to get custom troops is through tavern? Or you can change a culture of your kingdom and get them from villages?


Knight at Arms
Hi Rubik!

Just dropping a thank you note, and letting you know that I modified a piece of your code to be used to sort defeated enemy parties by descending level prior to looting, in order to solve the Warband glitch where kill-order determines looting priority and can cause low level loot to fill up the loot buffer before high level troops are looted.

Here is the code I added to "party_calculate_loot", replacing  (party_get_num_companion_stacks, ":num_stacks",":enemy_party"), with the below larger block:
  (party_get_num_companion_stacks, ":num_stacks",":enemy_party"), 
  (assign, ":last_stack", ":num_stacks"),
  (try_for_range, ":unused", 0, ":num_stacks"),
    (assign, ":best_stack", -1),
    (assign, ":best_level", -1),
    (try_for_range, ":cur_stack", 0, ":last_stack"),
      (party_stack_get_troop_id, ":cur_troop", ":enemy_party", ":cur_stack"),
      (neg|troop_is_hero, ":cur_troop"),
      (store_character_level, ":troop_level", ":cur_troop"),
      (gt, ":troop_level", ":best_level"),
      (assign, ":best_level", ":troop_level"),
      (assign, ":best_stack", ":cur_stack"),
      (gt, ":best_stack", -1),
      (party_stack_get_troop_id, ":stack_troop", ":enemy_party", ":best_stack"),
      (party_stack_get_size, ":stack_size", ":enemy_party", ":best_stack"),
      (party_remove_members, ":enemy_party", ":stack_troop", ":stack_size"),
      (party_add_members, ":enemy_party", ":stack_troop", ":stack_size"),
      (val_sub, ":last_stack", 1),
And the details of the glitch it fixes: https://www.reddit.com/r/mountandblade/comments/8p48ge/kill_order_effect_on_looting_and_mod_solutions/

I will give you credit, per your grant of permission to use your source, when the adapted code is incorporated into my mod in the next release (VC Balance Mod, for Viking Conquest: https://forums.taleworlds.com/index.php?topic=373658.0)

I am also offering the solution to any other modders who might want to solve the glitch, of course with the requirement that they also give you credit if they copy the above code.

Thank you so much!

EDIT: slight revision to code

Hi everyone! I have an issue with this feature introduced by this otherwise fantastic mod:

"#. The horse' HP will influence its speed, if the horse' HP is lower, its speed will be lower"

I simply don't like this mechanic and would want to remove it. There are no in-game option for this, however, and I have absolutely no idea which file I should edit from the mod module folder. Could someone more knowledgeable than me advise me on how to do this?


Knight at Arms
Hi catniphoarder!

The code for that is in module_mission_templates.py. I think you will have to remove both the block of code itself, and references to load it elsewhere in the file (so search for whatever it is called, something with horse in the name).
Tingyun said:
Hi catniphoarder!

The code for that is in module_mission_templates.py. I think you will have to remove both the block of code itself, and references to load it elsewhere in the file (so search for whatever it is called, something with horse in the name).

Thanks for your advice, Tingyun. I haven't had the time to test this thoroughly, but it seems that deleting all the lines of code associated with the string "custom_commander_horse_speed" from the module_misson_templates.py file and the subsequent compiling solved my problem.
Top Bottom