New Tutorial: http://forums.taleworlds.com/index.php/topic,334271.0.html
Ok, so, there is no straight answer to creating a faction so I will put a tutorial.
Thanks to: Egbert, CryptoCactus, and Ziller for helping me!
First you need to create the faction.
Go to module factions.
Go to your module_scripts now.
You need a king and a knight!
Go to your module_troops.
Yeah you got a faction...now you need troops!
Go to your module_troops.
Now give your kingdom reinforcements:
Go to module_party_templates.
Now we need to set the culture.
Got to module_scripts.
Now you need to activate them!
Go to module_scripts.
Now I think you need a town.
Go to module_parties. NOTE: IF YOU DO NOT CREATE VILLAGES AS WELL, YOUR CITY WILL TAKE THE NEAREST 3 VILLAGES FOR ITSELF!
Now go to module_scenes.
Now after that, you need to do some browsing! Go to C:\Program Files (x86)\Mount&Blade Warband\Modules\YourMod\SceneObj. So basically go to your mod directory and click on SceneObj.
Ok when there you need to...
Now you need to give that city to your kingdom lord..
Go to module_scripts
Ok, so, there is no straight answer to creating a faction so I will put a tutorial.
Thanks to: Egbert, CryptoCactus, and Ziller for helping me!
First you need to create the faction.
Go to module factions.
Put this:
Below this:
also
Put this:
Note: the 0x254117 is the kingdom's color.
Below this:
Code:
("culture_7", "{!}culture_7", 0, 0.9, [], []),
Below this:
Code:
("culture_6", "{!}culture_6", 0, 0.9, [], []),
also
Put this:
Code:
("kingdom_7", "YourFactionName", 0, 0.9, [("outlaws",-0.05),("peasant_rebels", -0.1),("deserters", -0.02),("mountain_bandits", -0.05),("forest_bandits", -0.05)], [], 0x254117),
Below this:
Code:
("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),
Go to your module_scripts now.
Put this:
Note: This is just a copy of Swadia's town walkers.
Below this:
also
Put this:
Below this:
Code:
(faction_set_slot, "fac_culture_7", slot_faction_town_walker_male_troop, "trp_town_walker_1"),
(faction_set_slot, "fac_culture_7", slot_faction_town_walker_female_troop, "trp_town_walker_2"),
(faction_set_slot, "fac_culture_7", slot_faction_village_walker_male_troop, "trp_village_walker_1"),
(faction_set_slot, "fac_culture_7", slot_faction_village_walker_female_troop, "trp_village_walker_2"),
(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"),
Below this:
Code:
(faction_set_slot, "fac_culture_6", slot_faction_town_walker_male_troop, "trp_sarranid_townsman"),
(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"),
also
Put this:
Code:
(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),
Below this:
Code:
(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),
You need a king and a knight!
Go to your module_troops.
Put this:
Note: This is a copy of the Sawdian's king. And the 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000 is the face code.
Below this:
There's your king!
Now put this:
Note: 0x000000002900200436db6d86db6db6db00000000001db6db0000000000000000 is MY facecode.
Below this:
There's your knight! Also the prefix "itm" is item. So those are the items they are going to have ingame. The skills are on the last line.
Code:
["kingdom_7_lord", "King YourName", "YourName", tf_hero, 0,reserved, fac_kingdom_7,[itm_charger, itm_rich_outfit, itm_blue_hose, itm_plate_boots, itm_plate_armor, itm_gauntlets, itm_bastard_sword_b, itm_tab_shield_heater_cav_b, itm_great_helmet], knight_attrib_5,wp(220),knight_skills_5|knows_trainer_5, 0x0000000f45041105241acd2b5a66a86900000000001e98310000000000000000,swadian_face_older_2],
Below this:
Code:
["kingdom_6_lord", "Sultan Hakim", "Hakim", tf_hero, 0,reserved, fac_kingdom_6,[itm_warhorse_sarranid, itm_mamluke_mail, itm_sarranid_boots_c, itm_sarranid_mail_coif, itm_mail_mittens, itm_sarranid_cavalry_sword, itm_tab_shield_small_round_c], knight_attrib_3,wp(220),knight_skills_4|knows_trainer_5, 0x0000000a4b103354189c71d6d386e8ac00000000001e24eb0000000000000000, rhodok_face_old_2],
There's your king!
Now put this:
Code:
["knight_7_1", "Lord YourName", "YourName", tf_hero, 0, reserved, fac_kingdom_7, [itm_warhorse, itm_nobleman_outfit, itm_coat_of_plates, itm_leather_boots, itm_splinted_leather_greaves, itm_flat_topped_helmet, itm_gauntlets, itm_bastard_sword_b, itm_tab_shield_heater_d], knight_attrib_5,wp(260),knight_skills_5|knows_trainer_3, 0x000000002900200436db6d86db6db6db00000000001db6db0000000000000000, swadian_face_young_2 ],
Note: 0x000000002900200436db6d86db6db6db00000000001db6db0000000000000000 is MY facecode.
Below this:
Code:
["knight_6_20", "Emir Biliya", "Biliya", tf_hero, 0, reserved, fac_kingdom_6, [itm_warhorse_sarranid, itm_sarranid_cavalry_robe, itm_sarranid_boots_c, itm_sarranid_boots_c, itm_sarranid_veiled_helmet, itm_lance, itm_sarranid_cavalry_sword, itm_tab_shield_small_round_c], knight_attrib_5,wp(240),knight_skills_5|knows_trainer_6, 0x00000001bd0040c0281a899ac956b94b00000000001ec8910000000000000000, rhodok_face_older_2],
There's your knight! Also the prefix "itm" is item. So those are the items they are going to have ingame. The skills are on the last line.
Yeah you got a faction...now you need troops!
Go to your module_troops.
Here you can do whatever you want. For this, I will copy a Swadian Recruit.
Put your copied solder
Mine is:
Below this:
Note: Make sure it saids fac_kingdom_7 at the end!
Now you can mess with it! Here's my custom troop!
Note: If you want to upgrade troops, make sure you have two troops first. Then at the very bottom of the module_troops put
upgrade(troops,"trp_nord_champion","trp_nord_is_awesome"
ALSO!
You need messangers, deserters, and guards...
So copy some, I copied the Swadians
and rename it to fit your faction
Put your copied solder
Mine is:
Code:
["swadian_recruit","Swadian Recruit","Swadian Recruits",tf_guarantee_armor,0,0,fac_kingdom_1,
[itm_scythe,itm_hatchet,itm_pickaxe,itm_club,itm_stones,itm_tab_shield_heater_a,itm_leather_cap,itm_felt_hat,itm_felt_hat,
itm_shirt,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots],
def_attrib|level(4),wp(60),knows_common,swadian_face_younger_1, swadian_face_middle_2],
Below this:
Code:
["relative_of_merchants_end","relative_of_merchants_end","relative_of_merchants_end",tf_hero, 0,0, fac_commoners,[],def_attrib|level(2),wp(20),knows_inventory_management_10,0],
Note: Make sure it saids fac_kingdom_7 at the end!
Now you can mess with it! Here's my custom troop!
Code:
["nord_champion","Nord Champion","Nord Champion",tf_guarantee_armor,0,0,fac_kingdom_7,
[itm_scythe,itm_hatchet,itm_pickaxe,itm_club,itm_stones,itm_tab_shield_heater_a,itm_leather_cap,itm_felt_hat,itm_felt_hat,
itm_shirt,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots],
def_attrib|level(4),wp(60),knows_common,swadian_face_younger_1, swadian_face_middle_2],
Note: If you want to upgrade troops, make sure you have two troops first. Then at the very bottom of the module_troops put
upgrade(troops,"trp_nord_champion","trp_nord_is_awesome"
ALSO!
You need messangers, deserters, and guards...
So copy some, I copied the Swadians
Code:
["swadian_messenger","Swadian Messenger","Swadian Messengers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse|tf_guarantee_ranged,0,0,fac_kingdom_1,
[itm_sword_medieval_a,itm_leather_jerkin,itm_leather_boots,itm_courser,itm_leather_gloves,itm_light_crossbow,itm_bolts],
str_7 | agi_21 | int_4 | cha_4|level(25),wp(130),knows_common|knows_riding_7|knows_horse_archery_5,swadian_face_young_1, swadian_face_old_2],
["swadian_deserter","Swadian Deserter","Swadian Deserters",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_deserters,
[itm_bolts,itm_light_crossbow,itm_hunting_crossbow,itm_dagger,itm_club,itm_voulge,itm_wooden_shield,itm_leather_jerkin,itm_padded_cloth,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_footman_helmet],
def_attrib|level(14),wp(80),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face_young_1, swadian_face_old_2],
["swadian_prison_guard","Prison Guard","Prison Guards",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_kingdom_1,
[itm_awlpike,itm_pike,itm_great_sword,itm_morningstar,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_coat_of_plates,itm_plate_armor,itm_plate_boots,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves],
def_attrib|level(25),wp(130),knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face_young_1, swadian_face_old_2],
["swadian_castle_guard","Castle Guard","Castle Guards",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_kingdom_1,
[itm_awlpike,itm_pike,itm_great_sword,itm_morningstar,itm_sword_medieval_b,itm_tab_shield_heater_c,itm_tab_shield_heater_d,itm_coat_of_plates,itm_plate_armor,itm_plate_boots,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves],
def_attrib|level(25),wp(130),knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face_young_1, swadian_face_old_2],
and rename it to fit your faction
Now give your kingdom reinforcements:
Go to module_party_templates.
Put this:
Note: the 6,12 is how many Nord Champions they will get when they reinforce. So they'll get about 6 or 12
Below this:
Code:
("kingdom_7_reinforcements_a", "{!}kingdom_7_reinforcements_a", 0, 0, fac_commoners, 0, [(trp_nord_champion,6,12),
Below this:
Code:
("kingdom_6_reinforcements_c", "{!}kingdom_6_reinforcements_c", 0, 0, fac_commoners, 0, [(trp_sarranid_horseman,3,5)]),
Now we need to set the culture.
Got to module_scripts.
Put this:
Note: I used my custom troop, trp_nord_champion, in which you need to change it to your troop.
Below this:
Code:
(faction_set_slot, "fac_culture_7", slot_faction_tier_1_troop, "trp_nord_champion"),
Below this:
Code:
(faction_set_slot, "fac_culture_6", slot_faction_tier_5_troop, "trp_sarranid_mamluke"),
Now you need to activate them!
Go to module_scripts.
Put this:
Below this:
Code:
(else_try),
(faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_7"),
(faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_yourfaction_deserter"),
(faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_yourfaction_guard"),
(faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_yourfaction_messenger"),
(faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_yourfaction_prison_guard"),
(faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_yourfaction_castle_guard"),
(faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_7_reinforcements_a"),
(faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_7_reinforcements_b"),
(faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_7_reinforcements_c"),
Below this:
Code:
(else_try),
(faction_slot_eq, ":faction_no", slot_faction_culture, "fac_culture_6"),
(faction_set_slot, ":faction_no", slot_faction_deserter_troop, "trp_sarranid_deserter"),
(faction_set_slot, ":faction_no", slot_faction_guard_troop, "trp_sarranid_castle_guard"),
(faction_set_slot, ":faction_no", slot_faction_messenger_troop, "trp_sarranid_messenger"),
(faction_set_slot, ":faction_no", slot_faction_prison_guard_troop, "trp_sarranid_prison_guard"),
(faction_set_slot, ":faction_no", slot_faction_castle_guard_troop, "trp_sarranid_castle_guard"),
(faction_set_slot, ":faction_no", slot_faction_reinforcements_a, "pt_kingdom_6_reinforcements_a"),
(faction_set_slot, ":faction_no", slot_faction_reinforcements_b, "pt_kingdom_6_reinforcements_b"),
(faction_set_slot, ":faction_no", slot_faction_reinforcements_c, "pt_kingdom_6_reinforcements_c"),
Now I think you need a town.
Go to module_parties. NOTE: IF YOU DO NOT CREATE VILLAGES AS WELL, YOUR CITY WILL TAKE THE NEAREST 3 VILLAGES FOR ITSELF!
Note: This is a copy of Praven
Put this:
Note: The 9176, -47),[],260) is the coordinates of where the city will be placed!
Below this:
Put this:
Code:
("town_23","Stronghold", icon_town|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(176, -47),[],260),
Below this:
Code:
("town_22","Bariyye", icon_town_desert|pf_town, no_menu, pt_none, fac_neutral,0,ai_bhvr_hold,0,(165, -106.7),[], 225),
Now go to module_scenes.
Put this:
Below this:
Put this:
Below this:
Put this:
Below this:
Put this:
Below this:
Put this:
Below this:
Put this:
Below this:
Put this:
Below this:
Put this:
Below this:
Code:
("town_23_center",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300491830004a529000036230000312a00003653",
[],[],"outer_terrain_plain"),
Below this:
Code:
("town_22_center",sf_generate,"none", "none",(0,0),(100,100),-100,"0x000000025a03253200042d08000079d6000004fd00006910",
[],[],"outer_terrain_desert"),
Put this:
Code:
("town_23_castle",sf_indoors, "interior_castle_z", "bo_interior_castle_z", (-100,-100),(100,100),-100,"0",
["exit"],["town_6_seneschal"]),
Below this:
Code:
("town_22_castle",sf_indoors, "arabian_interior_keep_a", "bo_arabian_interior_keep_a", (-100,-100),(100,100),-100,"0x00000007300005000002308c00004a840000624700004fda",
["exit"],["town_22_seneschal"]),
Put this:
Code:
("town_23_tavern",sf_indoors, "interior_tavern_g", "bo_interior_tavern_g", (-100,-100),(100,100),-100,"0",
["exit"],[]),
Below this:
Code:
("town_22_tavern",sf_indoors, "interior_town_house_steppe_c", "bo_interior_town_house_steppe_c", (-100,-100),(100,100),-100,"0",
["exit"],[]),
Put this:
Code:
("town_23_store",sf_indoors, "interior_town_house_j", "bo_interior_town_house_j", (-100,-100),(100,100),-100,"0",
["exit"],[]),
Below this:
Code:
("town_22_store",sf_indoors, "interior_town_house_steppe_d", "bo_interior_town_house_steppe_d", (-100,-100),(100,100),-100,"0",
["exit"],[]),
Put this:
Code:
("town_23_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0xa0001d9300031ccb0000156f000048ba0000361c",
[],[],"outer_terrain_plain"),
Below this:
Code:
("town_22_arena",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002200005000005f57b00005885000046bd00006d9c",
[],[],"outer_terrain_desert"),
Put this:
Code:
("town_23_prison",sf_indoors,"interior_prison_e", "bo_interior_prison_e", (-100,-100),(100,100),-100,"0",
["exit"],[]),
Below this:
Code:
("town_22_prison",sf_indoors,"interior_prison_o", "bo_interior_prison_o", (-100,-100),(100,100),-100,"0",
["exit"],[]),
Put this:
Code:
("town_23_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x00000002300015e300063d8800002757000055df00001b08",
[],[],"sea_outer_terrain_1"),
Below this:
Code:
("town_22_walls",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000025a00723200046d1b00003e020000147600004387",
[],[],"outer_terrain_desert"),
Put this:
Code:
("town_23_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x300bc5430001e0780000448a0000049f00007932",
[],[],"outer_terrain_plain"),
Below this:
Code:
("town_22_alley",sf_generate,"none", "none", (0,0),(100,100),-100,"0x000000025a00723200046d1b00003e0200001476000052ae",
[],[],"outer_terrain_desert"),
Now after that, you need to do some browsing! Go to C:\Program Files (x86)\Mount&Blade Warband\Modules\YourMod\SceneObj. So basically go to your mod directory and click on SceneObj.
Ok when there you need to...
Copy the city folder you copied in the above step (the longest step). I copied Praven, p_town_6, so I need to copy
and rename them
Now go do the same thing to castles and towns!
Code:
scn_town_6_alley.sco
scn_town_6_arena.sco
scn_town_6_castle.sco
scn_town_6_center.sco
scn_town_6_prison.sco
scn_town_6_room.sco
scn_town_6_store.sco
scn_town_6_tavern.sco
scn_town_6_walls.sco
and rename them
Code:
scn_town_23_alley.sco
scn_town_23_arena.sco
scn_town_23_castle.sco
scn_town_23_center.sco
scn_town_23_prison.sco
scn_town_23_room.sco
scn_town_23_store.sco
scn_town_23_tavern.sco
scn_town_23_walls.sco
Now go do the same thing to castles and towns!
Now you need to give that city to your kingdom lord..
Go to module_scripts
Put this:
Below this:
Code:
(call_script, "script_give_center_to_lord", "p_town_23", "trp_kingdom_7_lord", 0),
Below this:
Code:
(call_script, "script_give_center_to_lord", "p_town_22", "trp_knight_6_3", 0),