Mount & Blade: Warband, Adding Faction Print

  • Mount and Blade, Warband, Facction, Configuring
  • 6

Click here to order your Mount and Blade Warband server with Citadel today!

 



This article will show you how to add factions to your server.


First step

Module factions.py
Look for cultures, you have 6, i added another one (what i add is bold):

  ("culture_1",  "{!}culture_1", 0, 0.9, [], []),
  ("culture_2",  "{!}culture_2", 0, 0.9, [], []),
  ("culture_3",  "{!}culture_3", 0, 0.9, [], []),
  ("culture_4",  "{!}culture_4", 0, 0.9, [], []),
  ("culture_5",  "{!}culture_5", 0, 0.9, [], []),
  ("culture_6",  "{!}culture_6", 0, 0.9, [], []),
  ("culture_7",  "{!}culture_7", 0, 0.9, [], []),

then further down
  ("kingdom_1",  "Swadian Empire", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xEE7744),
  ("kingdom_2",  "Vaegir Tzardom",    0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCCBB99),
  ("kingdom_3",  "Khergit Khanate", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xCC99FF),
  ("kingdom_4",  "Nordic Monarchy",    0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x33DDDD),
  ("kingdom_5",  "Rhodok Confederacy",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x33DD33),
  ("kingdom_6",  "Sarranid Sultanate",  0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xDDDD33),
  ("kingdom_7",  "Custom Kingdom", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0xFFFFAAFF), (0xFFFAAFF is the colour)



Second step

You need to create troops for your new faction. I copy pasted as placeholder Sarranid troops, then modified their names. Do the same with the lords and with the ladies.

If you want custom peasants and custom townspeople for your faction, do again the copy paste and edit process.



Third step

