Egbert
Master Knight
Does anyone know where the game removes casualties from the parties when you finish a battle in the SP lead_charge mission template? I'm trying to write a battle resolver that kills specific troops from the enemy parties, but I don't want to do it randomly.
All I can figure is that it's hard coded, because I can find that the script_count_mission_casualties_from_agents adds troops to p_enemy_casualties and p_player_casualties, but I can't find a party_remove_members for the battle. The auto resolve menu uses the inflict_casualties_to_party_group command which is pretty much random based on party strength.
By running a script to count how many troops are in the main party and the encountered party I found that the troops are removed after the (finish_mission,0), in common_battle_tab_press but before the menu battle_debrief, but no sign of what remove them.
All I can figure is that it's hard coded, because I can find that the script_count_mission_casualties_from_agents adds troops to p_enemy_casualties and p_player_casualties, but I can't find a party_remove_members for the battle. The auto resolve menu uses the inflict_casualties_to_party_group command which is pretty much random based on party strength.
By running a script to count how many troops are in the main party and the encountered party I found that the troops are removed after the (finish_mission,0), in common_battle_tab_press but before the menu battle_debrief, but no sign of what remove them.