LSP Kit Campaign KAOS Political KIT 1.5 Updated

Users who are viewing this thread

hI AGAIN..I'm trying  your political kit+diploamcy 4.3 source  as base of my personal mod but when i compile your code i have all compiled right except some parts

I have two warning at the end of compile (tried with 1.1168 and 1.166 warband version and their respective module systems)

is intended to works this ay or is there a way i can modiy something to have full compile without warnings?

here the compile code

Code:
Initializing...
Compiling all global variables...
Exporting strings...
Exporting skills...
Exporting tracks...
Exporting animations...
Exporting meshes...
Exporting sounds...
Exporting skins...
Exporting map icons...
Creating new tag_uses.txt file...
Creating new quick_strings.txt file...
Exporting faction data...
Exporting item data...
Exporting scene data...
Exporting troops data
Exporting particle data...
Exporting scene props...
Exporting tableau materials data...
Exporting presentations...
Exporting party_template data...
Exporting parties
Exporting quest data...
Exporting info_page data...
Exporting scripts...
Exporting mission_template data...
Exporting game menus data...
exporting simple triggers...
exporting triggers...
exporting dialogs...
Checking global variable usages...
WARNING: Global variable never used: faction_display
WARNING: Global variable never used: kaos_disabled
Imported 21 global variables for saved-game compatability that are not used.
Exporting postfx_params...

______________________________

Script processing has ended.
Press any key to exit. . .


WARNING apart ..someone has managed to solve the lack of messages ingame and the error log with kaos+ diplo4.3??
 
does everyone have a Runtime error like me cause when i change some code in political like faction game menus to fit in my mod and i build no error but when i opened my mod and it show up this http://imgur.com/a/gjTUv does everyone know how to fix this error .
 
builder of the gods said:
not a problem these warnings arent a problem

JC LEON said:
WARNING: Global variable never used: faction_display
WARNING: Global variable never used: kaos_disabled
Imported 21 global variables for saved-game compatability that are not used.

1) You can download Native 1.170 now. It has a updated header_operations.py and some new constants on the header_XXX.py files. 1.168 is now outdated.

2) the warning are ... warnings. They are telling you: "hey, look at this problem. It may be a serious bug, you may have mispelled a variable name or something that will cause your game to not work as expected, or you may have forgot to delete some old code. You should review this and fix the warnings"

Best compiler to find this kinds of errors is WRECK
 
I have an error at replacing "indict_lord_for_treason" script. Any ideas ?

bYhkI.png

Code:
  ("indict_lord_for_treason",#originally included in simple_triggers. Needed to be moved here to allow player to indict
   [
    (store_script_param, ":troop_no", 1),
    (store_script_param, ":faction", 2),

	##diplomacy start+ use gender script
	#(troop_get_type, reg4, ":troop_no"),
	(assign, ":save_reg0", reg0),
	(assign, ":save_reg3", reg3),
	(assign, ":save_reg4", reg4),
	##diplomacy end+

	(try_for_range, ":center", centers_begin, centers_end), #transfer properties to liege
		(party_slot_eq, ":center", slot_town_lord, ":troop_no"),
		(party_set_slot, ":center", slot_town_lord, stl_unassigned),
	(try_end),

	(faction_get_slot, ":faction_leader", ":faction", slot_faction_leader),
	(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":faction_leader"),
	(assign, ":liege_to_lord_relation", reg0),
	(store_sub, ":base_relation_modifier", -150, ":liege_to_lord_relation"),
	(val_div, ":base_relation_modifier", 40),#-1 at -100, -2 at -70, -3 at -30,etc.
	(val_min, ":base_relation_modifier", -1),

	#Indictments, cont: Influence relations
	##diplomacy start+ Alter to include promoted ladies
	##OLD:
	#(try_for_range, ":active_npc", active_npcs_begin, active_npcs_end), #this effects all lords in all factions
	##NEW:
	(try_for_range, ":active_npc", heroes_begin, heroes_end), #this effects all lords in all factions
		(this_or_next|is_between, ":active_npc", active_npcs_begin, active_npcs_end),
			(troop_slot_eq, ":active_npc", slot_troop_occupation, slto_kingdom_hero),
	##diplomacy end+
		(store_faction_of_troop, ":active_npc_faction", ":active_npc"),
		(eq, ":faction", ":active_npc_faction"),

		(call_script, "script_troop_get_family_relation_to_troop", ":troop_no", ":active_npc"),
		(assign, ":family_relation", reg0),

		##diplomacy start+
		(val_max, ":family_relation", 0),
		#Take into account friendship or enmity
		(call_script, "script_troop_get_relation_with_troop", ":troop_no", ":faction_leader"),
		(assign, ":liking_relation", reg0),
		(try_begin),
			(ge, ":liking_relation", 20),
			(store_div, reg0, ":liking_relation", 20),
			(val_add, ":family_relation", reg0),
		(else_try),
			(lt, ":liking_relation", 0),
			(store_div, reg0, ":liking_relation", 20),
			(val_sub, reg0, 1),
			(val_add, ":family_relation", reg0),
		(try_end),
		(store_random_in_range, reg0, 0, 3),#+0, +1, or +2 (because below we divide by three...)
		(val_add, ":family_relation", reg0),
		(assign, reg0, ":family_relation"),
		##diplomacy end+
		(assign, ":relation_modifier", ":base_relation_modifier"),
		(try_begin),
			##diplomacy start+
			#(gt, ":family_relation", 1),##OLD
			(neq, ":family_relation", 0),##NEW (allow lessening penalty for hated characters)
			##diplomacy end+
			(store_div, ":family_multiplier", reg0, 3),
			(val_sub, ":relation_modifier", ":family_multiplier"),
		(try_end),

		(lt, ":relation_modifier", 0),

		(call_script, "script_troop_change_relation_with_troop", ":faction_leader", ":active_npc", ":relation_modifier"),
		(val_add, "$total_indictment_changes", ":relation_modifier"),
		(try_begin),
			(eq, "$cheat_mode", 1),
			(str_store_troop_name, s17, ":active_npc"),
			(str_store_troop_name, s18, ":faction_leader"),

			(assign, reg3, ":relation_modifier"),
			(display_message, "str_trial_influences_s17s_relation_with_s18_by_reg3"),
		(try_end),
	(try_end),

	#Indictments, cont: Check for other factions
	(assign, ":new_faction", "fac_outlaws"),
	(try_begin),
		(eq, ":troop_no", "trp_player"),
		(assign, ":new_faction", 0), #kicked out of faction
	(else_try),
		(call_script, "script_lord_find_alternative_faction", ":troop_no"),
		(assign, ":new_faction", reg0),
	(try_end),

	#Indictments, cont: Finalize where the lord goes
	(try_begin),
		(is_between, ":new_faction", kingdoms_begin, kingdoms_end),


		(try_begin),
			(ge, "$cheat_mode", 1),
			(str_store_troop_name, s4, ":troop_no"),
			(display_message, "@{!}DEBUG - {s4} faction changed in indictment"),
		(try_end),

		(call_script, "script_change_troop_faction", ":troop_no", ":new_faction"),
		(try_begin), #new-begin
		  (neq, ":new_faction", "fac_player_supporters_faction"),
		  (troop_slot_eq, ":troop_no", slot_troop_occupation, slto_inactive),
		  (troop_set_slot, ":troop_no", slot_troop_occupation, slto_kingdom_hero),
		(try_end), #new-end
		(str_store_faction_name, s10, ":new_faction"),
		(str_store_string, s11, "str_with_the_s10"),
	(else_try),
		(neq, ":troop_no", "trp_player"),
		##diplomacy start+
		#Set "exile" occupation to differentiate between someone outside of Calradia
		#and an outlaw lord leading a party of bandits.
		(troop_set_slot, ":troop_no", slot_troop_occupation, dplmc_slto_exile),
		##diplomacy end+
		(call_script, "script_change_troop_faction", ":troop_no", "fac_outlaws"),
		(str_store_string, s11, "str_outside_calradia"),
	(else_try),
		(eq, ":troop_no", "trp_player"),
		(call_script, "script_player_leave_faction", 1),
	(try_end),

	#Indictments, cont: Set up string
	(try_begin),
		(eq, ":troop_no", "trp_player"),
		(str_store_string, s9, "str_you_have_been_indicted_for_treason_to_s7_your_properties_have_been_confiscated_and_you_would_be_well_advised_to_flee_for_your_life"),
	(else_try),
		(str_store_troop_name, s4, ":troop_no"),
		(str_store_faction_name, s5, ":faction"),
		(str_store_troop_name, s6, ":faction_leader"),

		##diplomacy start+
		#(troop_get_type, reg4, ":troop_no"),
		(call_script, "script_dplmc_store_troop_is_female", ":troop_no"),
		(assign, reg4, reg0),
		##diplomacy end+
		(str_store_string, s9, "str_by_order_of_s6_s4_of_the_s5_has_been_indicted_for_treason_the_lord_has_been_stripped_of_all_reg4herhis_properties_and_has_fled_for_reg4herhis_life_he_is_rumored_to_have_gone_into_exile_s11"),
	(try_end),
	##diplomacy start+ important political events should be in the log
	(display_log_message, "@{!}{s9}"),#display_message changed to display_log_message
	##diplomacy end+

	#Indictments, cont: Remove party
	(troop_get_slot, ":led_party", ":troop_no", slot_troop_leaded_party),
	(try_begin),
		(party_is_active, ":led_party"),
		(neq, ":led_party", "p_main_party"),
		(remove_party, ":led_party"),
		(troop_set_slot, ":troop_no", slot_troop_leaded_party, -1),
	(try_end),

	(try_begin),
		(eq, "$cheat_mode", 1),
		##diplomacy start+
		(this_or_next|eq, ":faction", "fac_player_supporters_faction"),
		(this_or_next|eq, ":new_faction", "fac_player_supporters_faction"),
		##diplomacy end+
		(this_or_next|eq, ":faction", "$players_kingdom"),
			(eq, ":new_faction", "$players_kingdom"),
		(call_script, "script_add_notification_menu", "mnu_notification_treason_indictment", ":troop_no", ":faction"),
	(try_end),
	##diplomacy start+
	(assign, reg0, ":save_reg0"),
	(assign, reg3, ":save_reg3"),
	(assign, reg4, ":save_reg4"),
	##diplomacy end+
   ]),

 
