Author Topic: Campaign event triggers  (Read 174 times)

Offline toeonly

  • Newbie
  • *
  • Posts: 1
Campaign event triggers
« on: February 23, 2026, 06:25:23 PM »
So I know that doing certain research or building certain structures trigger story line events like lava and the blight. I know when I was 13 I figured out some things that I wanted to keep for the end of the mission. Is there a list somewhere of the triggers for the 24 story line missions? Is there a way to go into the files to find them if it is not complied here?

Offline Hooman

  • Administrator
  • Hero Member
  • *****
  • Posts: 4958
Re: Campaign event triggers
« Reply #1 on: February 27, 2026, 09:11:31 AM »
I don't believe there is a compiled list of such data, though you could potentially figure it out yourself.



A starting point might be to check the available triggers from the Mission SDK hosted on GitHub. The relevant file is:
https://github.com/OutpostUniverse/Outpost2DLL/blob/d0565ddc06844f4aa7d9b2cd3d60182df541149e/game/Trigger.h

Code: C++ [Select]

// Trigger creation functions
// **************************

// Victory/Failure condition triggers
OP2 Trigger __fastcall CreateVictoryCondition(int bEnabled, int bOneShot /*not used, set to 0*/, Trigger& victoryTrigger, const char* missionObjective);
OP2 Trigger __fastcall CreateFailureCondition(int bEnabled, int bOneShot /*not used, set to 0*/, Trigger& failureTrigger, const char* failureCondition /*not used, set to ""*/);

// Typical Victory Triggers
OP2 Trigger __fastcall CreateOnePlayerLeftTrigger(int bEnabled, int bOneShot, const char* triggerFunction); // Last One Standing (and later part of Land Rush)
OP2 Trigger __fastcall CreateEvacTrigger(int bEnabled, int bOneShot, int playerNum, const char* triggerFunction); // Spacerace
OP2 Trigger __fastcall CreateMidasTrigger(int bEnabled, int bOneShot, int time, const char* triggerFunction); // Midas
OP2 Trigger __fastcall CreateOperationalTrigger(int bEnabled, int bOneShot, int playerNum, map_id buildingType, int refValue, compare_mode compareType, const char* triggerFunction); // Converting Land Rush to Last One Standing (when CC becomes active). Do not use PlayerAll.
// Research and Resource Count Triggers  [Note: Typically used to set what needs to be done by the end of a campaign mission]
OP2 Trigger __fastcall CreateResearchTrigger(int bEnabled, int bOneShot, int techID, int playerNum, const char* triggerFunction);
OP2 Trigger __fastcall CreateResourceTrigger(int bEnabled, int bOneShot, trig_res resourceType, int refAmount, int playerNum, compare_mode compareType, const char* triggerFunction);
OP2 Trigger __fastcall CreateKitTrigger(int bEnabled, int bOneShot, int playerNum, map_id, int refCount, const char* triggerFunction);
OP2 Trigger __fastcall CreateEscapeTrigger(int bEnabled, int bOneShot, int playerNum, int x, int y, int width, int height, int refValue, map_id unitType, int cargoType, int cargoAmount, const char* triggerFunction);
OP2 Trigger __fastcall CreateCountTrigger(int bEnabled, int bOneShot, int playerNum, map_id unitType, map_id cargoOrWeapon, int refCount, compare_mode compareType, const char* triggerFunction);
// Unit Count Triggers  [Note: See also CreateCountTrigger]
OP2 Trigger __fastcall CreateVehicleCountTrigger(int bEnabled, int bOneShot, int playerNum, int refCount, compare_mode compareType, const char* triggerFunction);
OP2 Trigger __fastcall CreateBuildingCountTrigger(int bEnabled, int bOneShot, int playerNum, int refCount, compare_mode compareType, const char* triggerFunction);
// Attack/Damage Triggers
OP2 Trigger __fastcall CreateAttackedTrigger(int bEnabled, int bOneShot, ScGroup& group, const char* triggerFunction);
OP2 Trigger __fastcall CreateDamagedTrigger(int bEnabled, int bOneShot, ScGroup& group, int damage, const char* triggerFunction);
// Time Triggers
OP2 Trigger __fastcall CreateTimeTrigger(int bEnabled, int bOneShot, int timeMin, int timeMax, const char* triggerFunction);
OP2 Trigger __fastcall CreateTimeTrigger(int bEnabled, int bOneShot, int time, const char* triggerFunction);
// Positional Triggers
OP2 Trigger __fastcall CreatePointTrigger(int bEnabled, int bOneShot, int playerNum, int x, int y, const char* triggerFunction);
OP2 Trigger __fastcall CreateRectTrigger(int bEnabled, int bOneShot, int playerNum, int x, int y, int width, int height, const char* triggerFunction);
// Special Target Trigger/Data
OP2 Trigger __fastcall CreateSpecialTarget(int bEnabled, int bOneShot, Unit& targetUnit /* Lab */, map_id sourceUnitType /* mapScout */, const char* triggerFunction);
OP2 void __fastcall GetSpecialTargetData(Trigger& specialTargetTrigger, Unit& sourceUnit /* Scout */);

