koban
Recruit
I have not found it anywhere, so here it is.
The idea was to force the lords to recruit their current faction`s troop. For example: if Tonju Noyan belongs to the Kingdom of Nords, he recruits nord troops (nord recruit, nord footman, nord veteran archer, huscarl, etc). And if you fight against the Kingdom of Nords, most of enemy troops will be nord infantry, not khergit horse archers, lancers, etc.
Most part of npc recruiting system is coded into game engine. The only possible way is to change parameter "slot_troop_original_faction". To make this happiness happened, open "module_scripts.py" file, find the "change_troop_faction" script and put this line there:
(troop_set_slot, ":troop_no", slot_troop_original_faction, ":faction_no"),
The culture of new faction is also the culture of lord now. And faction`s troops are the lord`s potential recruits.
This part works for any faction changes: treason, defection, etc. To check the changes, wait for 36 game hours and watch for latest lords defections. Then use cheat jump (hold ctrl and press left click on map) for teleportation to the lord. He should be recruiting troops of his new faction.
If you want to play old savegame and want to switch every lord`s culture to his current faction`s one, you could create new action in camp menu or put same trigger in an existing one. For example, edit the "module_scripts.py" file and let the cheat menu script "update_troop_political_notes" updates all lords cultures in a moment:
Start game with cheats on, load your save, call console (Ctrl + `), type there cheatmenu and press enter.
Go for camping somewhere. Look at camp cheats in camp menus, there should be "Update political notes.". Click on it and wait for few seconds. Take a little move on a map to be sure.
Call the console again (Ctrl + `), type there nocheatmenu and press enter again. New scripts should be working after 36 game hours. Now you could save the game.
The idea was to force the lords to recruit their current faction`s troop. For example: if Tonju Noyan belongs to the Kingdom of Nords, he recruits nord troops (nord recruit, nord footman, nord veteran archer, huscarl, etc). And if you fight against the Kingdom of Nords, most of enemy troops will be nord infantry, not khergit horse archers, lancers, etc.
Most part of npc recruiting system is coded into game engine. The only possible way is to change parameter "slot_troop_original_faction". To make this happiness happened, open "module_scripts.py" file, find the "change_troop_faction" script and put this line there:
(troop_set_slot, ":troop_no", slot_troop_original_faction, ":faction_no"),
# script_change_troop_faction
# Input: arg1 = troop_no, arg2 = faction
("change_troop_faction",
[
(store_script_param_1, ":troop_no"),
(store_script_param_2, ":faction_no"),
(try_begin),
#Reactivating inactive or defeated faction
(is_between, ":faction_no", kingdoms_begin, kingdoms_end),
(neg|faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
(faction_set_slot, ":faction_no", slot_faction_state, sfs_active),
#(call_script, "script_store_average_center_value_per_faction"),
(try_end),
#Political ramifications
(store_faction_of_troop, "rig_faction", ":troop_no"),
#remove if he is marshal
(try_begin),
(faction_slot_eq, "rig_faction", slot_faction_marshall, ":troop_no"),
(call_script, "script_check_and_finish_active_army_quests_for_faction", "rig_faction"),
#No current issue on the agenda
(try_begin),
(faction_slot_eq, "rig_faction", slot_faction_political_issue, 0),
(faction_set_slot, "rig_faction", slot_faction_political_issue, 1), #Appointment of marshal
(store_current_hours, ":hours"),
(val_max, ":hours", 0),
(faction_set_slot, "rig_faction", slot_faction_political_issue_time, ":hours"), #Appointment of marshal
(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
(store_faction_of_troop, ":active_npc_faction", ":active_npc"),
(eq, ":active_npc_faction", "rig_faction"),
(troop_set_slot, ":active_npc", slot_troop_stance_on_faction_issue, -1),
(try_end),
(try_begin),
(eq, "$players_kingdom", "rig_faction"),
(troop_set_slot, "trp_player", slot_troop_stance_on_faction_issue, -1),
(try_end),
(try_end),
(try_begin),
(troop_get_slot, "ld_marshall_party", ":troop_no", slot_troop_leaded_party),
(party_is_active, "ld_marshall_party"),
(party_set_marshall, "ld_marshall_party", 0),
(try_end),
(faction_set_slot, "rig_faction", slot_faction_marshall, -1),
(try_end),
#Removal as marshal ends
#Other political ramifications
(troop_set_slot, ":troop_no", slot_troop_stance_on_faction_issue, -1),
(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
(troop_slot_eq, ":active_npc", slot_troop_stance_on_faction_issue, ":troop_no"),
(troop_set_slot, ":active_npc", slot_troop_stance_on_faction_issue, -1),
(try_end),
#Political ramifications end
(try_begin),
(ge, "$cheat_mode", 1),
(str_store_troop_name, s4, ":troop_no"),
(display_message, "@{!}DEBUG - {s4} faction changed in normal faction change"),
(try_end),
(troop_set_faction, ":troop_no", ":faction_no"),
(troop_set_slot, ":troop_no", slot_troop_recruitment_random, 0),
(troop_set_slot, ":troop_no", slot_lord_recruitment_argument, 0),
(troop_set_slot, ":troop_no", slot_lord_recruitment_candidate, 0),
(troop_set_slot, ":troop_no", slot_troop_promised_fief, 0),
#nplus start ...............................................................................
(troop_set_slot, ":troop_no", slot_troop_original_faction, ":faction_no"),
#nplus end ...............................................................................
#Give new title
(call_script, "script_troop_set_title_according_to_faction", ":troop_no", ":faction_no"),
(try_begin),
(this_or_next|eq, ":faction_no", "$players_kingdom"),
(eq, ":faction_no", "fac_player_supporters_faction"),
(call_script, "script_check_concilio_calradi_achievement"),
(try_end),
#Takes walled centers and dependent villages with him
(try_for_range, ":center_no", walled_centers_begin, walled_centers_end),
(party_slot_eq, ":center_no", slot_town_lord, ":troop_no"),
(party_set_faction, ":center_no", ":faction_no"),
(try_for_range, ":village_no", villages_begin, villages_end),
(party_slot_eq, ":village_no", slot_village_bound_center, ":center_no"),
(party_set_faction, ":village_no", ":faction_no"),
(party_get_slot, ":farmer_party_no", ":village_no", slot_village_farmer_party),
(try_begin),
(gt, ":farmer_party_no", 0),
(party_is_active, ":farmer_party_no"),
(party_set_faction, ":farmer_party_no", ":faction_no"),
(try_end),
(try_begin),
(party_get_slot, "ld_town_lord", ":village_no", slot_town_lord),
(neq, "ld_town_lord", ":troop_no"),
(party_set_slot, ":village_no", slot_town_lord, stl_unassigned),
(try_end),
(try_end),
(try_end),
#Dependant kingdom ladies switch faction
(try_for_range, ":kingdom_lady", kingdom_ladies_begin, kingdom_ladies_end),
(call_script, "script_get_kingdom_lady_social_determinants", ":kingdom_lady"),
(assign, ":closest_male_relative", reg0),
(assign, ":new_center", reg1),
(eq, ":closest_male_relative", ":troop_no"),
(try_begin),
(ge, "$cheat_mode", 1),
(str_store_troop_name, s4, ":kingdom_lady"),
(display_message, "@{!}DEBUG - {s4} faction changed by guardian moving"),
(try_end),
(troop_set_faction, ":kingdom_lady", ":faction_no"),
(troop_slot_eq, ":kingdom_lady", slot_troop_prisoner_of_party, -1),
(troop_set_slot, ":kingdom_lady", slot_troop_cur_center, ":new_center"),
(try_end),
#Remove his control over villages under another fortress
(try_for_range, ":village_no", villages_begin, villages_end),
(party_slot_eq, ":village_no", slot_town_lord, ":troop_no"),
(store_faction_of_party, ":village_faction", ":village_no"),
(try_begin),
(neq, ":village_faction", ":faction_no"),
(party_set_slot, ":village_no", slot_town_lord, stl_unassigned),
(try_end),
(try_end),
#Free prisoners
(try_begin),
(troop_get_slot, ":leaded_party", ":troop_no", slot_troop_leaded_party),
(gt, ":leaded_party", 0),
(party_set_faction, ":leaded_party", ":faction_no"),
(party_get_num_prisoner_stacks, ":num_stacks", ":leaded_party"),
(try_for_range_backwards, ":troop_iterator", 0, ":num_stacks"),
(party_prisoner_stack_get_troop_id, ":cur_troop_id", ":leaded_party", ":troop_iterator"),
(store_troop_faction, ":cur_faction", ":cur_troop_id"),
(troop_is_hero, ":cur_troop_id"),
(eq, ":cur_faction", ":faction_no"),
(call_script, "script_remove_troop_from_prison", ":cur_troop_id"),
(party_remove_prisoners, ":leaded_party", ":cur_troop_id", 1),
(try_end),
(try_end),
#Annull all quests of which the lord is giver
(try_for_range, ":quest", all_quests_begin, all_quests_end),
(check_quest_active, ":quest"),
(quest_slot_eq, ":quest", slot_quest_giver_troop, ":troop_no"),
(str_store_troop_name, s4, ":troop_no"),
(try_begin),
(eq, "$cheat_mode", 1),
(display_message, "str_s4_changing_sides_aborts_quest"),
(try_end),
(call_script, "script_abort_quest", ":quest", 0),
(try_end),
#Boot all lords out of centers whose faction has changed
(try_for_range, ":lord_to_move", active_npcs_begin, active_npcs_end),
(troop_get_slot, ":lord_led_party", ":lord_to_move", slot_troop_leaded_party),
(party_is_active, ":lord_led_party"),
(party_get_attached_to, ":led_party_attached", ":lord_led_party"),
(is_between, ":led_party_attached", walled_centers_begin, walled_centers_end),
(store_faction_of_party, ":led_party_faction", ":lord_led_party"),
(store_faction_of_party, ":attached_party_faction", ":led_party_attached"),
(neq, ":led_party_faction", ":attached_party_faction"),
(party_detach, ":lord_led_party"),
(try_end),
#Increase relation with lord in new faction by 5
#Or, if player kingdom, make inactive pending confirmation
(faction_get_slot, ":faction_liege", ":faction_no", slot_faction_leader),
(try_begin),
(eq, ":faction_liege", "trp_player"),
(neq, ":troop_no", "$g_talk_troop"),
(troop_set_slot, ":troop_no", slot_troop_occupation, slto_inactive), #POSSIBLE REASON 1
(else_try),
(is_between, ":faction_liege", active_npcs_begin, active_npcs_end),
(is_between, ":troop_no", active_npcs_begin, active_npcs_end),
(call_script, "script_troop_change_relation_with_troop", ":faction_liege", ":troop_no", 5),
(val_add, "$total_indictment_changes", 5),
(try_end),
#Break courtship relations
(try_begin),
(troop_slot_ge, ":troop_no", slot_troop_spouse, 0),
#Already married, do nothing
(else_try),
(is_between, ":troop_no", active_npcs_begin, active_npcs_end),
(try_for_range, ":love_interest_slot", slot_troop_love_interest_1, slot_troop_love_interests_end),
(troop_get_slot, ":courted_lady", ":troop_no", ":love_interest_slot"),
(call_script, "script_courtship_event_lady_break_relation_with_suitor", ":courted_lady", ":troop_no"),
(try_end),
(call_script, "script_assign_troop_love_interests", ":troop_no"),
(else_try),
(is_between, ":troop_no", kingdom_ladies_begin, kingdom_ladies_end),
(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
(try_for_range, ":love_interest_slot", slot_troop_love_interest_1, slot_troop_love_interests_end),
(troop_slot_eq, ":active_npc", ":love_interest_slot", ":troop_no"),
(call_script, "script_courtship_event_lady_break_relation_with_suitor", ":troop_no", ":active_npc"),
(try_end),
(try_end),
(try_end),
#Stop raidings/sieges of new faction's fief if there is any
(troop_get_slot, ":troop_party", ":troop_no", slot_troop_leaded_party),
(try_for_range, ":center_no", centers_begin, centers_end),
(party_slot_eq, ":center_no", slot_party_type, spt_village),
(party_get_slot, ":raided_by", ":center_no", slot_village_raided_by),
(eq, ":raided_by", ":troop_party"),
(party_set_slot, ":center_no", slot_village_raided_by, -1),
(try_begin),
(party_slot_eq, ":center_no", slot_village_state, svs_being_raided),
(party_set_slot, ":center_no", slot_village_state, svs_normal),
(party_set_extra_text, ":center_no", "str_empty_string"),
(try_end),
(else_try),
(party_get_slot, ":besieged_by", ":center_no", slot_center_is_besieged_by),
(eq, ":besieged_by", ":troop_party"),
(party_set_slot, ":center_no", slot_center_is_besieged_by, -1),
(try_begin),
(party_slot_eq, ":center_no", slot_village_state, svs_under_siege),
(party_set_slot, ":center_no", slot_village_state, svs_normal),
(party_set_extra_text, ":center_no", "str_empty_string"),
(try_end),
(try_end),
(call_script, "script_update_all_notes"),
(call_script, "script_update_village_market_towns"),
(assign, "$g_recalculate_ais", 1),
]),
# Input: arg1 = troop_no, arg2 = faction
("change_troop_faction",
[
(store_script_param_1, ":troop_no"),
(store_script_param_2, ":faction_no"),
(try_begin),
#Reactivating inactive or defeated faction
(is_between, ":faction_no", kingdoms_begin, kingdoms_end),
(neg|faction_slot_eq, ":faction_no", slot_faction_state, sfs_active),
(faction_set_slot, ":faction_no", slot_faction_state, sfs_active),
#(call_script, "script_store_average_center_value_per_faction"),
(try_end),
#Political ramifications
(store_faction_of_troop, "rig_faction", ":troop_no"),
#remove if he is marshal
(try_begin),
(faction_slot_eq, "rig_faction", slot_faction_marshall, ":troop_no"),
(call_script, "script_check_and_finish_active_army_quests_for_faction", "rig_faction"),
#No current issue on the agenda
(try_begin),
(faction_slot_eq, "rig_faction", slot_faction_political_issue, 0),
(faction_set_slot, "rig_faction", slot_faction_political_issue, 1), #Appointment of marshal
(store_current_hours, ":hours"),
(val_max, ":hours", 0),
(faction_set_slot, "rig_faction", slot_faction_political_issue_time, ":hours"), #Appointment of marshal
(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
(store_faction_of_troop, ":active_npc_faction", ":active_npc"),
(eq, ":active_npc_faction", "rig_faction"),
(troop_set_slot, ":active_npc", slot_troop_stance_on_faction_issue, -1),
(try_end),
(try_begin),
(eq, "$players_kingdom", "rig_faction"),
(troop_set_slot, "trp_player", slot_troop_stance_on_faction_issue, -1),
(try_end),
(try_end),
(try_begin),
(troop_get_slot, "ld_marshall_party", ":troop_no", slot_troop_leaded_party),
(party_is_active, "ld_marshall_party"),
(party_set_marshall, "ld_marshall_party", 0),
(try_end),
(faction_set_slot, "rig_faction", slot_faction_marshall, -1),
(try_end),
#Removal as marshal ends
#Other political ramifications
(troop_set_slot, ":troop_no", slot_troop_stance_on_faction_issue, -1),
(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
(troop_slot_eq, ":active_npc", slot_troop_stance_on_faction_issue, ":troop_no"),
(troop_set_slot, ":active_npc", slot_troop_stance_on_faction_issue, -1),
(try_end),
#Political ramifications end
(try_begin),
(ge, "$cheat_mode", 1),
(str_store_troop_name, s4, ":troop_no"),
(display_message, "@{!}DEBUG - {s4} faction changed in normal faction change"),
(try_end),
(troop_set_faction, ":troop_no", ":faction_no"),
(troop_set_slot, ":troop_no", slot_troop_recruitment_random, 0),
(troop_set_slot, ":troop_no", slot_lord_recruitment_argument, 0),
(troop_set_slot, ":troop_no", slot_lord_recruitment_candidate, 0),
(troop_set_slot, ":troop_no", slot_troop_promised_fief, 0),
#nplus start ...............................................................................
(troop_set_slot, ":troop_no", slot_troop_original_faction, ":faction_no"),
#nplus end ...............................................................................
#Give new title
(call_script, "script_troop_set_title_according_to_faction", ":troop_no", ":faction_no"),
(try_begin),
(this_or_next|eq, ":faction_no", "$players_kingdom"),
(eq, ":faction_no", "fac_player_supporters_faction"),
(call_script, "script_check_concilio_calradi_achievement"),
(try_end),
#Takes walled centers and dependent villages with him
(try_for_range, ":center_no", walled_centers_begin, walled_centers_end),
(party_slot_eq, ":center_no", slot_town_lord, ":troop_no"),
(party_set_faction, ":center_no", ":faction_no"),
(try_for_range, ":village_no", villages_begin, villages_end),
(party_slot_eq, ":village_no", slot_village_bound_center, ":center_no"),
(party_set_faction, ":village_no", ":faction_no"),
(party_get_slot, ":farmer_party_no", ":village_no", slot_village_farmer_party),
(try_begin),
(gt, ":farmer_party_no", 0),
(party_is_active, ":farmer_party_no"),
(party_set_faction, ":farmer_party_no", ":faction_no"),
(try_end),
(try_begin),
(party_get_slot, "ld_town_lord", ":village_no", slot_town_lord),
(neq, "ld_town_lord", ":troop_no"),
(party_set_slot, ":village_no", slot_town_lord, stl_unassigned),
(try_end),
(try_end),
(try_end),
#Dependant kingdom ladies switch faction
(try_for_range, ":kingdom_lady", kingdom_ladies_begin, kingdom_ladies_end),
(call_script, "script_get_kingdom_lady_social_determinants", ":kingdom_lady"),
(assign, ":closest_male_relative", reg0),
(assign, ":new_center", reg1),
(eq, ":closest_male_relative", ":troop_no"),
(try_begin),
(ge, "$cheat_mode", 1),
(str_store_troop_name, s4, ":kingdom_lady"),
(display_message, "@{!}DEBUG - {s4} faction changed by guardian moving"),
(try_end),
(troop_set_faction, ":kingdom_lady", ":faction_no"),
(troop_slot_eq, ":kingdom_lady", slot_troop_prisoner_of_party, -1),
(troop_set_slot, ":kingdom_lady", slot_troop_cur_center, ":new_center"),
(try_end),
#Remove his control over villages under another fortress
(try_for_range, ":village_no", villages_begin, villages_end),
(party_slot_eq, ":village_no", slot_town_lord, ":troop_no"),
(store_faction_of_party, ":village_faction", ":village_no"),
(try_begin),
(neq, ":village_faction", ":faction_no"),
(party_set_slot, ":village_no", slot_town_lord, stl_unassigned),
(try_end),
(try_end),
#Free prisoners
(try_begin),
(troop_get_slot, ":leaded_party", ":troop_no", slot_troop_leaded_party),
(gt, ":leaded_party", 0),
(party_set_faction, ":leaded_party", ":faction_no"),
(party_get_num_prisoner_stacks, ":num_stacks", ":leaded_party"),
(try_for_range_backwards, ":troop_iterator", 0, ":num_stacks"),
(party_prisoner_stack_get_troop_id, ":cur_troop_id", ":leaded_party", ":troop_iterator"),
(store_troop_faction, ":cur_faction", ":cur_troop_id"),
(troop_is_hero, ":cur_troop_id"),
(eq, ":cur_faction", ":faction_no"),
(call_script, "script_remove_troop_from_prison", ":cur_troop_id"),
(party_remove_prisoners, ":leaded_party", ":cur_troop_id", 1),
(try_end),
(try_end),
#Annull all quests of which the lord is giver
(try_for_range, ":quest", all_quests_begin, all_quests_end),
(check_quest_active, ":quest"),
(quest_slot_eq, ":quest", slot_quest_giver_troop, ":troop_no"),
(str_store_troop_name, s4, ":troop_no"),
(try_begin),
(eq, "$cheat_mode", 1),
(display_message, "str_s4_changing_sides_aborts_quest"),
(try_end),
(call_script, "script_abort_quest", ":quest", 0),
(try_end),
#Boot all lords out of centers whose faction has changed
(try_for_range, ":lord_to_move", active_npcs_begin, active_npcs_end),
(troop_get_slot, ":lord_led_party", ":lord_to_move", slot_troop_leaded_party),
(party_is_active, ":lord_led_party"),
(party_get_attached_to, ":led_party_attached", ":lord_led_party"),
(is_between, ":led_party_attached", walled_centers_begin, walled_centers_end),
(store_faction_of_party, ":led_party_faction", ":lord_led_party"),
(store_faction_of_party, ":attached_party_faction", ":led_party_attached"),
(neq, ":led_party_faction", ":attached_party_faction"),
(party_detach, ":lord_led_party"),
(try_end),
#Increase relation with lord in new faction by 5
#Or, if player kingdom, make inactive pending confirmation
(faction_get_slot, ":faction_liege", ":faction_no", slot_faction_leader),
(try_begin),
(eq, ":faction_liege", "trp_player"),
(neq, ":troop_no", "$g_talk_troop"),
(troop_set_slot, ":troop_no", slot_troop_occupation, slto_inactive), #POSSIBLE REASON 1
(else_try),
(is_between, ":faction_liege", active_npcs_begin, active_npcs_end),
(is_between, ":troop_no", active_npcs_begin, active_npcs_end),
(call_script, "script_troop_change_relation_with_troop", ":faction_liege", ":troop_no", 5),
(val_add, "$total_indictment_changes", 5),
(try_end),
#Break courtship relations
(try_begin),
(troop_slot_ge, ":troop_no", slot_troop_spouse, 0),
#Already married, do nothing
(else_try),
(is_between, ":troop_no", active_npcs_begin, active_npcs_end),
(try_for_range, ":love_interest_slot", slot_troop_love_interest_1, slot_troop_love_interests_end),
(troop_get_slot, ":courted_lady", ":troop_no", ":love_interest_slot"),
(call_script, "script_courtship_event_lady_break_relation_with_suitor", ":courted_lady", ":troop_no"),
(try_end),
(call_script, "script_assign_troop_love_interests", ":troop_no"),
(else_try),
(is_between, ":troop_no", kingdom_ladies_begin, kingdom_ladies_end),
(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end),
(try_for_range, ":love_interest_slot", slot_troop_love_interest_1, slot_troop_love_interests_end),
(troop_slot_eq, ":active_npc", ":love_interest_slot", ":troop_no"),
(call_script, "script_courtship_event_lady_break_relation_with_suitor", ":troop_no", ":active_npc"),
(try_end),
(try_end),
(try_end),
#Stop raidings/sieges of new faction's fief if there is any
(troop_get_slot, ":troop_party", ":troop_no", slot_troop_leaded_party),
(try_for_range, ":center_no", centers_begin, centers_end),
(party_slot_eq, ":center_no", slot_party_type, spt_village),
(party_get_slot, ":raided_by", ":center_no", slot_village_raided_by),
(eq, ":raided_by", ":troop_party"),
(party_set_slot, ":center_no", slot_village_raided_by, -1),
(try_begin),
(party_slot_eq, ":center_no", slot_village_state, svs_being_raided),
(party_set_slot, ":center_no", slot_village_state, svs_normal),
(party_set_extra_text, ":center_no", "str_empty_string"),
(try_end),
(else_try),
(party_get_slot, ":besieged_by", ":center_no", slot_center_is_besieged_by),
(eq, ":besieged_by", ":troop_party"),
(party_set_slot, ":center_no", slot_center_is_besieged_by, -1),
(try_begin),
(party_slot_eq, ":center_no", slot_village_state, svs_under_siege),
(party_set_slot, ":center_no", slot_village_state, svs_normal),
(party_set_extra_text, ":center_no", "str_empty_string"),
(try_end),
(try_end),
(call_script, "script_update_all_notes"),
(call_script, "script_update_village_market_towns"),
(assign, "$g_recalculate_ais", 1),
]),
This part works for any faction changes: treason, defection, etc. To check the changes, wait for 36 game hours and watch for latest lords defections. Then use cheat jump (hold ctrl and press left click on map) for teleportation to the lord. He should be recruiting troops of his new faction.
If you want to play old savegame and want to switch every lord`s culture to his current faction`s one, you could create new action in camp menu or put same trigger in an existing one. For example, edit the "module_scripts.py" file and let the cheat menu script "update_troop_political_notes" updates all lords cultures in a moment:
("update_troop_political_notes",
[
(store_script_param, ":troop_no", 1),
(try_begin),
(str_clear, s47),
(store_faction_of_troop, ":troop_faction", ":troop_no"),
(faction_get_slot, ":faction_leader", ":troop_faction", slot_faction_leader),
(str_clear, s40),
(assign, ":logged_a_rivalry", 0),
(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":kingdom_hero"),
(lt, reg0, -10),
(str_store_troop_name_link, s39, ":kingdom_hero"),
(try_begin),
(eq, ":logged_a_rivalry", 0),
(str_store_string, s40, "str_s39_rival"),
(assign, ":logged_a_rivalry", 1),
(else_try),
(str_store_string, s41, "str_s40"),
(str_store_string, s40, "str_s41_s39_rival"),
(try_end),
#nplus start .................................
(try_begin),
(eq, "$cheat_mode", 1), #not necessary in this cheat script
(try_begin),
(troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
(store_faction_of_troop, ":troop_faction", ":kingdom_hero"),
(troop_set_slot, ":kingdom_hero", slot_troop_original_faction, ":troop_faction"),
(try_end),
(try_end),
#nplus end ..................................
(try_end),
(str_clear, s46),
(try_begin),
(ge, "$cheat_mode", 1),
(try_begin),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_martial),
(str_store_string, s46, "str_reputation_cheat_mode_only_martial_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_debauched),
(str_store_string, s46, "str_reputation_cheat_mode_only_debauched_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_selfrighteous),
(str_store_string, s46, "str_reputation_cheat_mode_only_pitiless_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_cunning),
(str_store_string, s46, "str_reputation_cheat_mode_only_calculating_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_quarrelsome),
(str_store_string, s46, "str_reputation_cheat_mode_only_quarrelsome_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_goodnatured),
(str_store_string, s46, "str_reputation_cheat_mode_only_goodnatured_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_upstanding),
(str_store_string, s46, "str_reputation_cheat_mode_only_upstanding_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_conventional),
(str_store_string, s46, "str_reputation_cheat_mode_only_conventional_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_adventurous),
(str_store_string, s46, "str_reputation_cheat_mode_only_adventurous_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_otherworldly),
(str_store_string, s46, "str_reputation_cheat_mode_only_romantic_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_moralist),
(str_store_string, s46, "str_reputation_cheat_mode_only_moralist_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_ambitious),
(str_store_string, s46, "str_reputation_cheat_mode_only_ambitious_"),
(else_try),
(troop_get_slot, reg11, ":troop_no", slot_lord_reputation_type),
(str_store_string, s46, "str_reputation_cheat_mode_only_reg11_"),
(try_end),
(try_begin),
(eq, "$cheat_mode", 1),
(try_for_range, ":love_interest_slot", slot_troop_love_interest_1, slot_troop_love_interests_end),
(troop_get_slot, ":love_interest", ":troop_no", ":love_interest_slot"),
(is_between, ":love_interest", kingdom_ladies_begin, kingdom_ladies_end),
(str_store_troop_name_link, s39, ":love_interest"),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":love_interest"),
(str_store_string, s2, "str_love_interest"),
(try_begin),
(troop_slot_eq, ":troop_no", slot_troop_betrothed, ":love_interest"),
(str_store_string, s2, "str_betrothed"),
(try_end),
(str_store_string, s40, "str_s40_s39_s2_reg0"),
(try_end),
(try_end),
(try_end),
(str_store_string, s45, "str_other_relations_s40_"),
(str_clear, s44),
(try_begin),
(neq, ":troop_no", ":faction_leader"),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":faction_leader"),
(str_store_string, s44, "str_relation_with_liege_reg0_"),
(try_end),
(str_clear, s4,
(try_begin),
(eq, "$cheat_mode", 1),
(store_current_hours, ":hours"),
(gt, ":hours", 0),
# (display_message, "@{!}Updating political factors"),
(call_script, "script_calculate_troop_political_factors_for_liege", ":troop_no", ":faction_leader"),
(str_store_string, s48, "str_sense_of_security_military_reg1_court_position_reg3_"),
(try_end),
(str_store_string, s47, "str_s46s45s44s48"),
(add_troop_note_from_sreg, ":troop_no", 3, "str_political_details_s47_", 1),
(try_end),
]),
[
(store_script_param, ":troop_no", 1),
(try_begin),
(str_clear, s47),
(store_faction_of_troop, ":troop_faction", ":troop_no"),
(faction_get_slot, ":faction_leader", ":troop_faction", slot_faction_leader),
(str_clear, s40),
(assign, ":logged_a_rivalry", 0),
(try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":kingdom_hero"),
(lt, reg0, -10),
(str_store_troop_name_link, s39, ":kingdom_hero"),
(try_begin),
(eq, ":logged_a_rivalry", 0),
(str_store_string, s40, "str_s39_rival"),
(assign, ":logged_a_rivalry", 1),
(else_try),
(str_store_string, s41, "str_s40"),
(str_store_string, s40, "str_s41_s39_rival"),
(try_end),
#nplus start .................................
(try_begin),
(eq, "$cheat_mode", 1), #not necessary in this cheat script
(try_begin),
(troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
(store_faction_of_troop, ":troop_faction", ":kingdom_hero"),
(troop_set_slot, ":kingdom_hero", slot_troop_original_faction, ":troop_faction"),
(try_end),
(try_end),
#nplus end ..................................
(try_end),
(str_clear, s46),
(try_begin),
(ge, "$cheat_mode", 1),
(try_begin),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_martial),
(str_store_string, s46, "str_reputation_cheat_mode_only_martial_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_debauched),
(str_store_string, s46, "str_reputation_cheat_mode_only_debauched_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_selfrighteous),
(str_store_string, s46, "str_reputation_cheat_mode_only_pitiless_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_cunning),
(str_store_string, s46, "str_reputation_cheat_mode_only_calculating_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_quarrelsome),
(str_store_string, s46, "str_reputation_cheat_mode_only_quarrelsome_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_goodnatured),
(str_store_string, s46, "str_reputation_cheat_mode_only_goodnatured_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_upstanding),
(str_store_string, s46, "str_reputation_cheat_mode_only_upstanding_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_conventional),
(str_store_string, s46, "str_reputation_cheat_mode_only_conventional_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_adventurous),
(str_store_string, s46, "str_reputation_cheat_mode_only_adventurous_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_otherworldly),
(str_store_string, s46, "str_reputation_cheat_mode_only_romantic_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_moralist),
(str_store_string, s46, "str_reputation_cheat_mode_only_moralist_"),
(else_try),
(troop_slot_eq, ":troop_no", slot_lord_reputation_type, lrep_ambitious),
(str_store_string, s46, "str_reputation_cheat_mode_only_ambitious_"),
(else_try),
(troop_get_slot, reg11, ":troop_no", slot_lord_reputation_type),
(str_store_string, s46, "str_reputation_cheat_mode_only_reg11_"),
(try_end),
(try_begin),
(eq, "$cheat_mode", 1),
(try_for_range, ":love_interest_slot", slot_troop_love_interest_1, slot_troop_love_interests_end),
(troop_get_slot, ":love_interest", ":troop_no", ":love_interest_slot"),
(is_between, ":love_interest", kingdom_ladies_begin, kingdom_ladies_end),
(str_store_troop_name_link, s39, ":love_interest"),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":love_interest"),
(str_store_string, s2, "str_love_interest"),
(try_begin),
(troop_slot_eq, ":troop_no", slot_troop_betrothed, ":love_interest"),
(str_store_string, s2, "str_betrothed"),
(try_end),
(str_store_string, s40, "str_s40_s39_s2_reg0"),
(try_end),
(try_end),
(try_end),
(str_store_string, s45, "str_other_relations_s40_"),
(str_clear, s44),
(try_begin),
(neq, ":troop_no", ":faction_leader"),
(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":faction_leader"),
(str_store_string, s44, "str_relation_with_liege_reg0_"),
(try_end),
(str_clear, s4,
(try_begin),
(eq, "$cheat_mode", 1),
(store_current_hours, ":hours"),
(gt, ":hours", 0),
# (display_message, "@{!}Updating political factors"),
(call_script, "script_calculate_troop_political_factors_for_liege", ":troop_no", ":faction_leader"),
(str_store_string, s48, "str_sense_of_security_military_reg1_court_position_reg3_"),
(try_end),
(str_store_string, s47, "str_s46s45s44s48"),
(add_troop_note_from_sreg, ":troop_no", 3, "str_political_details_s47_", 1),
(try_end),
]),
Go for camping somewhere. Look at camp cheats in camp menus, there should be "Update political notes.". Click on it and wait for few seconds. Take a little move on a map to be sure.
Call the console again (Ctrl + `), type there nocheatmenu and press enter again. New scripts should be working after 36 game hours. Now you could save the game.