Trigger File

GENERALITIES

The trigger file also know as campaign.tri, is a file which is used to trigger changes in teams behaviours in Campaigns as well as introducting some Story Telling features.

GENERAL STRUCTURE

Trigger file structure is as bellow.


Initialization


In game Events


End game Events



Nota : Comments start with /



#ENDINIT

End of initialisation section

#IF #ELSE #ENDIF

Trigger file uses the classical IF ELSE ENDIF conditional structure.

#IF Condition

Consequential actions

#ELSE

Consequential actions

#ENDIF

#ENDSCRIPT

End of the trigger file - everything else is ignored.

TRIGGER CONDITIONS

---

#IF_EVENT_PLAYED [event#] & #IF_NOT_EVENT_PLAYED [event#]

#IF_EVENT_PLAYED [event#] will check if the given event has already be triggered (set as true) via #SET_EVENT [event#].

#IF_NOT_EVENT_PLAYED [event#] will check if the given event has not be triggered or reset as false via #RESET_EVENT [event#].

Appart for end game events, it will be the first condition to be used to avoid "looping".

Ex : #IF_NOT_EVENT_PLAYED 3
#IF_CONTROLLED 6 OR 3141 3036
#PLAY_MOVIE 102
#DO_EVENT 3
#ENDIF
#ENDIF

Ex : #IF_EVENT_PLAYED 2
#IF_CONTROLLED 2 AND 404 260
#PLAY_MOVIE 106
#RESET_EVENT 2
#ENDIF
#ENDIF

#IF_CONTROLLED [team#] [operator$] {[campID#]}

