Renegade Projects Network Forums

Full Version: Patching extra functionality into <gamemd.exe>
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Thanks, and sure affiliate Smile

I added you to the list... hm... I should put it somewhere on the mainpage...
Cool site! I like the layout. Kep up the good job! Smile

Wanna affiliate with PPM?
Yo, for the affliates: http://freewebs.com/b1e_ra2 (dutch site)
A nice site, if you want help with your mod, i will help you, i aren't good in making cameo's, vxl's, hva's or shp's, but i can make rules.ini codes Big Grin
Yay! And i might as well ask too, can I affiliate? http://www.ddmods.savagewar.co.uk


Edit: Ill have to wait on trying it, I dont want to remove the new countries.
Yes, what happened to New Countries patch?

EDIT: Just noticed that this is three-addition patch Wink But it seems not possible to mix countries with deaths :mellow:

Oh btw, how about affiliating with my page? http://omega.game-mod.net
As far as I am aware, pd is working on a 'definitive' patch that will provide the current new InfDeaths support combined with improved new countries support. When this is finished, the current patcher program will be replaced by a single 'definitive' patcher program that will update you to the latest new stuff.
pd, I am having problems getting the new InfDeaths to work.

Rules extract:
[General]
AnimToInfantry=BRUTE,BORIS

[Animations]
...
475=CRIVEXP2
...

[NewInfMutations]
1=CRIVEXP2

[PrismWarhead]
InfDeath=11
...

Art extract:
[CRIVEXP2]
MakeInfantry=1
...

The prism tower kills the infantry, but doesn't play the assigned anim, and doesn't spawn new infantry.

Is there something I missed?
OK some news here:

1)
The CellSpread limit was pure laziness by WW. Instead of creating an algorithm to calculate the number of cells affected, they just made an array with 12 values, that's why 11 was the limit (only 11 because 0 is also one).

Meh, and now, when I created that algorithm, I know why WW left that, it took me ~4 hours.
But the limit's broken, I tried a nuke with CellSpread=100, worked fine Big Grin

2)
Yet again laziness by WW, this time with loading sidecXX.mix files.
There were a few simple instructions, they'd look like this if coded e.g. in C:

tempPlayerSide=PlayerSide;
if(PlayerSide==2)
{PlayerSide=1;}
[...]
PlayerSide=tempPlayerSide;

That means (for non-coders): If the player's side is Yuri, set it to Soviet while loading the UI.
I fixed that, you can now set a flag in the [General] section to make the game load sidec03.mix for Yuri.

BTW, this is very interesting: the game loads sidec04.mix, sidec05.mix etc if the player's side is such. That saves a HELL LOT of work when attempting to add new sides to the game!

No new patch yet, I wanted to ask something to Marshall:
What do you think? Should the next patch patch the "NewInfDeath" patch or should it restore the original exe and then patch the whole thing?
I think the second would be better...

Why I'm leaving NewCountries:
1. You can only have 3 new ones. I'm going to change that.
2. Stringtable entries etc called "test" suck, they'll be changed also.
I dunno when I do this, but it'll be important for adding sides.

100-limit-bug still stays a mystery.
I also attempted to modify the MagnaBeamColor etc, w/o success yet.

@DCoder:
Hmm, it should work, everything's fine.
If I were at home I could test it Shift eyes
It's confusing that it doesn't even spawn the infantry, because that would even work without the patch, same for playing the anim.
Do the "standard" InfDeaths work for you?

Hm... just having a look at the ini; noticed the
";gs Can't add animations to the middle of the list" in the Animations section?
475 is in the "middle of the list".
Maybe that's the reason (I never tried that)?

I'll try your stuff with BORIS and PrismWarhead, maybe something's avoiding that.
I don't hope so :unsure:

@ many of you:
You'll be in the affiliate list next update Smile

EDIT:
@Marshall:
I just read your email (I should do that before posting here).
Compability is the main thing I keep in mind.
Even the sidec03.mix stuff will be OPTIONAL. So nothing will be affected by just applying the patch. It just sets new possibilities.
Flexibility is also an aim of mine, but is some cases quite difficult to keep. I'll do what I can.
Somebody get this guy a medal!

I think the new program should restore the exe then patch it again - this is how the program I wrote works at the moment and is simpler because it means I only need one 'single' patch (as opposed to lots of single patches or one complex multi patch).
I can do it the other way, but then I should probably do an unpatching system for the exe. A backup file that can be restored is the easiest option.


