That sounds pretty complicated and I dont even know if someone actually got it working in NW by following those instructions. This is how i did it in Iron Europe. All you are going to touch are 2 files:
module_factions and
module_scripts, really.
Let's start from
module_factions. This is how it looks like at the beginning in a NW Vanilla 1.104 Module System:
factions = [
("no_faction","No Faction",0, 0.9, [], []),
("commoners","Commoners",0, 0.1,[("player_faction",0.1)], []),
("outlaws","Outlaws", max_player_rating(-30), 0.5,[("commoners",-0.6),("player_faction",-0.15)], [], 0x888888),
# Factions before this point are hardwired into the game end their order should not be changed.
("neutral","Neutral",0, 0.1,[("player_faction",0.0)], [],0xFFFFFF),
("player_faction","Player Faction",0, 0.9, [], []),
("player_supporters_faction","Player's Supporters",0, 0.9, [("player_faction",1.00),("outlaws",-0.05)], [], 0xFF4433), #changed name so that can tell difference if shows up on map
("britain", "United Kingdom", 0, 0.9, [("outlaws",-0.05),], [], 0xCCBB99),
("france", "Empire Francais", 0, 0.9, [("outlaws",-0.05)], [], 0xCC99FF),
("prussia", "Konigreich Preussen", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("russia", "Rossiyskaya Imperiya", 0, 0.9, [("outlaws",-0.05)], [], 0x33DDDD),
("austria", "Kaisertum Osterreich", 0, 0.9, [("outlaws",-0.05)], [], 0x33DD33),
("kingdoms_end","{!}kingdoms_end", 0, 0,[], []),
("kingdom_6", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_7", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_8", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_9", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_10", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("british_ranks", "British Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("french_ranks", "French Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCC99FF),
("prussian_ranks", "Prussian Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("russian_ranks", "Russian Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("austrian_ranks", "Austrian Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
]
What you need to do is just move the string kingdoms_end up to the point where you want to exclude certain factions. For instance, should we want to remove Prussia, Austria and Russia, we are going to put the following string just below the last faction we want to include.
("kingdoms_end","{!}kingdoms_end", 0, 0,[], []),
Move it like so:
factions = [
("no_faction","No Faction",0, 0.9, [], []),
("commoners","Commoners",0, 0.1,[("player_faction",0.1)], []),
("outlaws","Outlaws", max_player_rating(-30), 0.5,[("commoners",-0.6),("player_faction",-0.15)], [], 0x888888),
# Factions before this point are hardwired into the game end their order should not be changed.
("neutral","Neutral",0, 0.1,[("player_faction",0.0)], [],0xFFFFFF),
("player_faction","Player Faction",0, 0.9, [], []),
("player_supporters_faction","Player's Supporters",0, 0.9, [("player_faction",1.00),("outlaws",-0.05)], [], 0xFF4433), #changed name so that can tell difference if shows up on map
("britain", "United Kingdom", 0, 0.9, [("outlaws",-0.05),], [], 0xCCBB99),
("france", "Empire Francais", 0, 0.9, [("outlaws",-0.05)], [], 0xCC99FF),
("kingdoms_end","{!}kingdoms_end", 0, 0,[], []),
("prussia", "Konigreich Preussen", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("russia", "Rossiyskaya Imperiya", 0, 0.9, [("outlaws",-0.05)], [], 0x33DDDD),
("austria", "Kaisertum Osterreich", 0, 0.9, [("outlaws",-0.05)], [], 0x33DD33),
("kingdom_6", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_7", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_8", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_9", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("kingdom_10", "Invalid Faction", 0, 0.9, [("outlaws",-0.05)], [], 0xDDDD33),
("british_ranks", "British Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("french_ranks", "French Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCC99FF),
("prussian_ranks", "Prussian Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("russian_ranks", "Russian Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
("austrian_ranks", "Austrian Other Ranks", 0, 0.9, [("outlaws",-0.05)], [], 0xCCBB99),
]
After you've done this, let's go to module_scripts. Now we want to change the "Combo button" for the factions selection so that it just considers 2 factions, or the amount of factions you specified. Ah, this also works in case you're adding more than 5 factions to the game and they don't show up correctly in the selection menu. Adding a new faction would require me more time to explain how to do it, but let's go back on topic:
Search for the script
multiplayer_fill_available_factions_combo_button, CTRL + F and you should get this nice wall of commented code:
("multiplayer_fill_available_factions_combo_button",
[
(store_script_param, ":overlay_id", 1),
(store_script_param, ":selected_faction_no", 2),
## (store_script_param, ":opposite_team_selected_faction_no", 3),
## (try_for_range, ":cur_faction", "fac_britain", "fac_kingdoms_end"),
## (try_begin),
## (eq, ":opposite_team_selected_faction_no", ":cur_faction"),
## (try_begin),
## (gt, ":selected_faction_no", ":opposite_team_selected_faction_no"),
## (val_sub, ":selected_faction_no", 1),
## (try_end),
## (else_try),
## (str_store_faction_name, s0, ":cur_faction"),
## (overlay_add_item, ":overlay_id", s0),
## (try_end),
## (try_end),
## (val_sub, ":selected_faction_no", "fac_britain"),
## (overlay_set_val, ":overlay_id", ":selected_faction_no"),
(try_for_range_backwards, ":cur_faction", factions_begin, factions_end),
(str_store_faction_name, s0, ":cur_faction"),
(overlay_add_item, ":overlay_id", s0),
(try_end),
(val_sub, ":selected_faction_no", "fac_britain"),
(store_sub,":selected_faction_no", 4,":selected_faction_no"),
(overlay_set_val, ":overlay_id", ":selected_faction_no"),
]),
In this script, there is only one thing we are going to touch. Do you see that 4 I highlighted in red? That's the amount of selectable factions - 1. So if we just want to have 2 factions in our mod, we are going to change that number to 1. By the way, why does it show the number of factions-1 ? I don't know, most likely Vince was drunk. So we are going to have the following code:
("multiplayer_fill_available_factions_combo_button",
[
(store_script_param, ":overlay_id", 1),
(store_script_param, ":selected_faction_no", 2),
## (store_script_param, ":opposite_team_selected_faction_no", 3),
## (try_for_range, ":cur_faction", "fac_britain", "fac_kingdoms_end"),
## (try_begin),
## (eq, ":opposite_team_selected_faction_no", ":cur_faction"),
## (try_begin),
## (gt, ":selected_faction_no", ":opposite_team_selected_faction_no"),
## (val_sub, ":selected_faction_no", 1),
## (try_end),
## (else_try),
## (str_store_faction_name, s0, ":cur_faction"),
## (overlay_add_item, ":overlay_id", s0),
## (try_end),
## (try_end),
## (val_sub, ":selected_faction_no", "fac_britain"),
## (overlay_set_val, ":overlay_id", ":selected_faction_no"),
(try_for_range_backwards, ":cur_faction", factions_begin, factions_end),
(str_store_faction_name, s0, ":cur_faction"),
(overlay_add_item, ":overlay_id", s0),
(try_end),
(val_sub, ":selected_faction_no", "fac_britain"),
(store_sub,":selected_faction_no",1,":selected_faction_no"),
(overlay_set_val, ":overlay_id", ":selected_faction_no"),
]),
Happy coding!!