I have a strange issue with process_sieges:

Code:
# script_process_sieges
  # Input: none
  # Output: none
  #called from triggers
  ("process_sieges",
    [
       (try_for_range, ":center_no", walled_centers_begin, walled_centers_end),
         #Reducing siege hardness every day by 20
         (party_get_slot, ":siege_hardness", ":center_no", slot_center_siege_hardness),
         (val_sub, ":siege_hardness", 20),
         (val_max, ":siege_hardness", 0),
         (party_set_slot, ":center_no", slot_center_siege_hardness, ":siege_hardness"),

         (party_get_slot, ":town_food_store", ":center_no", slot_party_food_store),
         (call_script, "script_center_get_food_store_limit", ":center_no"),
         (assign, ":food_store_limit", reg0),
         (try_begin),
           (party_get_slot, ":besieger_party", ":center_no", slot_center_is_besieged_by),
           (ge, ":besieger_party", 0), #town is under siege

         #KAOS  (POLITICAL)                         #Cait - added KAOS Political script code here, down to # Jrider -
         (try_for_range, ":rebels", rebel_factions_begin, civil_factions_end),
            (faction_set_slot, ":rebels", slot_faction_state, sfs_inactive),
            (faction_set_note_available, ":rebels", 0),
         (try_end),

         (assign, "$kaos_civil_war", 1),
         (assign, "$kaos_royal_children", 1),
         (assign, "$kaos_restore", 1),
         (assign, "$kaos_debug_mode", 0),
         (assign, "$kaos_use_custom_name", 0),
         (assign, "$kaos_rebellion_home", 0),
         (assign, "$kaos_use_custom_title", 0),
         (assign, "$kaos_has_custom_title", 0),
         (assign, "$kaos_disabled", 1),
         (assign, "$kaos_kings_kingdom", 0),
         (assign, "$kaos_kings_vassal", 0),
         (assign, "$kaos_kings_prince", 0),
         (assign, "$kaos_title_run", 0),
         (assign, "$kaos_use_suffixes", 0),

         #KAOS  (POLITICAL)

         # Jrider + TITLES v0.0, init new titles
         (try_for_range, ":troop_no", active_npcs_begin, kingdom_ladies_end),
            (store_troop_faction, ":faction_no", ":troop_no"),
            (call_script, "script_troop_set_title_according_to_faction_gender_and_lands", ":troop_no", ":faction_no"),
         (try_end),
          # Jrider -

        #KAOS  (POLITICAL)                            #Cait - added KAOS Political script code bit from update_game_start2
        (try_begin),
#               (try_for_range, ":cur_center", centers_begin, centers_end),
#           	    (party_get_slot, ":center_lord", ":cur_center", slot_town_lord),
#           		(try_begin),
            (neg|is_between, ":center_lord", pretenders_begin, pretenders_end),
            (call_script, "script_create_kingdom_hero_party", ":center_lord", ":center_no"),
            (assign, ":lords_party", "$pout_party"),
            (party_attach_to_party, ":lords_party", ":center_no"),
            (party_set_slot, ":center_no", slot_town_player_odds, 1000),
        (try_end),    
        #KAOS  (POLITICAL)

         #KAOS  (POLITICAL)                                                     #Cait - added KAOS Political script code bit from update_game_start3
         (store_random_in_range, ":swadian_date", 15, 100),
         (faction_set_slot, "fac_kingdom_7",  slot_rebellion_date, ":swadian_date"),
         (store_random_in_range, ":vaegir_date", 10, 85),
         (faction_set_slot, "fac_kingdom_8",  slot_rebellion_date, ":vaegir_date"),
         (store_random_in_range, ":khergit_date", 2, 70),
         (faction_set_slot, "fac_kingdom_9",  slot_rebellion_date, ":khergit_date"),
         (store_random_in_range, ":nord_date", 17, 79),
         (faction_set_slot, "fac_kingdom_10",  slot_rebellion_date, ":nord_date"),
         (store_random_in_range, ":rhodok_date", 8, 87),
         (faction_set_slot, "fac_kingdom_11",  slot_rebellion_date, ":rhodok_date"),
         (store_random_in_range, ":sarranid_date", 0, 90),
         (faction_set_slot, "fac_kingdom_12",  slot_rebellion_date, ":sarranid_date"),
         #KAOS  (POLITICAL)

      #KAOS  (POLITICAL)                                                                  #Cait - added KAOS Political script code bit from update_game_start4
      (faction_set_slot, "fac_kingdom_7",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_8",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_9",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_10",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_11",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_12",  slot_faction_culture, "fac_culture_6"),

      (faction_set_slot, "fac_kingdom_13",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_14",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_15",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_16",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_17",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_18",  slot_faction_culture, "fac_culture_6"),

      (faction_set_slot, "fac_kingdom_7", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_8", slot_faction_banner, "mesh_banner_kingdom_d"),
      (faction_set_slot, "fac_kingdom_9", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_10", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_11", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_12", slot_faction_banner, "mesh_banner_kingdom_c"),

      (faction_set_slot, "fac_kingdom_13", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_14", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_15", slot_faction_banner, "mesh_banner_kingdom_c"),
      (faction_set_slot, "fac_kingdom_16", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_17", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_18", slot_faction_banner, "mesh_banner_kingdom_d"),

      (faction_set_slot, "fac_player_supporters_faction", slot_kaoses_faction_title_type, "fac_player_supporters_faction"),
      (faction_set_slot, "fac_kingdom_1", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_2", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_3", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_4", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_5", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_6", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      (faction_set_slot, "fac_kingdom_7", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_8", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_9", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_10", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_11", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_12", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      (faction_set_slot, "fac_kingdom_13", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_14", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_15", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_16", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_17", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_18", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      #KAOS  (POLITICAL)

           #Reduce prosperity of besieged castle/town by -0.33/-4 every day.
           (try_begin),
             (try_begin),
               (is_between, ":center_no", castles_begin, castles_end),
               (store_random_in_range, ":random_value", 0, 3),
               (try_begin),
                 (eq, ":random_value", 0),
                 (assign, ":daily_siege_effect_on_prosperity", -1),
               (else_try),
                 (assign, ":daily_siege_effect_on_prosperity", 0),
               (try_end),
             (else_try),
               (assign, ":daily_siege_effect_on_prosperity", -4),
             (try_end),
       
             (call_script, "script_change_center_prosperity", ":center_no", ":daily_siege_effect_on_prosperity"),
             (val_add, "$newglob_total_prosperity_from_townloot", ":daily_siege_effect_on_prosperity"),
           (try_end),

           (store_faction_of_party, ":center_faction", ":center_no"),
        # Lift siege unless there is an enemy party nearby
           (assign, ":siege_lifted", 0),
           (try_begin),
             (try_begin),
               (neg|party_is_active, ":besieger_party"),
               (assign, ":siege_lifted", 1),
             (else_try),
               (store_distance_to_party_from_party, ":besieger_distance", ":center_no", ":besieger_party"),
               (gt, ":besieger_distance", 5),
               (assign, ":siege_lifted", 1),
			 (else_try),
  			 ##diplomacy begin
         (neg|party_slot_eq, ":center_no", slot_village_infested_by_bandits, "trp_peasant_woman"),
         ##diplomacy end
			   (store_faction_of_party, ":besieger_faction", ":besieger_party"),
               (store_relation, ":reln", ":besieger_faction", ":center_faction"),
               (ge, ":reln", 0),
               (assign, ":siege_lifted", 1),
             (try_end),


             (eq, ":siege_lifted", 1),
			 #If another lord can take over the siege, it isn't lifted
             ##diplomacy start+ Support promoted kingdom ladies
             #(try_for_range, ":enemy_hero", active_npcs_begin, active_npcs_end),
             (try_for_range, ":enemy_hero", heroes_begin, heroes_end),
             ##diplomacy end+
               (troop_slot_eq, ":enemy_hero", slot_troop_occupation, slto_kingdom_hero),
               (troop_get_slot, ":enemy_party", ":enemy_hero", slot_troop_leaded_party),
               (ge, ":enemy_party", 0),
               (party_is_active, ":enemy_party"),
               (store_faction_of_party, ":party_faction", ":enemy_party"),
               (store_relation, ":reln", ":party_faction", ":center_faction"),
               (lt, ":reln", 0),
               (store_distance_to_party_from_party, ":distance", ":center_no", ":enemy_party"),
               (lt, ":distance", 4),
               (assign, ":besieger_party", ":enemy_party"),
               (party_set_slot, ":center_no", slot_center_is_besieged_by, ":enemy_party"),
               (assign, ":siege_lifted", 0),
             (try_end),
           (try_end),
           (try_begin),
             (eq, ":siege_lifted", 1),
             (call_script, "script_lift_siege", ":center_no", 1),
           (else_try),
             (call_script, "script_center_get_food_consumption", ":center_no"),
             (assign, ":food_consumption", reg0),
             (val_sub, ":town_food_store", ":food_consumption"), # reduce food only under siege???
             (try_begin),
               (le, ":town_food_store", 0), #town is starving
               (store_random_in_range, ":r", 0, 100),
               (lt, ":r", 10),
               (call_script, "script_party_wound_all_members", ":center_no"), # town falls with 10% chance if starving
             (try_end),
           (try_end),
         (else_try),
           #town is not under siege...
           (val_add, ":town_food_store", 30), #add 30 food (significant for castles only.
         (try_end),

         (val_min, ":town_food_store", ":food_store_limit"),
         (val_max, ":town_food_store", 0),
         (party_set_slot, ":center_no", slot_party_food_store, ":town_food_store"),
       (try_end),
  ]),

Exporting scripts...
Error in script_process_sieges: ERROR: Usage of unassigned local variable: :center_lord
Traceback (most recent call last):
  File "process_scripts.py", line 52, in <module>
    save_scripts(variables,variable_uses,scripts,tag_uses,quick_strings)
  File "process_scripts.py", line 20, in save_scripts
    save_statement_block(file,convert_to_identifier(func[0]), 0,func[1], variable_list,variable_uses,tag_uses,quick_strings)
  File "E:\SteamLibrary\SteamApps\common\MountBlade Warband\Modules\CaitlynsMod 6 src\process_operations.py", line 451, in save_statement_block
    save_statement(ofile,opcode,no_variables,statement,variable_list,variable_uses,local_vars, local_var_uses,tag_uses,quick_strings)
  File "E:\SteamLibrary\SteamApps\common\MountBlade Warband\Modules\CaitlynsMod 6 src\process_operations.py", line 402, in save_statement
    operand = process_param(statement[i + 1],variable_list,variable_uses,local_vars_list,local_var_uses,tag_uses,quick_strings)
  File "E:\SteamLibrary\SteamApps\common\MountBlade Warband\Modules\CaitlynsMod 6 src\process_operations.py", line 376, in process_param
    result = get_variable(param, local_vars_list,local_var_uses)
  File "E:\SteamLibrary\SteamApps\common\MountBlade Warband\Modules\CaitlynsMod 6 src\process_operations.py", line 298, in get_variable
    raise Exception("ERROR: Usage of unassigned local variable: " + variable_string)
Exception: ERROR: Usage of unassigned local variable: :center_lord
Exporting mission_template data...

There's this commented out bit:
Code:
#               (try_for_range, ":cur_center", centers_begin, centers_end),
#           	    (party_get_slot, ":center_lord", ":cur_center", slot_town_lord),
#           		(try_begin),
Which, if I have that in, it'll compile without issue, but I'm not sure if it's the right way to do it in this instance.
 
I really don't see why you're adding a bunch of slot initializations to script_process_sieges when it should be done in script_game_start? If you're trying to make it work with existing savegames you should be using a simple trigger and actually check the values before overwriting them each time process_siege gets called, for every single town/castle in the game.
 
I thought it was an odd place to put it too, but it's where KAOS seems to think it should go? :I

Code:
# Manualy add these to module_scripts search for "process_sieges"
# add the lines in `process_sieges` insert after (ge, ":besieger_party", 0)
update_game_start = [
         #KAOS  (POLITICAL)
         (try_for_range, ":rebels", rebel_factions_begin, civil_factions_end),
            (faction_set_slot, ":rebels", slot_faction_state, sfs_inactive),
            (faction_set_note_available, ":rebels", 0),
         (try_end),

         (assign, "$kaos_civil_war", 1),
         (assign, "$kaos_royal_children", 1),
         (assign, "$kaos_restore", 1),
         (assign, "$kaos_debug_mode", 0),
         (assign, "$kaos_use_custom_name", 0),
         (assign, "$kaos_rebellion_home", 0),
         (assign, "$kaos_use_custom_title", 0),
         (assign, "$kaos_has_custom_title", 0),
         (assign, "$kaos_disabled", 1),
         (assign, "$kaos_kings_kingdom", 0),
         (assign, "$kaos_kings_vassal", 0),
         (assign, "$kaos_kings_prince", 0),
         (assign, "$kaos_title_run", 0),
         (assign, "$kaos_use_suffixes", 0),

         #KAOS  (POLITICAL)

         # Jrider + TITLES v0.0, init new titles
         (try_for_range, ":troop_no", active_npcs_begin, kingdom_ladies_end),
            (store_troop_faction, ":faction_no", ":troop_no"),
            (call_script, "script_troop_set_title_according_to_faction_gender_and_lands", ":troop_no", ":faction_no"),
         (try_end),
          # Jrider -
]

# Manualy add these to module_scripts search for "process_sieges"
# add the lines in `process_sieges` insert after (ge, ":besieger_party", 0)
update_game_start2 = [
        #KAOS  (POLITICAL)
        (try_begin),
            (neg|is_between, ":center_lord", pretenders_begin, pretenders_end),
            (call_script, "script_create_kingdom_hero_party", ":center_lord", ":center_no"),
            (assign, ":lords_party", "$pout_party"),
            (party_attach_to_party, ":lords_party", ":center_no"),
            (party_set_slot, ":center_no", slot_town_player_odds, 1000),
        (try_end),    
        #KAOS  (POLITICAL)
]
update_game_start3 = [
         #KAOS  (POLITICAL)
         (store_random_in_range, ":swadian_date", 15, 100),
         (faction_set_slot, "fac_kingdom_7",  slot_rebellion_date, ":swadian_date"),
         (store_random_in_range, ":vaegir_date", 10, 85),
         (faction_set_slot, "fac_kingdom_8",  slot_rebellion_date, ":vaegir_date"),
         (store_random_in_range, ":khergit_date", 2, 70),
         (faction_set_slot, "fac_kingdom_9",  slot_rebellion_date, ":khergit_date"),
         (store_random_in_range, ":nord_date", 17, 79),
         (faction_set_slot, "fac_kingdom_10",  slot_rebellion_date, ":nord_date"),
         (store_random_in_range, ":rhodok_date", 8, 87),
         (faction_set_slot, "fac_kingdom_11",  slot_rebellion_date, ":rhodok_date"),
         (store_random_in_range, ":sarranid_date", 0, 90),
         (faction_set_slot, "fac_kingdom_12",  slot_rebellion_date, ":sarranid_date"),
         #KAOS  (POLITICAL)
]
update_game_start4 = [
      #KAOS  (POLITICAL) 
      (faction_set_slot, "fac_kingdom_7",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_8",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_9",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_10",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_11",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_12",  slot_faction_culture, "fac_culture_6"),

      (faction_set_slot, "fac_kingdom_13",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_14",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_15",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_16",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_17",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_18",  slot_faction_culture, "fac_culture_6"),

      (faction_set_slot, "fac_kingdom_7", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_8", slot_faction_banner, "mesh_banner_kingdom_d"),
      (faction_set_slot, "fac_kingdom_9", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_10", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_11", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_12", slot_faction_banner, "mesh_banner_kingdom_c"),

      (faction_set_slot, "fac_kingdom_13", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_14", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_15", slot_faction_banner, "mesh_banner_kingdom_c"),
      (faction_set_slot, "fac_kingdom_16", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_17", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_18", slot_faction_banner, "mesh_banner_kingdom_d"),

      (faction_set_slot, "fac_player_supporters_faction", slot_kaoses_faction_title_type, "fac_player_supporters_faction"),
      (faction_set_slot, "fac_kingdom_1", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_2", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_3", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_4", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_5", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_6", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      (faction_set_slot, "fac_kingdom_7", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_8", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_9", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_10", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_11", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_12", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      (faction_set_slot, "fac_kingdom_13", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_14", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_15", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_16", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_17", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_18", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      #KAOS  (POLITICAL)
]

EDIT: The modmerger lines at the very bottom of the file say something different:
Code:
   [SD_OP_BLOCK_INSERT, "game_start", D_SEARCH_FROM_TOP | D_SEARCH_LINENUMBER | D_INSERT_BEFORE, 0, 0, update_game_start4], #ADD TO START.
   [SD_OP_BLOCK_INSERT, "game_start", D_SEARCH_FROM_BOTTOM | D_SEARCH_LINENUMBER | D_INSERT_BEFORE, 0, 0, update_game_start], #ADD TO END.
   #[SD_OP_BLOCK_INSERT, "game_start", D_SEARCH_FROM_TOP | D_SEARCH_SCRIPTLINE | D_INSERT_AFTER,(assign, "$g_there_is_no_avaliable_centers", 0),0,update_game_start2],
   [SD_OP_BLOCK_INSERT, "game_start", D_SEARCH_FROM_TOP | D_SEARCH_SCRIPTLINE | D_INSERT_AFTER, (faction_set_note_available, "fac_neutral", 0),0,update_game_start3],

So, I'm guessing update_game_start2 isn't even intended to be used, and for the other three, that's where they're SUPPOSED to go.
 
Now I'm getting this error when I start, and I'm not sure how to go about fixing it (from rgl_log)
Code:
SCRIPT ERROR ON OPCODE 500: Invalid Troop ID: -1; LINE NO: 349: 
 At script: game_start. At script: game_start. At script: game_start. SCRIPT ERROR ON OPCODE 500: Invalid Troop ID: -1; LINE NO: 349: 
 At script: game_start. At script: game_start. At script: game_start. SCRIPT ERROR ON OPCODE 500: Invalid Troop ID: -1; LINE NO: 349: 
[...]
 At script: game_start. At script: game_start. At script: game_start. SCRIPT ERROR ON OPCODE 500: Invalid Troop ID: -1; LINE NO: 349: 
 At script: game_start. At script: game_start. At script: game_start. SCRIPT ERROR ON OPCODE 500: Invalid Troop ID: -1; LINE NO: 349: 
 At script: game_start. At script: game_start. At script: game_start. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. SCRIPT ERROR ON OPCODE 1506: Invalid Troop ID: -1; LINE NO: 2: 
 At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. SCRIPT ERROR ON OPCODE 1506: Invalid Troop ID: -1; LINE NO: 2: 
 At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. SCRIPT ERROR ON OPCODE 1506: Invalid Troop ID: -1; LINE NO: 2: 
 At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. SCRIPT ERROR ON OPCODE 1506: Invalid Troop ID: -1; LINE NO: 2: 
 At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. SCRIPT ERROR ON OPCODE 1506: Invalid Troop ID: -1; LINE NO: 2: 
 At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. SCRIPT ERROR ON OPCODE 1506: Invalid Troop ID: -1; LINE NO: 2: 
 At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. At script: dplmc_store_troop_is_female_reg. SCRIPT ERROR ON OPCODE 2322: Invalid Troop ID: -1; LINE NO: 30: 
 At script: npc_decision_checklist_peace_or_war. At script: npc_decision_checklist_peace_or_war. 

(it goes on like that for a long time)

Here are the three scripts in question, and since I can't add all of it, I've only included the first bits of the latter two, since 'line 2' and 'line 30' seem to suggest the problems are in the beginning of the script:

Code:
"game_start",
   [
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_state, sfs_inactive),
      (assign, "$g_player_luck", 200),
      (assign, "$g_player_luck", 200),
      (troop_set_slot, "trp_player", slot_troop_occupation, slto_kingdom_hero),
      (store_random_in_range, ":starting_training_ground", training_grounds_begin, training_grounds_end),
      (party_relocate_near_party, "p_main_party", ":starting_training_ground", 3),
      (str_store_troop_name, s5, "trp_player"),
      (party_set_name, "p_main_party", s5),
      (call_script, "script_update_party_creation_random_limits"),
      (assign, "$g_player_party_icon", -1),

	  #Warband changes begin -- set this early
	  (try_for_range, ":npc", 0, kingdom_ladies_end),
	    (this_or_next|eq, ":npc", "trp_player"),
		(is_between, ":npc", active_npcs_begin, kingdom_ladies_end),
		(troop_set_slot, ":npc", slot_troop_father, -1),
		(troop_set_slot, ":npc", slot_troop_mother, -1),
		(troop_set_slot, ":npc", slot_troop_guardian, -1),
		(troop_set_slot, ":npc", slot_troop_spouse, -1),
		(troop_set_slot, ":npc", slot_troop_betrothed, -1),
        (troop_set_slot, ":npc", slot_troop_prisoner_of_party, -1),
        (troop_set_slot, ":npc", slot_lady_last_suitor, -1),
        (troop_set_slot, ":npc", slot_troop_stance_on_faction_issue, -1),

		(store_random_in_range, ":decision_seed", 0, 10000),
        (troop_set_slot, ":npc", slot_troop_set_decision_seed, ":decision_seed"),	#currently not used
        (troop_set_slot, ":npc", slot_troop_temp_decision_seed, ":decision_seed"),	#currently not used, holds for at least 24 hours
	  (try_end),

	  (assign, "$g_lord_long_term_count", 0),
	  ##diplomacy start+ Clear faction leader/marshall, since 0 is the player
	  (try_for_range, ":faction_no", 0, dplmc_factions_end),
	     (neq, ":faction_no", "fac_player_faction"),
	     (neq, ":faction_no", "fac_player_supporters_faction"),
	     (faction_set_slot, ":faction_no", slot_faction_leader, -1),
	     (faction_set_slot, ":faction_no", slot_faction_marshall, -1),
	  (try_end),
	  ##diplomacy end+

	  (call_script, "script_initialize_banner_info"),
	  (call_script, "script_initialize_item_info"),
	  (call_script, "script_initialize_aristocracy"),
      (call_script, "script_initialize_npcs"),
      (assign, "$disable_npc_complaints", 0),
      #NPC companion changes end

      # Setting random feast time
      (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end),
        (store_random_in_range, ":last_feast_time", 0, 312), #240 + 72
        (val_mul, ":last_feast_time", -1),
        (faction_set_slot, ":faction_no", slot_faction_last_feast_start_time, ":last_feast_time"),
      (try_end),

      # Setting the random town sequence:
      (store_sub, ":num_towns", towns_end, towns_begin),
      (assign, ":num_iterations", ":num_towns"),
      (try_for_range, ":cur_town_no", 0, ":num_towns"),
        (troop_set_slot, "trp_random_town_sequence", ":cur_town_no", -1),
      (try_end),
      (assign, ":cur_town_no", 0),
      (try_for_range, ":unused", 0, ":num_iterations"),
        (store_random_in_range, ":random_no", 0, ":num_towns"),
        (assign, ":is_unique", 1),
        (try_for_range, ":cur_town_no_2", 0, ":num_towns"),
          (troop_slot_eq, "trp_random_town_sequence", ":cur_town_no_2", ":random_no"),
          (assign, ":is_unique", 0),
        (try_end),
        (try_begin),
          (eq, ":is_unique", 1),
          (troop_set_slot, "trp_random_town_sequence", ":cur_town_no", ":random_no"),
          (val_add, ":cur_town_no", 1),
        (else_try),
          (val_add, ":num_iterations", 1),
        (try_end),
      (try_end),

	  # Cultures:
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_1_troop, "trp_swadian_recruit"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_2_troop, "trp_swadian_militia"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_3_troop, "trp_swadian_footman"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_4_troop, "trp_swadian_infantry"),
      (faction_set_slot, "fac_culture_1",  slot_faction_tier_5_troop, "trp_swadian_knight"),

      (faction_set_slot, "fac_culture_2", slot_faction_tier_1_troop, "trp_vaegir_recruit"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_2_troop, "trp_vaegir_footman"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_3_troop, "trp_vaegir_veteran"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_4_troop, "trp_vaegir_infantry"),
      (faction_set_slot, "fac_culture_2", slot_faction_tier_5_troop, "trp_vaegir_knight"),

      (faction_set_slot, "fac_culture_3", slot_faction_tier_1_troop, "trp_khergit_tribesman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_2_troop, "trp_khergit_skirmisher"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_3_troop, "trp_khergit_horseman"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_4_troop, "trp_khergit_horse_archer"),
      (faction_set_slot, "fac_culture_3", slot_faction_tier_5_troop, "trp_khergit_veteran_horse_archer"),

      (faction_set_slot, "fac_culture_4", slot_faction_tier_1_troop, "trp_nord_recruit"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_2_troop, "trp_nord_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_3_troop, "trp_nord_trained_footman"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_4_troop, "trp_nord_warrior"),
      (faction_set_slot, "fac_culture_4", slot_faction_tier_5_troop, "trp_nord_veteran"),

      (faction_set_slot, "fac_culture_5", slot_faction_tier_1_troop, "trp_rhodok_tribesman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_2_troop, "trp_rhodok_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_3_troop, "trp_rhodok_trained_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_4_troop, "trp_rhodok_veteran_spearman"),
      (faction_set_slot, "fac_culture_5", slot_faction_tier_5_troop, "trp_rhodok_sergeant"),

      (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_1", slot_faction_town_walker_male_troop, "trp_town_walker_1"),
      (faction_set_slot, "fac_culture_1", slot_faction_town_walker_female_troop, "trp_town_walker_2"),
      (faction_set_slot, "fac_culture_1", slot_faction_village_walker_male_troop, "trp_village_walker_1"),
      (faction_set_slot, "fac_culture_1", slot_faction_village_walker_female_troop, "trp_village_walker_2"),
      (faction_set_slot, "fac_culture_1", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_1", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

      (faction_set_slot, "fac_culture_2", slot_faction_town_walker_male_troop, "trp_town_walker_1"),
      (faction_set_slot, "fac_culture_2", slot_faction_town_walker_female_troop, "trp_town_walker_2"),
      (faction_set_slot, "fac_culture_2", slot_faction_village_walker_male_troop, "trp_village_walker_1"),
      (faction_set_slot, "fac_culture_2", slot_faction_village_walker_female_troop, "trp_village_walker_2"),
      (faction_set_slot, "fac_culture_2", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_2", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

      (faction_set_slot, "fac_culture_3", slot_faction_town_walker_male_troop, "trp_khergit_townsman"),
      (faction_set_slot, "fac_culture_3", slot_faction_town_walker_female_troop, "trp_khergit_townswoman"),
      (faction_set_slot, "fac_culture_3", slot_faction_village_walker_male_troop, "trp_khergit_townsman"),
      (faction_set_slot, "fac_culture_3", slot_faction_village_walker_female_troop, "trp_khergit_townswoman"),
      (faction_set_slot, "fac_culture_3", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_3", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

      (faction_set_slot, "fac_culture_4", slot_faction_town_walker_male_troop, "trp_town_walker_1"),
      (faction_set_slot, "fac_culture_4", slot_faction_town_walker_female_troop, "trp_town_walker_2"),
      (faction_set_slot, "fac_culture_4", slot_faction_village_walker_male_troop, "trp_village_walker_1"),
      (faction_set_slot, "fac_culture_4", slot_faction_village_walker_female_troop, "trp_village_walker_2"),
      (faction_set_slot, "fac_culture_4", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_4", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

      (faction_set_slot, "fac_culture_5", slot_faction_town_walker_male_troop, "trp_town_walker_1"),
      (faction_set_slot, "fac_culture_5", slot_faction_town_walker_female_troop, "trp_town_walker_2"),
      (faction_set_slot, "fac_culture_5", slot_faction_village_walker_male_troop, "trp_village_walker_1"),
      (faction_set_slot, "fac_culture_5", slot_faction_village_walker_female_troop, "trp_village_walker_2"),
      (faction_set_slot, "fac_culture_5", slot_faction_town_spy_male_troop, "trp_spy_walker_1"),
      (faction_set_slot, "fac_culture_5", slot_faction_town_spy_female_troop, "trp_spy_walker_2"),

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

      (try_begin),
        (eq, "$cheat_mode", 1),
        (assign, reg3, "$cheat_mode"),
        (display_message, "@{!}DEBUG : Completed faction troop assignments, cheat mode: {reg3}"),
      (try_end),

# Factions:
      (faction_set_slot, "fac_kingdom_1",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_1",  slot_faction_leader, "trp_kingdom_1_lord"),
	  (troop_set_slot, "trp_kingdom_1_lord", slot_troop_renown, 1200),

      (faction_set_slot, "fac_kingdom_2",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_2",  slot_faction_leader, "trp_kingdom_2_lord"),
	  (troop_set_slot, "trp_kingdom_2_lord", slot_troop_renown, 1200),

      (faction_set_slot, "fac_kingdom_3",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_3",  slot_faction_leader, "trp_kingdom_3_lord"),
	  (troop_set_slot, "trp_kingdom_3_lord", slot_troop_renown, 1200),

      (faction_set_slot, "fac_kingdom_4",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_4",  slot_faction_leader, "trp_kingdom_4_lord"),
	  (troop_set_slot, "trp_kingdom_4_lord", slot_troop_renown, 1200),

      (faction_set_slot, "fac_kingdom_5",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_5",  slot_faction_leader, "trp_kingdom_5_lord"),
	  (troop_set_slot, "trp_kingdom_5_lord", slot_troop_renown, 1200),

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

      #Cait - added KAOSPolitical stuff here from update_game_start4, put here based on Modmerger documentation at the bottom of KAOSPolitical_scripts. And HERE because it makes sense.
      #KAOS  (POLITICAL) 
      (faction_set_slot, "fac_kingdom_7",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_8",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_9",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_10",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_11",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_12",  slot_faction_culture, "fac_culture_6"),

      (faction_set_slot, "fac_kingdom_13",  slot_faction_culture, "fac_culture_1"),
      (faction_set_slot, "fac_kingdom_14",  slot_faction_culture, "fac_culture_2"),
      (faction_set_slot, "fac_kingdom_15",  slot_faction_culture, "fac_culture_3"),
      (faction_set_slot, "fac_kingdom_16",  slot_faction_culture, "fac_culture_4"),
      (faction_set_slot, "fac_kingdom_17",  slot_faction_culture, "fac_culture_5"),
      (faction_set_slot, "fac_kingdom_18",  slot_faction_culture, "fac_culture_6"),

      (faction_set_slot, "fac_kingdom_7", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_8", slot_faction_banner, "mesh_banner_kingdom_d"),
      (faction_set_slot, "fac_kingdom_9", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_10", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_11", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_12", slot_faction_banner, "mesh_banner_kingdom_c"),

      (faction_set_slot, "fac_kingdom_13", slot_faction_banner, "mesh_banner_kingdom_a"),
      (faction_set_slot, "fac_kingdom_14", slot_faction_banner, "mesh_banner_kingdom_f"),
      (faction_set_slot, "fac_kingdom_15", slot_faction_banner, "mesh_banner_kingdom_c"),
      (faction_set_slot, "fac_kingdom_16", slot_faction_banner, "mesh_banner_kingdom_e"),
      (faction_set_slot, "fac_kingdom_17", slot_faction_banner, "mesh_banner_kingdom_b"),
      (faction_set_slot, "fac_kingdom_18", slot_faction_banner, "mesh_banner_kingdom_d"),

      (faction_set_slot, "fac_player_supporters_faction", slot_kaoses_faction_title_type, "fac_player_supporters_faction"),
      (faction_set_slot, "fac_kingdom_1", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_2", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_3", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_4", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_5", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_6", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      (faction_set_slot, "fac_kingdom_7", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_8", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_9", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_10", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_11", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_12", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      (faction_set_slot, "fac_kingdom_13", slot_kaoses_faction_title_type, "fac_kingdom_1"),
      (faction_set_slot, "fac_kingdom_14", slot_kaoses_faction_title_type, "fac_kingdom_2"),
      (faction_set_slot, "fac_kingdom_15", slot_kaoses_faction_title_type, "fac_kingdom_3"),
      (faction_set_slot, "fac_kingdom_16", slot_kaoses_faction_title_type, "fac_kingdom_4"),
      (faction_set_slot, "fac_kingdom_17", slot_kaoses_faction_title_type, "fac_kingdom_5"),
      (faction_set_slot, "fac_kingdom_18", slot_kaoses_faction_title_type, "fac_kingdom_6"),

      #KAOS  (POLITICAL)

      (assign, ":player_faction_culture", "fac_culture_1"),
      (faction_set_slot, "fac_player_supporters_faction",  slot_faction_culture, ":player_faction_culture"),
      (faction_set_slot, "fac_player_faction",  slot_faction_culture, ":player_faction_culture"),

      (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end),
        (faction_set_slot, ":faction_no", slot_faction_marshall, -1),
      (try_end),
      (faction_set_slot, "fac_player_supporters_faction", slot_faction_marshall, "trp_player"),
      (call_script, "script_initialize_faction_troop_types"),
      ##diplomacy begin
      (call_script, "script_dplmc_init_domestic_policy"),
      ##diplomacy end


# Towns:
      (try_for_range, ":item_no", trade_goods_begin, trade_goods_end),
        (store_sub, ":offset", ":item_no", trade_goods_begin),
        (val_add, ":offset", slot_town_trade_good_prices_begin),
        (try_for_range, ":center_no", centers_begin, centers_end),
          (party_set_slot, ":center_no", ":offset", average_price_factor), #1000
        (try_end),
      (try_end),

	  (call_script, "script_initialize_trade_routes"),
	  (call_script, "script_initialize_town_arena_info"),
      #start some tournaments
      (try_for_range, ":town_no", towns_begin, towns_end),
        (store_random_in_range, ":rand", 0, 100),
        (lt, ":rand", 20),
        (store_random_in_range, ":random_days", 12, 15),
        (party_set_slot, ":town_no", slot_town_has_tournament, ":random_days"),
      (try_end),

      #village products -- at some point we might make it so that the villages supply raw materials to towns, and the towns produce manufactured goods
	  #village products designate the raw materials produced in the vicinity
	  #right now, just doing a test for grain produced in the swadian heartland


	  # fill_village_bound_centers
    #pass 1: Give one village to each castle
      (try_for_range, ":cur_center", castles_begin, castles_end),
        (assign, ":min_dist", 999999),
        (assign, ":min_dist_village", -1),
        (try_for_range, ":cur_village", villages_begin, villages_end),
          (neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound.
          (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_center"),
          (lt, ":cur_dist", ":min_dist"),
          (assign, ":min_dist", ":cur_dist"),
          (assign, ":min_dist_village", ":cur_village"),
        (try_end),
        (party_set_slot, ":min_dist_village", slot_village_bound_center, ":cur_center"),
        (store_faction_of_party, ":town_faction", ":cur_center"),
        (call_script, "script_give_center_to_faction_aux", ":min_dist_village", ":town_faction"),
      (try_end),


    #pass 2: Give other villages to closest town.
      (try_for_range, ":cur_village", villages_begin, villages_end),
        (neg|party_slot_ge, ":cur_village", slot_village_bound_center, 1), #skip villages which are already bound.
        (assign, ":min_dist", 999999),
        (assign, ":min_dist_town", -1),
        (try_for_range, ":cur_town", towns_begin, towns_end),
          (store_distance_to_party_from_party, ":cur_dist", ":cur_village", ":cur_town"),
          (lt, ":cur_dist", ":min_dist"),
          (assign, ":min_dist", ":cur_dist"),
          (assign, ":min_dist_town", ":cur_town"),
        (try_end),
        (party_set_slot, ":cur_village", slot_village_bound_center, ":min_dist_town"),
        (store_faction_of_party, ":town_faction", ":min_dist_town"),
        (call_script, "script_give_center_to_faction_aux", ":cur_village", ":town_faction"),
      (try_end),


	# Towns (loop)
      (try_for_range, ":town_no", towns_begin, towns_end),
        (store_sub, ":offset", ":town_no", towns_begin),
        (party_set_slot,":town_no", slot_party_type, spt_town),
        #(store_add, ":cur_object_no", "trp_town_1_seneschal", ":offset"),
        #(party_set_slot,":town_no", slot_town_seneschal, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_center", ":offset"),
        (party_set_slot,":town_no", slot_town_center, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_castle", ":offset"),
        (party_set_slot,":town_no", slot_town_castle, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_prison", ":offset"),
        (party_set_slot,":town_no", slot_town_prison, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_walls", ":offset"),
        (party_set_slot,":town_no", slot_town_walls, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_tavern", ":offset"),
        (party_set_slot,":town_no", slot_town_tavern, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_store", ":offset"),
        (party_set_slot,":town_no", slot_town_store, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_arena", ":offset"),
        (party_set_slot,":town_no", slot_town_arena, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_alley", ":offset"),
        (party_set_slot,":town_no", slot_town_alley, ":cur_object_no"),
        (store_add, ":cur_object_no", "trp_town_1_mayor", ":offset"),
        (party_set_slot,":town_no", slot_town_elder, ":cur_object_no"),
        (store_add, ":cur_object_no", "trp_town_1_tavernkeeper", ":offset"),
        (party_set_slot,":town_no", slot_town_tavernkeeper, ":cur_object_no"),
        (store_add, ":cur_object_no", "trp_town_1_weaponsmith", ":offset"),
        (party_set_slot,":town_no", slot_town_weaponsmith, ":cur_object_no"),
        (store_add, ":cur_object_no", "trp_town_1_armorer", ":offset"),
        (party_set_slot,":town_no", slot_town_armorer, ":cur_object_no"),
        (store_add, ":cur_object_no", "trp_town_1_merchant", ":offset"),
        (party_set_slot,":town_no", slot_town_merchant, ":cur_object_no"),
        (store_add, ":cur_object_no", "trp_town_1_horse_merchant", ":offset"),
        (party_set_slot,":town_no", slot_town_horse_merchant, ":cur_object_no"),
        (store_add, ":cur_object_no", "scn_town_1_center", ":offset"),
        (party_set_slot,":town_no", slot_town_center, ":cur_object_no"),
        (party_set_slot,":town_no", slot_town_reinforcement_party_template, "pt_center_reinforcements"),
      (try_end),

# Castles
      (try_for_range, ":castle_no", castles_begin, castles_end),
        (store_sub, ":offset", ":castle_no", castles_begin),
        (val_mul, ":offset", 3),

#        (store_add, ":senechal_troop_no", "trp_castle_1_seneschal", ":offset"),
#        (party_set_slot,":castle_no", slot_town_seneschal, ":senechal_troop_no"),
        (store_add, ":exterior_scene_no", "scn_castle_1_exterior", ":offset"),
        (party_set_slot,":castle_no", slot_castle_exterior, ":exterior_scene_no"),
        (store_add, ":interior_scene_no", "scn_castle_1_interior", ":offset"),
        (party_set_slot,":castle_no", slot_town_castle, ":interior_scene_no"),
        (store_add, ":interior_scene_no", "scn_castle_1_prison", ":offset"),
        (party_set_slot,":castle_no", slot_town_prison, ":interior_scene_no"),

        (party_set_slot,":castle_no", slot_town_reinforcement_party_template, "pt_center_reinforcements"),
        (party_set_slot,":castle_no", slot_party_type, spt_castle),
        (party_set_slot,":castle_no", slot_center_is_besieged_by, -1),
      (try_end),

# Set which castles need to be attacked with siege towers.
      (party_set_slot,"p_town_13", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_town_16", slot_center_siege_with_belfry, 1),

      (party_set_slot,"p_castle_1", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_2", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_4", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_7", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_8", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_9", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_11", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_13", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_21", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_25", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_34", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_35", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_38", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_40", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_41", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_42", slot_center_siege_with_belfry, 1),
      (party_set_slot,"p_castle_43", slot_center_siege_with_belfry, 1),

	  # Villages characters
      (try_for_range, ":village_no", villages_begin, villages_end),
        (store_sub, ":offset", ":village_no", villages_begin),

        (store_add, ":exterior_scene_no", "scn_village_1", ":offset"),
        (party_set_slot,":village_no", slot_castle_exterior, ":exterior_scene_no"),

        (store_add, ":store_troop_no", "trp_village_1_elder", ":offset"),
        (party_set_slot,":village_no", slot_town_elder, ":store_troop_no"),

        (party_set_slot,":village_no", slot_party_type, spt_village),
        (party_set_slot,":village_no", slot_village_raided_by, -1),

        (call_script, "script_refresh_village_defenders", ":village_no"),
        (call_script, "script_refresh_village_defenders", ":village_no"),
        (call_script, "script_refresh_village_defenders", ":village_no"),
        (call_script, "script_refresh_village_defenders", ":village_no"),
      (try_end),

      (try_for_range, ":center_no", centers_begin, centers_end),
        (party_set_slot, ":center_no", slot_center_last_spotted_enemy, -1),
        (party_set_slot, ":center_no", slot_center_is_besieged_by, -1),
        (party_set_slot, ":center_no", slot_center_last_taken_by_troop, -1),
        ##diplomacy start+ Set the home slots for town merchants, elders, etc. for reverse-lookup
        (try_for_range, ":offset", dplmc_slot_town_merchants_begin, dplmc_slot_town_merchants_end),
           (party_get_slot, ":npc", ":center_no", ":offset"),
           (gt, ":npc", 0),
           (neg|troop_slot_ge, ":npc", slot_troop_home, 1),#If the startup script wasn't altered by another mod, we don't have to worry about this condition.
           (troop_set_slot, ":npc", slot_troop_home, ":center_no"),
        (try_end),
        ##diplomacy end+
      (try_end),

# Troops:

# Assign banners and renown.
# We assume there are enough banners for all kingdom heroes.

      #faction banners
      (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"),

      (try_for_range, ":cur_faction", npc_kingdoms_begin, npc_kingdoms_end),
        (faction_get_slot, ":cur_faction_king", ":cur_faction", slot_faction_leader),
        (faction_get_slot, ":cur_faction_banner", ":cur_faction", slot_faction_banner),
        (val_sub, ":cur_faction_banner", banner_meshes_begin),
        (val_add, ":cur_faction_banner", banner_scene_props_begin),
        (troop_set_slot, ":cur_faction_king", slot_troop_banner_scene_prop, ":cur_faction_banner"),
      (try_end),
      (assign, ":num_khergit_lords_assigned", 0),
      (assign, ":num_sarranid_lords_assigned", 0),
      (assign, ":num_other_lords_assigned", 0),

      (try_for_range, ":kingdom_hero", active_npcs_begin, active_npcs_end),
        (this_or_next|troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_kingdom_hero),
        (troop_slot_eq, ":kingdom_hero", slot_troop_occupation, slto_inactive_pretender),

        (store_troop_faction, ":kingdom_hero_faction", ":kingdom_hero"),
        (neg|faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
        (try_begin),
          (eq, ":kingdom_hero_faction", "fac_kingdom_3"), #Khergit Khanate
          (store_add, ":kingdom_3_banners_begin", banner_scene_props_begin, khergit_banners_begin_offset),
          (store_add, ":banner_id", ":kingdom_3_banners_begin", ":num_khergit_lords_assigned"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_khergit_lords_assigned", 1),
        (else_try),
          (eq, ":kingdom_hero_faction", "fac_kingdom_6"), #Sarranid Sultanate
          (store_add, ":kingdom_6_banners_begin", banner_scene_props_begin, sarranid_banners_begin_offset),
          (store_add, ":banner_id", ":kingdom_6_banners_begin", ":num_sarranid_lords_assigned"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_sarranid_lords_assigned", 1),
        (else_try),
          (assign, ":hero_offset", ":num_other_lords_assigned"),
          (try_begin),
            (gt, ":hero_offset", khergit_banners_begin_offset),#Do not add khergit banners to other lords
            (val_add, ":hero_offset", khergit_banners_end_offset),
            (val_sub, ":hero_offset", khergit_banners_begin_offset),
          (try_end),
          (try_begin),
            (gt, ":hero_offset", sarranid_banners_begin_offset),#Do not add sarranid banners to other lords
            (val_add, ":hero_offset", sarranid_banners_end_offset),
            (val_sub, ":hero_offset", sarranid_banners_begin_offset),
          (try_end),
          (store_add, ":banner_id", banner_scene_props_begin, ":hero_offset"),
          (troop_set_slot, ":kingdom_hero", slot_troop_banner_scene_prop, ":banner_id"),
          (val_add, ":num_other_lords_assigned", 1),
        (try_end),
        (try_begin),
          (this_or_next|lt, ":banner_id", banner_scene_props_begin),
          (gt, ":banner_id", banner_scene_props_end_minus_one),
          (display_message, "@{!}ERROR: Not enough banners for heroes!"),
        (try_end),

        (store_character_level, ":level", ":kingdom_hero"),
        (store_mul, ":renown", ":level", ":level"),
        (val_div, ":renown", 4), #for top lord, is about 400

		(troop_get_slot, ":age", ":kingdom_hero", slot_troop_age),
        (store_mul, ":age_addition", ":age", ":age"),
        (val_div, ":age_addition", 8), #for top lord, is about 400
		(val_add, ":renown", ":age_addition"),

        (try_begin),
          (faction_slot_eq, ":kingdom_hero_faction", slot_faction_leader, ":kingdom_hero"),
          (store_random_in_range, ":random_renown", 250, 400),
        (else_try),
          (store_random_in_range, ":random_renown", 0, 100),
        (try_end),
        (val_add, ":renown", ":random_renown"),

        (troop_set_slot, ":kingdom_hero", slot_troop_renown, ":renown"),
      (try_end),

      (try_for_range, ":troop_no", "trp_player", "trp_merchants_end"),
        (add_troop_note_tableau_mesh, ":troop_no", "tableau_troop_note_mesh"),
      (try_end),

      (try_for_range, ":center_no", centers_begin, centers_end),
        (add_party_note_tableau_mesh, ":center_no", "tableau_center_note_mesh"),
      (try_end),

      (try_for_range, ":faction_no", kingdoms_begin, kingdoms_end),
        (is_between, ":faction_no", "fac_kingdom_1", kingdoms_end), #Excluding player kingdom
        (add_faction_note_tableau_mesh, ":faction_no", "tableau_faction_note_mesh"),
      (else_try),
        (add_faction_note_tableau_mesh, ":faction_no", "tableau_faction_note_mesh_banner"),
      (try_end),

Code:
  ("dplmc_store_troop_is_female_reg",                                                  #Cait - problems. Gave me a bunch of problems on start when starting regarding this.
  [
	(store_script_param_1, ":troop_no"),                                                   
	(store_script_param_2, ":reg_no"),                                                       
	(troop_get_type, ":is_female", ":troop_no"),                                                  #Cait - THIS LINE: OPCODE 1506

Code:
(
  "npc_decision_checklist_peace_or_war",                                                                                     #Cait - problems. Started as male and gave me a bunch of errors regarding this.
	#this script is used to add a bit more color to diplomacy, particularly with regards to the player
	[
	(store_script_param, ":actor_faction", 1),
	(store_script_param, ":target_faction", 2),
	(store_script_param, ":envoy", 3),
	##diplomacy start+
	#Since "fac_player_supporters_faction" is used as a synonym for "the faction led by the player"
	#in many places, correct this here.
	(call_script, "script_dplmc_translate_inactive_player_supporter_faction_2", ":actor_faction", ":target_faction"),
	(assign, ":actor_faction", reg0),
	(assign, ":target_faction", reg1),
	##diplomacy end+
	(assign, ":actor_strength", 0),
	(assign, ":target_strength", 0),
	(assign, ":actor_centers_held_by_target", 0),
#	(assign, ":two_factions_share_border", 0),
	(assign, ":third_party_war", 0),
	(assign, ":num_third_party_wars", 0),
	(assign, ":active_mutual_enemy", 0), #an active enemy with which the target is at war
	(assign, "$g_concession_demanded", 0),
	##diplomacy start+
	(assign, ":last_center_lost", 0),#  last center lost to the target faction
	(assign, ":last_center_lost_time", 0),# time the last center was lost to the target faction
	#"Third party" after taking into account alliances
	#(assign, ":actual_third_party_war", 0),
	(assign, ":num_actual_third_party_wars", 0),
	##diplomacy end+
	(store_relation, ":current_faction_relation", ":actor_faction", ":target_faction"),
	(try_begin),
		(eq, ":target_faction", "fac_player_supporters_faction"),
		(assign, ":modified_honor_and_relation", "$player_honor"), #this can be affected by the emissary's skill
		(val_add, ":target_strength", 2), #for player party
	(else_try),
		(assign, ":modified_honor_and_relation", 0), #this can be affected by the emissary's skill
	(try_end),
	(faction_get_slot, ":actor_leader", ":actor_faction", slot_faction_leader),
	(faction_get_slot, ":target_leader", ":target_faction", slot_faction_leader),

I found this post by gsanders while looking up opcode errors, and I did that, but it didn't help.

EDIT: This seems to be a problem with the latest Diplomacy/KAOSPolitical release as well.
 
Has someone this pack without jrider dynamic titles? Because in my mod every lord uses his specific title or any instruction how carefully delete this feature?
 
Hey, I seem to have messed something up. I'm trying to merge KAOS with native, and I followed the readme, and it finally compiled, but when I ran the game, nothing really changed except that right from the get-go I'm the ruler of the "Empire" and "Rebel" factions. What gives?
 
Back
Top Bottom