PS. presumably CellSpread has some limit like 255, 65535, 4294967296 ?
PPS. with the new cellspread calculation, aren't there likely to be reconnection errors between patch users and non-patch users?
Wow, marvellous work once again Big Grin

Marshall, unless pd's calculation method produces different results than the original, I see no reason for recons to occur. But then, Invisible=yes causes them for no apparent reason too...

Edit:
I fixed the InfDeath problem. It's down to the INI parser engine. Modders have frequently noted that the very last line of the ini file gets ignored by the game. Well, I had the [NewInfMutations] in the very end of the file, without any blank lines afterwards. Adding a dummy ;EOF line to the end fixed everything. So, it was a problem at my end. All fixed and working. With awesome results.
PaD Wrote:OK some news here:

2)
Yet again laziness by WW, this time with loading sidecXX.mix files.
There were a few simple instructions, they'd look like this if coded e.g. in C:

tempPlayerSide=PlayerSide;
if(PlayerSide==2)
? {PlayerSide=1;}
[...]
PlayerSide=tempPlayerSide;

That means (for non-coders): If the player's side is Yuri, set it to Soviet while loading the UI.
I fixed that, you can now set a flag in the [General] section to make the game load sidec03.mix for Yuri.

BTW, this is very interesting: the game loads sidec04.mix, sidec05.mix etc if the player's side is such. That saves a HELL LOT of work when attempting to add new sides to the game!

I've just e-mailed you a new sidec03.mix file to use, its a recoloured version of the soviet side bar with more of a bronze look and purple buttons instead of read...the build clock (the one that swishes over the icon of what is being built) is also purple and the sidec02.mix I also provided makes the soviet one red.

Quote:Hm... just having a look at the ini; noticed the
";gs Can't add animations to the middle of the list" in the Animations section?
475 is in the "middle of the list".
Maybe that's the reason (I never tried that)?

You can add animations to the middle of that list, but the triggers that call them rely on the order and so adding to the middle messes up any map that plays a specific animation at any point. There is an error in the YR rulesmd.ini where WW fixed one instance of an animation added to the middle while missing the following 3. It doesn't make any difference to the YR maps since they were all made using that animations list, but trying to port the RA2 missions to YR is made all the more difficult by this.
Superb work, pd!!!

PaD Wrote:What do you think? Should the next patch patch the "NewInfDeath" patch or should it restore the original exe and then patch the whole thing?
I think the second would be better...

- Restore the backup of the gamemd.exe. It's safer, easier and give less work for you.

PaD Wrote:100-limit-bug still stays a mystery.

- Doesn't it have anything to do with any kind of array to store the addresses of the units that will be built by AI? They used C++ to make YR, therefore, it's much easier to C++ programmers to set limit when they are declaring the arrays to avoid a lot of headache.
I WANT MY FUCKING MAINBOARD BACK! AAAAAARGH! Unhappy Unhappy Unhappy

Greatest modding adventure of all time and I can't fucking join...what the fuck is this Unhappy Unhappy Unhappy
It's the beginning Big Grin

No real news here, only that the sidec03.mix stuff appears to work randomly - sometimes it does, sometimes not Shift eyes I have to check that.
Thanks Blade for the new mix Smile
I ask you again if I'm allowed to put that on my homepage, on the resource page (for those who want to see the new thing but not to create an own sidebar, for guys like me Wink ). Of course you'll be credited again.

Heh, and I noticed that the game reads ToTile (which works properly like in TS) and ToOverlay (!!!Wink.
ToOverlay doesn't work, but it's being read when a building is loaded :blink: weird stuff here...

@ Banshee:
I believe so.
But that array doesn't seem to be stored like a normal array.
A normal array is stored each item after the previous.
This array is stored all over the memory :blink: at least that's what I've seen so far. If so, there must be a listing of memory adresses.

@ Blade:
Yep, I tried that with 475, it worked.

@ DCoder:
Eh, I hate that error, but good that you found out what's wrong, I got afraid of that...

@ Marshall:
I created the algorithm based on the original values.
So if in the patch the value 11 is given, it spits out the same value as WW's mini-database would do.
Compability=100% Wink
ToOverlay is used for walls - it works fine. Wink