mission templates are a common set of triggers code and which affect behaviour inside a scene. They are applied via set_jump_mission preceeding jump_to_scene. In regular field battles, you'll want "lead_charge" The first part (excluding the name and flags) deals with how visitors set up for the various entry points are affected. The triggers themselves in the block below may be encapsulated inside individual templates, or be included as a one-liner such as common_regeneration. Note, however that both are compiled in the same way - "common" triggers only shorten and unify code in the source files. To include such a trigger (which must first be placed above the list of mission templates with its name followed by the indented code without a comma), simply add a comma after its name inside any mission template.
Keep common_regeneration (but change $player_agent, to :agent so you don't use an extraneous global), and add the following:
(
"lead_charge",mtf_battle_mode,charge,
"You lead your men to battle.",
[
(1,mtef_defenders|mtef_team_0,0,aif_start_alarmed,12,[]),
(0,mtef_defenders|mtef_team_0,0,aif_start_alarmed,0,[]),
(4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,12,[]),
(4,mtef_attackers|mtef_team_1,0,aif_start_alarmed,0,[]),
],
[
(ti_on_agent_spawn, 0, 0, [],
[
(store_trigger_param_1, ":agent_no"),
(call_script, "script_agent_reassign_team", ":agent_no"),
(assign, ":initial_courage_score", 5000),
(agent_get_troop_id, ":troop_id", ":agent_no"),
(try_begin), #add this
(eq, ":troop_id", "trp_demigod"),
(agent_set_slot, ":agent_no", slot_agent_regen_rate, 4),
(try_end),
...
(agent_set_slot, ":agent_no", slot_agent_courage_score, ":initial_courage_score"),
]),
common_battle_init_banner,
common_regeneration, #and this