Will check if the [team#] controls some or all the objectives in the {[campID#]} list using the [operator$] AND (all objectives) or OR (only one objective).

Ex : #IF_NOT_EVENT_PLAYED 3
#IF_CONTROLLED 6 OR 3141 3036 // IF DPRK controls Sunan Depot OR Cheonan Com Control
#PLAY_MOVIE 102
#DO_EVENT 3
#ENDIF
#ENDIF

Ex : #IF_EVENT_PLAYED 2
#IF_CONTROLLED 2 AND 404 260 // IF ROK contols Wonsan AND P'Yongyang City
#PLAY_MOVIE 106
#RESET_EVENT 2
#ENDIF
#ENDIF

#IF_NOT_CONTROLLED [team#] [operator$] {[campID#]}

Will check if the [team#] do not controls some or all the objectives in the {[campID#]} list using the [operator$] AND (all objectives) or OR (only one objective).

Ex : #IF_NOT_EVENT_PLAYED 3
#IF_NOT_CONTROLLED 6 OR 3141 3036 // IF DPRK does not control Sunan Depot OR Cheonan Com Control (Not controlling at least one of the list)
#PLAY_MOVIE 102
#DO_EVENT 3
#ENDIF
#ENDIF

Ex : #IF_EVENT_PLAYED 2
#IF_NOT_CONTROLLED 2 AND 404 260 // IF ROK does not contol Wonsan AND P'Yongyang City (Not controlling all of the list)
#PLAY_MOVIE 106
#RESET_EVENT 2
#ENDIF
#ENDIF

Source : https://forum.falcon-bms.com/post/369213 by @MaxWaldorf

#IF_CAMPAIGN_DAY [comparator$] [day#]

Will check the Campaign Duration compared to an number of days [day#] using the [comparator$] > (more) or < (less).

Ex : #IF_CAMPAIGN_DAY > 5 // If number of Campaign days is higher than 5
#PLAY_MOVIE 115
#DO_EVENT 16
#END_GAME 16
#DO_MONOLOG Timeout -> END GAME
#ENDIF

EVENTS

Allow to trigger and "remember" the major events which are happening in the Campaign.

Event is a boolean with default "status" at False

Actual Events status can be accessed in Mission Commander / Events

#TOTAL_EVENTS [22]

Total events number available in Falcon 4.0 Code = 22

#SET_EVENT [event#]

Set corresponding event as True

#DO_EVENT [event#]

Set corresponding event as True. Same as #SET_EVENT

#RESET_EVENT [event#]

Set corresponding event as False

TEAMS BEHAVIORS

#SET_PAK_PRIORITY [team#] [pakID#] [priority#]

Set the [priority#] level (0 to 100) for a [team#] military activity on an [pakID#] area.

The HQ/Artificial Inteligence will use these priorities to attack/defend the corresponding area for both air and ground units.

[pakID#] is the ID of the parent city [campID#] of a given area.

Ex : #SET_PAK_PRIORITY 2 404 100 : Set maximum priority (100) for ROK (Team 2) on Wonsan City Area (All objectives with Wonsan City [Camp ID 404] as parent)

List of all PAKs for KTO, prepared for setting priorities for ROK (Team 2)

Shit Initiative Points from one team [team#] to the other team [team#] by a certain amount [initiative_shift#]

Ex : #SHIFT_INITIATIVE 6 2 30 // Move 30 Initiative Points from DPRK (Team 6) to ROK (Team 2)


More info :

"Falcon BMS uses initiative to model the posture of a given team during a campaign."

Initiative consist of 100 points shared between the 2 teams

Depending of the initiative points owned, the team posture is the following :

The Posture is set at a fixed time every hour for a certains duration by the Campaign Engine (8 to 12 hours). It will not change before the end, regardless of the Initiative points.

Once the duration ends, the posture can go through a Consolidation phase before a new Offensive/Defensive Posture is calculated. This occur especially if Initiative points are in the 45 - 55 area.

Initiative points are automatically shifting from team to team by Winning ground victories, Capturing of cities and towns, Finishing Air mission (flown by human), but can be manually set by this function.

Source : https://wiki.falcon-bms.com/bms-campaign/initiative

TEAMS RELATIONS

#CHANGE_RELATIONS [team#] [team#] [relation#]

Set diplomatic relation [relation#] between 2 teams [team#].

See Glossary for detailed values of [team#] & [relation#]/

EX : #CHANGE_RELATIONS 5 6 1 // Set China (Team 5) and DPRK (Team 6) as Allied (Relation 1)

STORY TELLING

#PLAY_MOVIE [movie#]

Play the desired movie.

List of KTO Movies :

[movie#] value Movie Name** Index #**** Description****

100 E1A 1160 The DPRK pushes into Seoul

101 E2B 1161 Seoul captured by the DPRK

102 E2A 1162 The Allies push into Pyongyang

103 E2B 1163 Pyongyang captured by the Allies

104 E3 1164 DPRK pushed back to the DMZ

105 E4 1165 Allies pushed back to the DMZ

106 E5 1166 Allies start a major offensive

107 E6 1167 Allies forced onto the defensive

108 E8 1168 China declares war on South Korea

109 E9 1169 Russia declares war on South Korea


KTO Double Dragon Campaign Specific Movies

[movie#] value Movie Name** Index #**** Description***

120 E10 1180 China pulls out of Korea (China Loose)

121 E11 1181 The DPRK surrenders to China

122 E12 1182 A new demarcation line will be set

123 E13 1183 A unified Korea will be formed

124   E14   1184   DPRK Win against China

125 E15 1185 A unified Korea won't be formed

126 E16 1186 DPRK joins the Combined Forces

Nota 1 : I don't know (yet) if additional movies could be triggered. (ie 127 value playing movie E17.AVI)
Nota 2 : Index # 1187 to 1199 are listed and free in strings.txt

KTO Campaigns Intros

Campaign Movie Name** Index #**** Description***

Tiger Spirit OT 1170 save0 intro movie -> Do not use in trigger files!

Rolling Fire OR 1171 save1 intro movie -> Do not use in trigger files!

Iron Fortress OF 1172 save2 intro movie -> Do not use in trigger files!

Double Dragon OD 1177 save3 intro movie -> Do not use in trigger files!

Bear Trap OB 1178 save4 intro movie -> Do not use in trigger files!

Mantis at Dawn OM 1179 save5 intro movie -> Do not use in trigger files!


Balkans Campaigns Intros

Campaign Movie Name***

Balance of Power BP

Under Siege US

Powderkeg PK


** .AVI files in C:\Falcon BMS 4.37\Data\Movies
*** .AVI files in C:\Falcon BMS 4.37\Data\Add-On Balkans\Movies
**** as in String.txt file (source : https://forum.falcon-bms.com/topic/21626/play_movie-event)

Nota 2 : I don't know where the link between campaign and intro movie is situated --> Partiality in String.txt file

#DO_MONOLOG [text$]

!!! Don’t know what it actually do ans if it really have an impact !!!

!!! Actual caption in BMS news comes from Strings.txt !!!

Ex : #DO_MONOLOG Combined forces go on offensive

GAME ENDS

#END_GAME [end#]

4 ends are possible, each has it number (and related movie in KTO). This impact the logbook for campaigns Win / Draw / Lose

End [end#] Corresponding Actual Movie Index # Description
values Movie Number * Name ** **** ****

Defeat 14 113 XL.avi 1173 The U.S. pulls out of Korea

Stalemate 15 114 XS.avi 1174 A peace settlement is reached

Timeout 16 115 XT.avi 1775 A peace settlement is reached

Victory 17 116 XW.avi 1776 The DPRK surrenders to the Allies

   * In KTO Campaign, at least
** In KTO C:\Falcon BMS 4.37\Data\Movies
**** as in String.txt file (source : https://forum.falcon-bms.com/topic/21626/play_movie-event)

Is it necessary to use the DO_EVENT [end#] in addition ?

Ex : #END_GAME 17