Recent Posts

Pages: [1] 2 3 ... 10
1
Outpost 2 Programming & Development / Re: Campaign - stopping the blight?
« Last post by Hooman on February 27, 2026, 12:11:16 PM »
Sounds like the built in cheats solved your problem.

At any rate, in case you're curious about `SetVirtusUL` (from Outpost2.exe):

Code: [Select]
00476EA0 .text Export ?SetVirusUL@GameMap@@SIXULOCATION@@H@Z

I should mention that when you press (Ctrl + N) it opens the names window for the current module (EXE or DLL file). Hence when the Outpost2.exe module is active, you should expect to see the title "Names in Outpost2". If instead you've opened a DLL file, such as "e01.dll", then the CPU disassembly window will default to the DLL module, hence pressing (Ctrl + N) will open a list of names from the DLL module, and will have a title such as "Names in e01".

If you're not seeing the name "SetVirusUL", it might be because Outpost2.exe isn't the current module.

If you open the Memory Map window (Alt + M), it will show all loaded modules. If you loaded a level DLL, it will reference the Outpost2 EXE file, so both modules will be loaded. If you were to select the ".text" section of Outpost2.exe you can "View in Disassembler" (Enter), which will change the module displayed in the CPU window. Pressing (Ctrl + N) will then show names in the newly selected EXE module.

You can also change the currently displayed module through regular code navigation. For instance, you can select a call instruction and press (Enter) to "follow" the code to the call destination. If the called code is in a different module, it will change the currently active module, and so affect what names will be shown by the names window. This is often the most likely reason for the current module to change, and perhaps show unexpected entries in the names window. Such inter-module code navigation can also be triggered by hardware breakpoints.



As for the return instruction, the `SetVirusUL` function has more parameters that need to be popped off the stack, so it would be `RET 8` rather than `RET 4`.

If you follow the address for `SetVirusUL` (00476EA0) in the CPU disassembly window, you'll see the function ends with `RETN 8`. Hence, to gut the function and make it do nothing, that's what you'd need to replace the first instruction with.
2
Outpost 2 Programming & Development / Re: Campaign event triggers
« Last post by Hooman 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.
3
Outpost 2 Programming & Development / Re: Mine Yield Formula
« Last post by Hooman on February 27, 2026, 08:43:56 AM »
This encouraged me to turn on an old computer and copy some old files, such as the OllyDbg comments file and take a look. The relevant code is indeed documented.



Code: [Select]
0044B1C0 MOV EAX,DWORD PTR SS:[ESP+8]             ;  Function: BeaconTypes.CalculateMineYield(int barYield, int variant, int numTruckLoadsSoFar)

The code in that function matches the Yield calculation you gave based on the number of truck loads. There were only inconsequential differences. (The middle condition used `>=` instead of `>`, and it swapped the order for (minYield - peakYield) which was added instead of subtracted).



Code: [Select]
0044AF10 PUSH EBX                                 ;  Function: Unit:Mine.CalculateMineYield()

This function has the tech check to increase yield to 120%. The 120% value is a hardcoded constant, based on a flag that is checked for the increase.

It kind of looks like the same flag is checked for both common and rare ore, though there are first checks if the mine is a common or rare ore mine. I wonder if that might indicate a bug in the game where a single tech increases both, or if it's a dual purpose flag that is context dependent. I kind of suspect a bug now that I'm looking at it.

There is also a detail that if the `unitType` is `mapRareOreMine` then the `yield` is cut in half.



I haven't seen evident for hardcoded maximum yields based on what I just looked at. I kind of thought the yields were loaded directly from `MINES.TXT` based the variant and yield values, rather than using percentages. I remember there was data for 3 different variants of each yield level.

