("cf_reinforce_party",
[
(store_script_param_1, ":party_no"),
(store_faction_of_party, ":party_faction", ":party_no"),
##diplomacy start+ The party faction may be changed for culture, but we still need the original
(assign, ":real_party_faction", ":party_faction"),
##diplomacy end+
(party_get_slot, ":party_type",":party_no", slot_party_type),
#Rebellion changes begin:
##(try_begin),
##(eq, ":party_type", spt_kingdom_hero_party),
##(party_stack_get_troop_id, ":leader", ":party_no"),
##(troop_get_slot, ":party_faction", ":leader", slot_troop_original_faction),
##diplomacy start+ Use player culture for companions and spouse (and any hypothetical non-hero mercenaries)
##(eq, ":party_faction", "fac_player_supporters_faction"),
##(is_between, "$g_player_culture", npc_kingdoms_begin, npc_kingdoms_end),
##(this_or_next|is_between, ":leader", companions_begin, companions_end),
##(this_or_next|troop_slot_eq, "trp_player", slot_troop_spouse, ":leader"),
## (neg|is_between, ":leader", heroes_begin, heroes_end),
##(assign, ":party_faction", "$g_player_culture"),
##diplomacy end+
##(try_end),
#Rebellion changes end
(try_begin),
(eq, ":party_faction", "fac_player_supporters_faction"),
(party_get_slot, ":town_lord", ":party_no", slot_town_lord),
(try_begin),
##diplomacy begin
(is_between, "$g_player_culture", npc_kingdoms_begin, npc_kingdoms_end),
(assign, ":party_faction", "$g_player_culture"),
##(try_begin), #debug
##(eq, "$cheat_mode", 1),
##(str_store_party_name, s11, ":party_no"),
##(display_message, "@pt in {s11}"),
##(try_end),
##(else_try),
##diplomacy end
##(gt, ":town_lord", 0),
## (troop_get_slot, ":party_faction", ":town_lord", slot_troop_original_faction),
##(else_try),
##(party_get_slot, ":party_faction", ":party_no", slot_center_original_faction),
(try_end),
(try_end),
##diplomacy start+ Player culture cleanup (do this once here, instead of separately for each type)
(try_begin),
(gt, ":real_party_faction", "fac_commoners"),
(this_or_next|eq, ":real_party_faction", "fac_player_faction"),
(this_or_next|eq, ":real_party_faction", "fac_player_supporters_faction"),
(eq, ":real_party_faction", "$players_kingdom"),
(neg|is_between, ":party_faction", npc_kingdoms_begin, npc_kingdoms_end),
(is_between, "$g_player_culture", npc_kingdoms_begin, npc_kingdoms_end),
(assign, ":party_faction", "$g_player_culture"),
(try_end),
##diplomacy end+