Events are the parameters in scripting used to determine the interval at which the script is checked for in order to fire. They are used to fire a script at a proper time during the game process, such as at the end of a battle, the start of a turn, or the death of a general. The event is what enables most scripts to work, by finding the proper time to trigger the script. In determining which event to use, you should consider which Conditions you want to use, and insure the event exports the triggers that those conditions require, or the script won't work as intended.
These trigger exports are: character_record, nc_character_record, player_unit, enemy_unit, infer_defending_unit, infer_attacking_unit, resource_description, character_action_advice, target_character_record, ransom_type, captured_faction_info, faction, target_faction, unit, mission_success_level, mission_details, event_counter, sm_position, region_id, target_region_id, crusade, target_religion, settlement, target_settlement, prior_build, best_finance_option, advised_build, fort, army, event, religion, event_type.
Events usually export more than one trigger, the most common triggers required from an event are listed here: Required Triggers (M2-Scripting)
This table is a Work in Progress - Current Progress: 10/214
Sortable table, click header to sort column:
- Conditions (M2-Scripting) - For information on Conditions and links to Condition pages