Author Topic: Remove Or Disable Weather  (Read 13714 times)

Offline Hans

  • Newbie
  • *
  • Posts: 1
Remove Or Disable Weather
« Reply #25 on: August 24, 2010, 02:11:58 PM »
Quote
Since someone else also asked about this, I wrote up a mod that disables disasters.
http://arklon.outpost2.net/other/DisasterlessMod.zip Extract to your Outpost2 folder.
Also, you may need http://arklon.outpost2.net/other/op2ext.dll (a fixed version of the DLL included with our version of OP2); that also goes in your OP2 folder.
Yup, that'd be me!

The mod works pretty well, theres only a few things that'll surprise you.

1. Save often, some maps seem to crash alot if you start up holding shift to turn everything off.

2. If you play a map where the blight is present at map start, it will continue to spread and destroy objects.  You will be warned in other maps that the blight is approaching, but it never shows up.

Offline Arklon

  • Administrator
  • Hero Member
  • *****
  • Posts: 1269
Remove Or Disable Weather
« Reply #26 on: September 19, 2010, 07:20:42 PM »
Quote
1. Save often, some maps seem to crash alot if you start up holding shift to turn everything off.

2. If you play a map where the blight is present at map start, it will continue to spread and destroy objects.  You will be warned in other maps that the blight is approaching, but it never shows up.
I didn't test it too terribly extensively. Not quite sure why there'd be crashes, though, unless I messed up and the stack gets corrupted when a certain kind of disaster is created. As for the Blight, they must be somehow adding the Blight to the mission via a means other than GameMap::SetVirusUL (it IS possible to put it directly in the .map file, or custom missions could directly call the internal Blight creation function via a function pointer if the creator really wanted to)... or you load a saved game with the Blight on it. I could change it to insert hooks deeper within OP2 (instead of gutting the exposed exported APIs which are just wrappers for the internal stuff) if need be.
I also noticed that I forgot something to make it work properly when trying to load it as an ini mod (forgot that the InitMod() function is supposed to take an argument). I'll fix that soonish.
As for people taking a look at the source, you'll notice that HookHelper library I wrote up. It's nothing complex like Detours or other API hooking libraries, though, really it's just to make it so hooks and patches can be made with a single line of code for each patch, and then undo all those changes with a single additional line of code. The version of HookHelper in the project folder on the SVN is also a WIP version with some errors in it that make some of the features (other than the ones used specifically by the mod, those are fine) not work. When I get around to updating the mod I'll throw in my latest and more or less complete version of it.
« Last Edit: September 19, 2010, 07:27:36 PM by Arklon »

Offline Leviathan

  • Hero Member
  • *****
  • Posts: 4055
Re: Remove Or Disable Weather
« Reply #27 on: November 02, 2015, 06:36:42 PM »
Nice work :)

Did you make any more progress on the code Arklon?

Offline Sirbomber

  • Hero Member
  • *****
  • Posts: 3238
Re: Remove Or Disable Weather
« Reply #28 on: November 07, 2015, 01:47:02 PM »
Nice work :)
Lev, you've been here 12 years, not 12 minutes.  You should know better than to bump every thread that hasn't been updated in 5 years just to post some asinine comment.
« Last Edit: November 07, 2015, 11:44:50 PM by Sirbomber »
"As usual, colonist opinion is split between those who think the plague is a good idea, and those who are dying from it." - Outpost Evening Star

Outpost 2 Coding 101 Tutorials