// Set Trigger  [Note: Used to collect a number of other triggers into a single trigger output. Can be used for something like any 3 in a set of 5 objectives.]
OP2 Trigger __cdecl CreateSetTrigger(int bEnabled, int bOneShot, int totalTriggers, int neededTriggers, const char* triggerFunction, ...); // +list of triggers




The campaign missions are implemented as DLL files, with a certain naming pattern. `e01.dll` for Eden mission 1, and `p01.dll` for Plymouth mission 1. There are 12 missions for each campaign.

In terms of what missions use which triggers, you could use a disassembler to figure that out. The details of how each trigger will be used may require a fair bit of effort to figure out, though seeing what triggers are used is fairly easy.

A lot of disassembling and reverse engineering was done on the game using OllyDbg:
https://www.ollydbg.de/

OllyDbg defaults to opening EXE files, so you may need to change the file type filter to see the DLL files. After loading a DLL you can check the "Names" window (Ctrl + N) (when the CPU/disassembly window is active). From there you can see names of functions that are imported from `Outpost2.exe`, such as the `Trigger` creation functions. The names will be decorated, which encodes type information as well as the function name. Example:

Code: [Select]
1100927C   .idata     Import             Outpost2.?CreateCountTrigger@@YI?AVTrigger@@HHHW4map_id@@0HW4compare_mode@@PBD@Z
1100923C   .idata     Import             Outpost2.?CreateEscapeTrigger@@YI?AVTrigger@@HHHHHHHHW4map_id@@HHPBD@Z
11009254   .idata     Import             Outpost2.?CreateKitTrigger@@YI?AVTrigger@@HHHW4map_id@@HPBD@Z
11009248   .idata     Import             Outpost2.?CreateSetTrigger@@YA?AVTrigger@@HHHHPBDZZ
11009288   .idata     Import             Outpost2.?CreateTimeTrigger@@YI?AVTrigger@@HHHPBD@Z
1100925C   .idata     Import             Outpost2.?CreateVehicleCountTrigger@@YI?AVTrigger@@HHHHW4compare_mode@@PBD@Z

The triggers are also used to create the victory and failure conditions:
Code: [Select]
1100928C   .idata     Import             Outpost2.?CreateFailureCondition@@YI?AVTrigger@@HHAAV1@PBD@Z
11009258   .idata     Import             Outpost2.?CreateVictoryCondition@@YI?AVTrigger@@HHAAV1@PBD@Z

That information along with some knowledge of the particular mission should allow you to make an educated guess as to what triggers lead to what story events.
« Last Edit: February 27, 2026, 09:32:09 AM by Hooman »