Campaign trigger file help

Campaign editing

Moderators: Lone Wolf, Snake Man

Post Reply
Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Campaign trigger file help

Post by Snake Man » 2002-06-09 14:21:00

Here, post anything you know about Campaign Trigger files.

Thanks.

PMC TFW
Snake Man
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

codec
LeadPursuit
Posts: 103
Joined: 2001-03-07 23:01:01
Location: UK

Re: Campaign trigger file help

Post by codec » 2002-06-09 18:27:00

quote:Originally posted by Snake Man:
Here, post anything you know about Campaign Trigger files.
They're text format, and relate to the events view in tacedit. How helpful is that!
:D

Julian.
F4ut

Widowmaker
Lt. General
Posts: 1002
Joined: 2000-10-30 23:01:01
Gaming Interests: Falcon 4.0
Editing Interests: Terrains
Location: The Netherlands

Re: Campaign trigger file help

Post by Widowmaker » 2002-06-09 19:43:00

hehe
that should give Snakeman a lead.. :)


Widmak
Widmak

Washout
LeadPursuit
Posts: 134
Joined: 2001-04-19 22:01:01
Location: Wallingford,Oxon,UK
Contact:

Re: Campaign trigger file help

Post by Washout » 2002-06-09 20:44:00

Hi Snakeman

There should be a short bit in the tutorial I wrote - not much detail in there I know but it might help.

Later

Chris

PS. If anyone comes up with a full syntax/command listing that would be really great.
Chris "Washout" Carter
F4 Balkans Terrain Team
CO: The Vulture Squadron

FAngs32
Recruit
Posts: 16
Joined: 2002-03-08 23:01:01

Re: Campaign trigger file help

Post by FAngs32 » 2002-06-09 20:49:00

>>PS. If anyone comes up with a full >>syntax/command listing that would be really >>great.[/B][/QUOTE]

I'll second that motion :-)

FAngs32

codec
LeadPursuit
Posts: 103
Joined: 2001-03-07 23:01:01
Location: UK

Re: Campaign trigger file help

Post by codec » 2002-06-10 10:23:00

Full syntax written up, on its way. Hopefully snakeman will post it in the tutorials section.

Julian.
F4ut

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: Campaign trigger file help

Post by Snake Man » 2002-06-17 12:17:00

Trigger commands syntax finally posted to the campaign tutorial.

PMC TFW
Snake Man
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: Campaign trigger file help

Post by Snake Man » 2002-07-30 11:14:00

I wanted to play around with campaign start so this is what I did.

Started Tacedit, loaded save0.cam my historical ODS 1991 campaign. Selected campaign -> Dates, edited as following:
Cur Time 0:20:30:00.0000, Star Time 0:20:30:00.0000
Teams -> Relations, changed team 2 and team 6 to Hostile status.

Then I went to the campaign\DesStorm directory and edited save0.tri file to the following:

//
// OPERATION DESERT STORM historical 1991 campaign
//

//
// initialize
//
#TOTAL_EVENTS 2
#SET_TEMPO 150
#ENDINIT


// event 1?
#IF_EVENT_PLAYED 1
#ELSE
#IF_CAMPAIGN_DAY G 1
#SET_TEMPO 255
#CHANGE_RELATIONS 2 6 5
#PLAY_MOVIE 108
#DO_EVENT 1
#ENDIF
#ENDIF


//
// US/Coalition controls KUWAIT
//
#IF_CONTROLLED 2 O 3083
#PLAY_MOVIE 116
#DO_EVENT 2
#END_GAME 2
#ENDIF
// End
#ENDSCRIPT


Now the results are that campaign will start at 2030hrs, BARCAPS, Tankers, Airlifts and AWACS get scheduled but no offensive action. We build good backbone for war, then at midnight when clock strucks 0000hrs the war starts and campaign engine starts to schedule offensive strike etc flights. The currenly airborne flights will engage the enemies.

Sounds cool so far... Dunno how it really works eventually, but anyways thought I post this tip.

PMC TFW
Snake Man
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-04-13 19:07:38

I was wondering, can we setup a trigger file condition that one side has lost too much objectives/units either destroyed or captured, basically I'm looking for victory condition where you bomb the objectives/units so much that some levels (force levels?) drop too much on the enemy and you win.

Hmm maybe I cannot describe good enough of what I want here, anyone getting my idea?

Arent there similar thing in korea campaign, if DPRK gets whipped too bad China enters war... so how do you specify the whipping then? is it just enough of days, some tempo or offensive/defensive posture, what? :)
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-13 19:48:49

Snake Man wrote:I was wondering, can we setup a trigger file condition that one side has lost too much objectives/units either destroyed or captured, basically I'm looking for victory condition where you bomb the objectives/units so much that some levels (force levels?) drop too much on the enemy and you win.

Hmm maybe I cannot describe good enough of what I want here, anyone getting my idea?

