====== Trigger ====== **Trigger files** revisited, directly from Codec: Trigger files (.tri) Syntax: Comments start with a / and the rest of the line is ignored. Keywords are: How many events there are in total: #TOTAL_EVENTS [number] Then follows an initialisation section that has the following fields. This is read at the start of a new campaign. Section ends with the **ENDINIT** This event is set: #SET_EVENT [event] This event is cleared (not set): #RESET_EVENT [event] Redundant, use to set the campaign tempo: #SET_TEMPO [number] Redundant, use to read a teams priority file: #CHANGE_PRIORITIES [teamno] [number] The following only apply to special initialisations. Bullseye reference point X position. X-position of relative map point to calculate best new Bullseye position (closest FLOT objective to this point will become new bullseye position): #BULLSEYE_X [number] Bullseye reference point Y position. Y-position of relative map point to calculate best new Bullseye position (closest FLOT objective to this point will become new bullseye position): #BULLSEYE_Y [number] FLOT sort direction; 0 = West-East, 1 = North-South. 0: Sort FLOT by X-coordinates (default), 1: Sort FLOT by Y-coordinates: #FLOT_SORTDIRECTION [number] FLOT distance position. Maximum distance between two FLOT objects (in km) to draw a line: #FLOT_DRAWDISTANCE [number] These parameters must be placed in the first setup part between **#TOTAL_EVENTS** and **#ENDINIT**.\\ Defaults are: #BULLSEYE_X 512 #BULLSEYE_Y 512 (center of Korea, which is original value) #FLOT_SORTDIRECTION 0 #FLOT_DRAWDISTANCE 50 End of initialisation section: #ENDINIT The remaining parts can occur anywhere in the file End of the trigger file - everything else is ignored: #ENDSCRIPT A family of tests for certain conditions chosen from the following: #IF True if event number has been fired (set in the EVT camp sub file): #IF_EVENT_PLAYED [event] True if friendly/enemy team has ground task manager priorityObjective set to [number]: #IF_MAIN_TARGET [F|E] [number] True if team friendly/enemy camp_id primary objective has ground_assigned set: #IF_TROOPS_COMMITTED [F|E] [camp_id] True if the team controls the list of objectives. With type of 'A' it must own all the objectives in the list, else it must own any of them (and/or logic): #IF_CONTROLLED [team] [type] [obj list] True if team has initiative level greater/less than or equal to the number given: #IF_INITIATIVE [team] [G|L] [number] True if the team has current stats of greater/less than or equal to the number: #IF_SUPPLY [team] [G|L] [number] True if the player option for enemy ground experience is greater/less than or equal to the number: #IF_PLAYER_DIFFICULTY [G|L] [number] True if the friendly/enemy team controls more than number objectives: #IF_PRI_CONTROLLED_LT [F|E] [number] True if team has ground action offensive type set: #IF_ON_OFFENSIVE [team] True if force ratio is of the right ratio. - type is A for current aircraft, G for current ground vehicles, N for current no ships, anything else is aircraft + ground The number is calculated for the given team and the opposite team. Then the ratio is (team no * 10) / (opposite number) which to be true must be greater/less than or equal to the number: #IF_FORCE_RATIO [type] [team] [opposite] [G|L] [number] True if this many hours have elapsed since the last major campaign event: #IF_BORDOM_HOURS [hours] If G is present, true if the current campaign day is ]= the number, else true if less that or equal: #IF_CAMPAIGN_DAY [G|L] [number] With a G, true if the team has reinforcements ]= number. Else less than or equal: #IF_REINFORCEMENT [team] [G|L] [number] True if a random number isless than the given number, which is between 0 and 100: #IF_RANDOM_CHANCE [number] True if the given condition above is false #ENDIF - closes the: #ELSE Play the given movie number: #IF #PLAY_MOVIE [num] Change the relations between team and with to the given rel state. If rel is Allied, then the teams merge: #CHANGE_RELATIONS [team] [with] [rel] Set the event number: #DO_EVENT [num] Move the initiative by amount from the fromteam to the toteam: #SHIFT_INITIATIVE [fromteam] [toteam] [amount] Clear number event: #RESET_EVENT [number] End the campaign with the given type: #END_GAME [type] Update the last major event to now: #RESET_BORDOM_TIMEOUT No longer used: #CHANGE_PRIORITIES Supply level for team is set to at least s, fuel is set to at least f and replacements set to at least r: #SET_MINIMUM_SUPPLIES [team] [s] [f] [r] For primary objective camp_id, set the teams ground and air priority to the number. This also sets the primary objective flag scripted_priority: #SET_PAK_PRIORITY [team] [camp_id] [number]