Open Module_Party_Templates, look for kingdom reinforcements.

  ("kingdom_6_reinforcements_a", "{!}kingdom_6_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_sarranid_footman,3,7),(trp_sarranid_recruit,3,6)]),
  ("kingdom_6_reinforcements_b", "{!}kingdom_6_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_sarranid_archer,2,6),(trp_sarranid_skirmisher,4,7)]),
  ("kingdom_6_reinforcements_c", "{!}kingdom_6_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_sarranid_mamluke,3,6)]),

  ("kingdom_7_reinforcements_a", "{!}kingdom_7_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_Custom_footman,3,7),(trp_Custom_recruit,3,6)]),
  ("kingdom_7_reinforcements_b", "{!}kingdom_7_reinforcements_b", 0, 0, fac_commoners, 0, [(trp_Custom_archer,2,6),(trp_Custom_skirmisher,4,7)]),
  ("kingdom_7_reinforcements_c", "{!}kingdom_7_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_Custom_mamluke,3,6)]),



Step Four

this is very complicated, and not sure it is entirely corect....

Open module_scripts.py

Go to where you see Cultures,

      (faction_set_slot, "fac_culture_6", slot_faction_tier_1_troop, "trp_sarranid_recruit"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_2_troop, "trp_sarranid_footman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_3_troop, "trp_sarranid_archer"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_4_troop, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_culture_6", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),

      (faction_set_slot, "fac_culture_7", slot_faction_tier_1_troop, "trp_Custom_recruit"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_2_troop, "trp_Custom_footman"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_3_troop, "trp_Custom_archer"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_4_troop, "trp_Custom_horseman"),
      (faction_set_slot, "fac_culture_7", slot_faction_tier_5_troop, "trp_Custom_mamluke"),

then further down, you will edit these so that your faction may have custom town walkers.

      (faction_set_slot, "fac_culture_6", slot_faction_town_walker_male_troop, "trp_sarranid_townswoman"),
      (faction_set_slot, "fac_culture_6", slot_faction_town_walker_female_troop, "trp_sarranid_townswoman"),
      (faction_set_slot, "fac_culture_6", slot_faction_village_walker_male_troop, "trp_sarranid_townsman"),
      (faction_set_slot, "fac_culture_6", slot_faction_village_walker_female_troop, "trp_sarranid_townswoman"),
      (faction_set_slot, "fac_culture_6", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_6", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

      (faction_set_slot, "fac_culture_7", slot_faction_town_walker_male_troop, "trp_Custom_townswoman"),
      (faction_set_slot, "fac_culture_7", slot_faction_town_walker_female_troop, "trp_Custom_townswoman"),
      (faction_set_slot, "fac_culture_7", slot_faction_village_walker_male_troop, "trp_Custom_townsman"),
      (faction_set_slot, "fac_culture_7", slot_faction_village_walker_female_troop, "trp_Custom_townswoman"),
      (faction_set_slot, "fac_culture_7", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_7", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

Further down, you have Factions, here you also need to add new faction.

     (faction_set_slot, "fac_kingdom_6",  slot_faction_culture, "fac_culture_6"),
     (faction_set_slot, "fac_kingdom_6",  slot_faction_leader, "trp_kingdom_6_lord"),
     (troop_set_slot, "trp_kingdom_6_lord", slot_troop_renown, 1200),
     
     (faction_set_slot, "fac_kingdom_7",  slot_faction_culture, "fac_culture_7"),
     (faction_set_slot, "fac_kingdom_7",  slot_faction_leader, "trp_kingdom_7_lord"),
     (troop_set_slot, "trp_kingdom_7_lord", slot_troop_renown, 1200),

Further down, another Faction Banners needs to be modified. It took me a while to figure it how. Do not put anything larger than "f" at mesh banner, it will not work. I have put "a" and it works fine.

      (faction_set_slot, "fac_kingdom_1", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_2", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_3", slot_faction_banner, "mesh_banner_kingdom_c"),
      (faction_set_slot, "fac_kingdom_4", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_5", slot_faction_banner, "mesh_banner_kingdom_d"),
      (faction_set_slot, "fac_kingdom_6", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_banner, "mesh_banner_kingdom_a"),

Further down is give center to faction, that you need to edit if you already have inserted new town or castle.

Further down, there are the teritorial disputes. I did not added anything yet, but i think this too can be modified.

If you scroll down, there is Place Kingdom Ladies.

     (faction_set_slot, "fac_kingdom_1", slot_faction_adjective, "str_kingdom_1_adjective"),
     (faction_set_slot, "fac_kingdom_2", slot_faction_adjective, "str_kingdom_2_adjective"),
     (faction_set_slot, "fac_kingdom_3", slot_faction_adjective, "str_kingdom_3_adjective"),
     (faction_set_slot, "fac_kingdom_4", slot_faction_adjective, "str_kingdom_4_adjective"),
     (faction_set_slot, "fac_kingdom_5", slot_faction_adjective, "str_kingdom_5_adjective"),
     (faction_set_slot, "fac_kingdom_6", slot_faction_adjective, "str_kingdom_6_adjective"),

I DO NOT HAVE THE SLIGHTEST IDEA WHAT IS THIS...

Further down, is quick game quick start, for quick battle mode. I think if you want to play custom battle with your new faction, you need to add things here also:

      (faction_set_slot, "fac_kingdom_6", slot_faction_quick_battle_tier_1_infantry, "trp_sarranid_veteran_footman"),
      (faction_set_slot, "fac_kingdom_6", slot_faction_quick_battle_tier_2_infantry, "trp_sarranid_infantry"),
      (faction_set_slot, "fac_kingdom_6", slot_faction_quick_battle_tier_1_archer, "trp_sarranid_skirmisher"),
      (faction_set_slot, "fac_kingdom_6", slot_faction_quick_battle_tier_2_archer, "trp_sarranid_archer"),
      (faction_set_slot, "fac_kingdom_6", slot_faction_quick_battle_tier_1_cavalry, "trp_sarranid_horseman"),
      (faction_set_slot, "fac_kingdom_6", slot_faction_quick_battle_tier_2_cavalry, "trp_sarranid_mamluke"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_quick_battle_tier_1_infantry, "trp_custom_veteran_footman"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_quick_battle_tier_2_infantry, "trp_custom_infantry"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_quick_battle_tier_1_archer, "trp_custom_skirmisher"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_quick_battle_tier_2_archer, "trp_custom_archer"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_quick_battle_tier_1_cavalry, "trp_custom_horseman"),
      (faction_set_slot, "fac_kingdom_7", slot_faction_quick_battle_tier_2_cavalry, "trp_custom_mamluke"),

then again, further down, is faction banners.
You add same thing as before when dealing with banners.

Further down, there is price slot. I do not know what it is, but i added the new faction here aswell.

      (store_sub, ":sarranid_price_slot", "fac_kingdom_6", npc_kingdoms_begin),
      (val_add, ":sarranid_price_slot", slot_item_multiplayer_faction_price_multipliers_begin),
      (store_sub, ":custom_price_slot", "fac_kingdom_7", npc_kingdoms_begin),
      (val_add, ":custom_price_slot", slot_item_multiplayer_faction_price_multipliers_begin),


Closer to the end of the file, under      #LORD OCCUPATIONS, BLOOD RELATIONSHIPS, RENOWN AND REPUTATIONS there is something very important, you need to modify this to have normal family relations in a faction and avoid erors such as having your lords sisters and wifes in other faction.

         (is_between, ":cur_troop", "trp_knight_6_1", "trp_knight_7_1"),
         (store_sub, ":npc_seed", ":cur_troop", "trp_knight_6_1"),
         (assign, ":ancestor_seed", 31),
      (else_try),
         (is_between, ":cur_troop", "trp_knight_7_1", "trp_kingdom_1_pretender"),
         (store_sub, ":npc_seed", ":cur_troop", "trp_knight_7_1"),
         (assign, ":ancestor_seed", 37),
   
      (try_end),

 


Was this answer helpful?

« Back