Arent there similar thing in korea campaign, if DPRK gets whipped too bad China enters war... so how do you specify the whipping then? is it just enough of days, some tempo or offensive/defensive posture, what? :)
Yes, you can set up conditions based on supply level dropping for a team (which would be caused by large scale destruction of factories, depots, refineries, etc.) which would end the game. Here is an example section of trigger file code extracted from the SP4.2 Korean campaign and modified for the end of game condition you wanted to achieve:

Code: Select all

// 
// Event #12 (note; event #12 is a bogus number; must be changed for entry into REAL campaign trigger file)
// War ends due to large scale destruction of Team #6 infrastructure
// This code requires two teams: Team 2 and Team 6, specifically.
//
#IF_EVENT_PLAYED 12
  #ELSE
    #IF_SUPPLY 6 L 20 // if supply level for Team 6 drops to less than 20 
      #DO_EVENT 12   // do event 12 if conditions in line above are met
      #END_GAME 12  // end game
    #ELSE
      #IF_FORCE_RATIO A 6 2 L 3  // if force ratio between Team #6 versus Team #2 drops less than 3:1 (guess on 3:1 part here)
      #DO_EVENT 12  // do event 12 if conditions in line above are met
      #END_GAME 12  //  end game
      #ENDIF
    #ENDIF
#ENDIF
Note: This is very quick, dirty code and I am sure that other conditions could be added to enhance playability, i.e., set this up for red side AND blue side, etc.

EDIT: Had a couple of line reversed; corrected now.
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Post by Snake Man » 2007-04-14 12:40:27

I thought to share this trigger file I created today for Afghanistan fictional mayhem campaign as a test.

Code: Select all

//
// Afghanistan Theater fictional campaign #1
//

//
// initialize
//
#TOTAL_EVENTS 2
#ENDINIT

//	Teams
//	1 US == U.S. (no ground objectives).
//	2 ROK == Pakistan. (allied).
//	3 Japan == India. (neutral).
//	4 CIS == Tajikistan, Turkmenistan, kyrgyzstan and Uzbekistan. (allied).
//	5 PRC == China. (hostile).
//	6 DPRK == Afghanistan (at war!)
//	7 Gorn == Iran. (hostile).

//#CHANGE_RELATIONS <team> <with> <rel> - change the relations between team and with to the given rel state. If rel is Allied, then the teams merge.
// 
// <rel> according to tacedit teams page relations
// 0 = none. Used or not? :)
// 1 = Allied
// 2 = Friendly
// 3 = Neutral
// 4 = Hostile
// 5 = At War

// snake: everybody allies with Afghanistan.
#CHANGE_RELATIONS 3 6 1
#CHANGE_RELATIONS 4 6 1
#CHANGE_RELATIONS 5 6 1
#CHANGE_RELATIONS 7 6 1
#SET_TEMPO 255
#DO_EVENT 1
//#ENDIF
#ENDIF

// 
// US/Coalition controls KABUL, KANDAHAR and MAZAR-E SHARIF
//
#IF_CONTROLLED 2 A 441 846 154
#PLAY_MOVIE 116
#DO_EVENT 2
#END_GAME 2
#ENDIF

// End
#ENDSCRIPT
As you can see, all the teams joins up with team 6 which is our enemy, that happens right at the start of the campaign, actually I dont know what controls that, perhaps just the fact that its the first event and there is no conditions so its run right away.

I tested that on AF and it runs, however AF gives debug message on the bfopslog about missing endif line, hmm perhaps its that one I commented out for some reason. Anyways it runs, good enough, for now :)
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

User avatar
Sherlock
Lt. General
Posts: 1167
Joined: 2006-05-24 22:01:01
Gaming Interests: Falcon 4.0
Editing Interests: All, I (try) to edit everything.
Location: Arizona, USA

Post by Sherlock » 2007-04-14 16:30:34

Two things:
1. The reason it is happening at the very beginning is because you don't have any conditional statement for the CHANGE_RELATIONS section. So it will execute that everytime without fail (no conditions to check against).

2. The #ENDIF at the end of the CHANGE_RELATIONS section is the reason you are getting a debug message in the bfopslog. It has no corresponding #IF ahead (above) it.
Sherlock
Victurous te Saluto

Snake Man
Commander-In-Chief
Posts: 9338
Joined: 2000-07-31 22:01:01
Gaming Interests: ArmA, ArmA 2, Falcon 4.0 and OFP.
Editing Interests: All, I (try) to edit everything.
Location: PMC
Contact:

Re: Campaign trigger file help

Post by Snake Man » 2009-08-18 12:13:10

I have updated the PMC Editing Wiki: Triggers page with few more items I found in my text file archives.

It is unsure if these work on OF and RV, they should be at least working in AF since these are the SuperPAK series results.
PMC Tactical Forum New User Registration please read new info here.

PMC since 1984

Editing knowledge, visit PMC Editing Wiki
The leading, most detailed and comprehensive modification made for the Vietnam War - Vietnam: The Experience homepage
View our videos in PMC Youtube channel

PMC Tactical forum Advanced Search is power.

"ALPHA BLACK TO PAPA BEAR. ALL RUSSIANS ARE TOAST. OVER."

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests