Adding a new faction to warband?

Users who are viewing this thread

Pretty much the same. Some codes have been moved to different place like the setting for kingdom reinforcement template, guard troops,..
 
A new script: "initialize_faction_troop_types".

Edit: some other info get a new script such as arena fight, custom banner color, econ,...
 
ok i did what i did on the original and looked for the new things and it is not working the leader and the town i give it works but the lords are not there it crash when thay do so can some one please give me a tutorial?
 
Ziller, i added 2 new factions with Warband, but whith 1.005 module system.
The below steps might help you !
It is allin spoiler

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),
 
Thank you very much Alexandru_cel_Mare  :smile: but it is also crashing and it is when i go to the town now :sad:
edit got it working i missed some things lol
 
Alexandru_cel_Mare said:
Ziller, i added 2 new factions with Warband, but whith 1.005 module system.
The below steps might help you !
It is allin spoiler

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),


Those steps are great i think you still need to edit 2 files module_constants and module_faction in order to make it complete.
 
dzorro said:
Alexandru_cel_Mare said:
Ziller, i added 2 new factions with Warband, but whith 1.005 module system.
The below steps might help you !
It is allin spoiler

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),


Those steps are great i think you still need to edit 2 files module_constants and module_faction in order to make it complete.

lol i know it is great luckly i got it working seems i missed a thing or two what do i need to edit in module_constants?
 
To change the titles of the kingdom lords, go to module_strings.py (in module system)
and find this line: "tavernkeeper_invalid_quest"
below that you will see this:

("faction_title_male_player", "Lord {s0}"),
  ("faction_title_male_1", "Count {s0}"),
  ("faction_title_male_2", "Boyar {s0}"),
  ("faction_title_male_3", "{s0} Noyan"),
  ("faction_title_male_4", "Jarl {s0}"),
  ("faction_title_male_5", "Count {s0}"),
  ("faction_title_male_6", "Emir {s0}"),
#add this line:
  ("faction_title_male_7", "Lord {s0}"),
 
("faction_title_female_player", "Lady {s0}"),
  ("faction_title_female_1", "Countess {s0}"),
  ("faction_title_female_2", "Boyarina {s0}"),
  ("faction_title_female_3", "{s0} Hatun"),
  ("faction_title_female_4", "Grevinne {s0}"),
  ("faction_title_female_5", "Countess {s0}"),
  ("faction_title_female_6", "Sayeda {s0}"),
#add this line:
  ("faction_title_female_7", "Lady {s0}"),


Change the Titles Count, Boyar, Jarl, Count, Noyan and Emir to your desired choice.
Change Lord and Lady to your desired title.
 
:grin: :grin: :grin: :grin: :grin:

Been looking for something like this a LOOONG time Thank you

All i have to figure out now is how to add Citys and villages And expand the map???!?!
 
Back
Top Bottom