Recent Posts

Pages: 1 ... 8 9 [10]
91
Projects / Re: OP2 Game Flow Redesign
« Last post by Hooman on April 19, 2019, 01:12:46 AM »
I believe you can use a building enumerator to find the unit record for the mine. I'm not sure if you want the mine building, or the mining beacon. Try either of:
Code: [Select]
PlayerBuildingEnum(Player6, mapMiningBeacon); // Gaia

PlayerBuildingEnum(playerNum, mapCommonOreMine);
PlayerBuildingEnum(playerNum, mapRareOreMine);

From there, you could use a bit of HFL style memory hacking to access the value at the offset you want.
92
Projects / Re: OP2 Scenario Project for C#
« Last post by TechCor on April 19, 2019, 01:11:28 AM »
Again, I don't know what happened. It's possible I coincidentally fixed some code the same time I swapped it out for C# Random. Tethys rand appears to be working, so I will leave it as is. It's easy enough to change the wrapper function to C# random later if needed.

---

I have need of accessing a lab's data for labor reassignment. Unfortunately, it appears that the lab variable addresses overlap the "bayItem" array, which are represented by different sizes. It's not simply a variable naming issue.

I assume then, that I need to put a union in here to make this work. Rather than hack a union in at that spot, what address marks the end of the base class and the beginning of each sub type?

Or am I approaching this entirely wrong?

--It just occurred to me while posting in another thread that instead of a union, I could create a separate struct and offset the address similar to how BeaconData is done. I will give this a shot.
93
Outpost 2 Add On Missions / Re: Ohana (progress: test release done!)
« Last post by Crow! on April 18, 2019, 10:48:25 PM »
I tried testing for that during mission initialization, but it didn't work.  I could just schedule a check a check at the earliest triggerable tick, but it soulds like there's going to be some dev work to check for this directly, so I may as well just plan to use that at this point.
94
Outpost 2 Add On Missions / Re: Ohana (progress: test release done!)
« Last post by Sirbomber on April 18, 2019, 08:40:33 PM »
It is my hope that I'll find a way to let the .dll itself identify whether the mod is active or not, so that it doesn't need to have two versions.
You removed a few techs, right?  Add them back as free technologies with no description or prerequisites.  If the players already have those techs at tick 0, it's Phase Shift (or someone really went out of their way to mess with this one specific map); otherwise assume vanilla OP2.
95
Projects / Re: OP2 Game Flow Redesign
« Last post by Vagabond on April 18, 2019, 08:06:20 PM »
Crow!,

We are discussing adding the ability to query which mods are active on GitHub. I would like to start coding it this weekend so you have it available. Feel free to comment if you have any suggestions. The query must be c compliant sense we try to honor the C ABI for cross-dll communication.

https://github.com/OutpostUniverse/op2ext/issues/69

You could probably bring up a dialog telling the player they need to load the phase shift module and then exit the scenario instead of just disabling if you want.

I'm no help on the beacons, but that sounds like something that would belong in HFL if it existed. We added 3 functions to OP2Helper to improve posting messages if you are interested in using them. They have been pushed into the current master OP2MisionSDK repo.

-Brett
96
Outpost 2 Add On Missions / Re: Ohana (progress: test release done!)
« Last post by Crow! on April 18, 2019, 07:38:49 PM »
Attached to this post is my first release of the Ohana map.  I won't be available to play it this weekend, since I'm travelling to visit family for Easter.

In the ZIP are two versions of the mission for the map: mf2_oha.dll is the one for Phase Shift, while mf2_ohv.dll is for the vanilla release of Outpost 2.  It is my hope that I'll find a way to let the .dll itself identify whether the mod is active or not, so that it doesn't need to have two versions.  I should probably reduce the number of mining beacons for the vanilla game, too, but I can worry about that later.

I'm putting this down as a "test release" and labeling the ZIP as v0.1 for a reason - let me know any glitches you find, or any design problems you think could be improved.  I'm particularly interested to hear any problems caused by the slight asymmetry of the map (most of which are directly or indirectly caused by north side cliffs being thinner than south side ones.)
97
Projects / Re: OP2 Game Flow Redesign
« Last post by Crow! on April 18, 2019, 05:03:41 PM »
In Phase Shift maps, I want to have the map alert the player when a mining beacon is running low on resources.  I see the ollydbg notes list the memory location of how many loads a beacon has put out so far, relative to the start of that beacon's unit data.  How can I identify the start address of each beacon's unit data?

I'm also looking to have the multiplayer Phase Shift map(s) self identify whether the Phase Shift mod is active, so it can turn on the Phase Shift specific triggers only when Phase Shift is on.  Does anyone know a way to achieve this?

In other news, I've cut back the scorpion's strength slightly by downgrading its armor class from light to none - this should be especially noticeable with Acid Cloud and ESG attacks, but less so for, say, the Thor.
98
Outpost 2 Add On Missions / Re: Ohana (progress: about 70% done)
« Last post by Hooman on April 17, 2019, 11:49:14 PM »
That looks like it's shaping up nicely. :)
99
Outpost 2 Add On Missions / Re: Ohana (progress: about 70% done)
« Last post by Crow! on April 17, 2019, 10:57:46 PM »
Here's an image of the most current progress.  I appear to have accidentally built the SE base outward about 4 tiles too far, and it's been causing a few problems getting the map elements to line up.  I'll probably have to just move the whole thing back, which will also require moving the units as well.
100
Projects / Re: OP2 Scenario Project for C#
« Last post by leeor_net on April 17, 2019, 09:38:41 PM »
Gonna go out on a limb and assume the core code is just using a really shit PRNG. Haven't looked too far into it but I'd suggest using literally any other PRNG than whatever OP2's engine provides (unless for some reason mission DLL's must use that function as Hooman has suggested).
Pages: 1 ... 8 9 [10]