4
Outpost 2 Programming & Development / Campaign event triggers
« Last post by toeonly 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?
5
Forum Games / Re: The Bumpy Thread
« Last post by Arklon on February 20, 2026, 04:31:27 PM »
I... I... I don't know what to bump anymore.
6
Forum Games / Re: The Bumpy Thread
« Last post by tigerstorms on February 03, 2026, 09:20:27 PM »
Return of the bump for the day after groundhog day knowing we all survived it.
7
Outpost 2 Programming & Development / Re: Campaign - stopping the blight?
« Last post by Sirbomber on January 17, 2026, 08:24:53 AM »
That clicking thing was just a result of the game's original refresh rate, since clicking would force a screen redraw it "looked" like the progress bar filled up faster.
There's a fourth cheat that was never actually discovered but we brute-forced a collision and the nonsensical phrase
Quote
Dan's truck could crate more stormy.
will increase weapon damage.
I'd be careful using anything other than the ore refill cheat, you can use them all multiple times to stack the effects but you can easily put yourself in an unwinnable situation with the other cheats (too many people to feed, rate of fire/damage overflow).
8
Outpost 2 Programming & Development / Re: Campaign - stopping the blight?
« Last post by Darien on January 16, 2026, 10:44:47 PM »
Nice, thank you!

I didn't look to see if they had any in-game prompt cheat codes. I don't know why I didn't think of that. Now that you put the idea forward, I went ahead and did a search for such codes. For anyone else that's looking for help like this, here's what I found so far:
Cheat List

    Fill all smelters and storages with max. metals: Dan's dog could make more ore.
    Population increases by a certain % : Dan's car could hold more people.
    Increase rate of fire of all ranged weapons: Dan's bike could backfire more often

Note: To enter cheat, you must press the [Enter] key. Cheats only work when typed correctly, which will trigger the message: Woof Woof!

To Bolster factory production, left-click and right-click on it.

That last one seems odd and more like a glitch than a cheat code. I'll try it out though. Thanks again for the pointer!
9
Outpost 2 Programming & Development / Re: Campaign - stopping the blight?
« Last post by Sirbomber on January 15, 2026, 09:22:09 AM »
If you're going to cheat anyways, save yourself some time REing the game and just use the built-in cheats.  Press enter and type in
Quote
Dan's dog could make more ore.
then press enter again for a full ore refill.
10
Outpost 2 Programming & Development / Campaign - stopping the blight?
« Last post by Darien on January 13, 2026, 08:11:11 AM »
Hi all,

I'm new this game. I typically enjoy RTS games and TBS games (big fan of Total Annihilation, and the Dune game for PC and Sega Genesis that played more like Command and Conquer than the equally good but very different Dune game for Sega CD which was more RPGish, and Heroes of Might and Magic on the TBS side).

TL:DR - what is the memory address in the .exe for the Blight, so I can stop it the same way I did to stop the lava (using info in another thread from this site - details below)?


Long version:

After having the Lava wipe me out a few times in the first few campaign missions, I said "There has to be a way to stop this." and found this site. Specifically, this thread is where I started: https://forum.outpost2.net/index.php?topic=4535.0

It was very helpful, and from reading other threads I see that Hooman is definitely one of the SMEs around here. I installed OllyDbg, and after backing up the .exe and MUCH fumbling around with trying to get it to find the memory address/script line that Hooman posted for lava, I found it, followed his directions, and it worked. There was much rejoicing!

I'm now at the campaign where you have to have your first Rare Ore miner, and create the RPG Lynx. I was doing pretty well. I had enough microwave lynx and turrets that the random attacks from Eden were manageable (once I learned how to use the Garage to fix my vehicles), and was to where I just had to finish building enough vehicles - that required Rare Ore, which was slowing me down - to finish the mission. My total game time was a few hours in, game speed was at 6 or 7.

Then the blight rolled in. Flattened me. Now, I can see the other solutions to this: "set the game speed slower."  "build more resource mining facilities"  "rely on turrets more so you're not burning resources on repairing vehicles as much." all valid. An for various reasons, especially the setting the game speed slower, I'm politely rejecting those paths at this time.

I found another thread that talked about "SetVirusUL", but I couldn't find that in the .exe, maybe that's in a .dll someplace? Though it seemed the .dlls are for specific maps, and not for the core game engine / campaign.

So if anyone could let me know the Blight memory address, and if I would use the same Ret4 trick to lock it out, I would appreciate it. Thank you!

Pages: [1] 2 3 ... 10