I've modified the game to allow garrisons in villages that you own. Now I want to put the troops on the payroll. I modified the troops section of the budget report, but village garrisons don't shoe up.
My additions are in green. What's wrong, please?
#TroopsBegin
(try_for_parties, ":party_no"),
(assign, ":garrison_troop", 0),
(try_begin),
(this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_town),
(party_slot_eq, ":party_no", slot_party_type, spt_castle),
(party_slot_eq, ":party_no", slot_party_type, spt_village), ##garrison of villages
(party_slot_eq, ":party_no", slot_town_lord, "trp_player"),
(assign, ":garrison_troop", 1),
(else_try),
(this_or_next|party_slot_eq, ":party_no", slot_party_type, spt_town),
(party_slot_eq, ":party_no", slot_party_type, spt_castle),
(party_slot_eq, ":party_no", slot_party_type, spt_village), ##garrison of villages
(neg|party_slot_ge, ":party_no", slot_town_lord, 1), #unassigned
(store_faction_of_party, ":center_faction", ":party_no"),
(eq, ":center_faction", "fac_player_supporters_faction"),
(faction_slot_eq, "fac_player_supporters_faction", slot_faction_leader, "trp_player"),
(assign, ":garrison_troop", 1),
(try_end),
(this_or_next|eq, ":party_no", "p_main_party"),
(eq, ":garrison_troop", 1),
(assign, ":total_wage", 0),
(party_get_num_companion_stacks, ":num_stacks", ":party_no"),
(try_for_range, ":i_stack", 0, ":num_stacks"),
(party_stack_get_troop_id, ":stack_troop", ":party_no", ":i_stack"),
(party_stack_get_size, ":stack_size", ":party_no", ":i_stack"),
(call_script, "script_game_get_troop_wage", ":stack_troop", ":party_no"),
(assign, ":cur_wage", reg0),
(val_mul, ":cur_wage", ":stack_size"),
(val_add, ":total_wage", ":cur_wage"),
(try_end),
(try_begin),
(eq, ":garrison_troop", 1),
(val_div, ":total_wage", 2), #Half payment for garrisons
(else_try),
(eq, ":party_no", "p_main_party"),
(store_sub, ":total_payment_ratio", 14, "$g_cur_week_half_daily_wage_payments"), #between 0 and 7
(val_mul, ":total_wage", ":total_payment_ratio"),
(val_div, ":total_wage", 14),
(try_end),
## (gt, ":total_wage", 0),
(val_mul, ":total_wage", -1),
(val_add, ":net_change", ":total_wage"),
(str_store_party_name, s0, ":party_no"),
(try_begin),
(eq, ":party_no", "p_main_party"),
(str_store_string, s0, "str_s0s_party"),
(try_end),