Jump to content

Dune II editor with 1.07 support


Recommended Posts

Posted

far as I can tell Dune2 is just C, nothing resembles anything ive seen in newer compiled c++ code... but who knows with an old school compiler?

theres no vftables, so id assume its only C

Some people like to digg into EXE's and disassemble them ? ;)

Bingo :) its just a hobby, theres something interesting in pulling apart a game you used to love and figuring out its internals. done about 5 of em so far, havnt got over it yet :P

Posted

Just a random comment which might be of interest. Dune 2000 was made in C++ Lite with minimal inheritance. I would wager that Dune II is straight C, from my impression from talking with a former Westwood employee.

Posted

from my impression from talking with a former Westwood employee.

Who did you talk to?

Dune 2000 is based on the TD/RA engine AFAIK.

Posted

Dune 2000 is pretty different from the C&C engine though. It wasn't even made by the same team. It doesn't use any of the typical C&C/Dune2 file or archive formats.

Posted

Meh, it is a shame that Westwood (or was it EA really?) did not really did their best to create D2K.

I always had the idea of improving D2TM in such a way, that I can create my own D2K one day (D2KTM ;)).

Posted

Why? What advantage would the Dune 2000 version of TM have over the Dune 2 version?

We're kinda hijacking this thread;

But, the first reason would be because it is fun to do (ie, some like hacking EXE's, some like creating remakes ;)).

Second reason is because D2K seems to be quite tough to mod (especially Single Player).

Third reason, because technically D2K is not all that different from D2TM i think.

Posted

We just like the classics, that's all. It's more fun playing these old crappy-looking games than any new and smooth remake they could make of it. But we DO like to fix the errors in it, to make the old game "all it could've been" ;)

That'a my philosophy behind C&C95 v1.06, anyway.

I share this philosophy as well :) Actually, I'm pretty much a retro gamer ;) Besides, none of the Dune II clones have as yet been able to recreate the game with 100% accuracy.

Posted

Besides, none of the Dune II clones have as yet been able to recreate the game with 100% accuracy.

Danger, this is very subjective! :D

But i do get what you mean.

I've actually played the original Dune II again, only a little bit (sorry, did not try any of the patches here) though. And it just has a certain feel in it. It actually made me think that any remake with a higher res of 320x200 will fail ::)

Posted

In fact, I do doubt there's a real need to make a 100% accurate recreation, since DOSBox/VDMSound remove most compatibility issues. Remakes should add new stuff :) However, if somebody made a "Dune II Gold" similar to C&C Gold (higher resoltuion without any real additions - maybe only the multiple unit selection box) would be nice.

I still believe any remake should emulate certain aspects such as unit behavior, movement and combat as close to the original as possible.

Posted

Second reason is because D2K seems to be quite tough to mod (especially Single Player).

It's not that difficult to mod, I'm working a series of tools which I will be releasing. Mission modding has come a long way in the last few weeks, we now understand much of the structure, and how these files were created. Hopefully we will understand a lot more of these files once the original gameplay programmer is tracked down and I'm able to ask a few questions.

I don't know anything about the other Westwood games file formats, so I couldn't say how D2k files compare.

Posted

As has been hinted at Dune 2000 and Emperor were programmed by the guys at IG in London. From my recollection the engine itself had no relation to anything WW had done in fact I believe they were at one point trying to convince WW to use an updated version of their engine for future C&C titles. So it is unlikely you will find many similarities between the code structure of those games and the other WW titles.

Posted
We're kinda hijacking this thread;

I don't mind, I'm involved and thsi stuff makes a good discussion. Some mod could split it if he wants, but tbh, I don't really care. I won't be working on the editor again until after my 2nd try exams are over anyway.

I don't know anything about the other Westwood games file formats, so I couldn't say how D2k files compare.

They kinda don't. The only file formats which are the same between the C&C and D2k engines are VQA videos and the AUD music. For example, in all C&C games up to RA2, the missions are in simple INI format, and all sprites are in a file format (SHP) that puts specific graphics of one unit, building or animation in one single file (SHP format). In Dune II, SHPs were usually a collection of graphics put in one file, but in C&C and the later games, each game object has its own separate graphics files (usually several ones, to put each specific animation of that object in a different file).

As far as the Dune 2000 archive format has been uncovered, it just seems to contain one giant list of frames of all graphics ingame, kinda like Dune II's UNIT*.SHP files. The big drawback to this is that you can't change the amount of frames. In all C&C games, the amount of frames of the buildup animation can be adjusted simply by giving it a buildup animation which has a different amount of frames. And then I'm not even talking about advanced stuff you can do in C&C1, like telling a building to act like a rotating turret, or giving a unit a walk animations. That also requires you to change the graphics to correspond to that format. Al of this stuff seems impossible to do in Dune 2000.

As has been hinted at Dune 2000 and Emperor were programmed by the guys at IG in London. From my recollection the engine itself had no relation to anything WW had done in fact I believe they were at one point trying to convince WW to use an updated version of their engine for future C&C titles. So it is unlikely you will find many similarities between the code structure of those games and the other WW titles.

Emperor? That game was made on the first version of the W3D engine later used for Renegade...

Posted

For example, in all C&C games up to RA2, the missions are in simple INI format

I'll have to look into these, it may help me a little with working out the D2k mission files.

As far as the Dune 2000 archive format has been uncovered, it just seems to contain one giant list of frames of all graphics ingame, kinda like Dune II's UNIT*.SHP files. The big drawback to this is that you can't change the amount of frames. In all C&C games, the amount of frames of the buildup animation can be adjusted simply by giving it a buildup animation which has a different amount of frames. And then I'm not even talking about advanced stuff you can do in C&C1, like telling a building to act like a rotating turret, or giving a unit a walk animations. That also requires you to change the graphics to correspond to that format. Al of this stuff seems impossible to do in Dune 2000.

I'm still looking into the R8 and R16 files, my editor/renderer/converter is still in its early stages, but should be finished in a week or two.

Posted

Siberian GRemlin made such a tool for the R8 files, but personally I know nothing about the actual format. Do the internal frames/framesets actually have some identifier linked to them, or are they just indexes? See, in C&C, the filenames of all files in a .mix archive are encoded to 4-byte codes, kinda like CRCs of the strings. But they DO have filenames.

Posted

I would be interested in the R16 files. I had a tool that could extract BMP files from R8 files. But R16 still seems to be a mystery.

They kinda don't. The only file formats which are the same between the C&C and D2k engines are VQA videos and the AUD music. For example, in all C&C games up to RA2, the missions are in simple INI format, and all sprites are in a file format (SHP) that puts specific graphics of one unit, building or animation in one single file (SHP format). In Dune II, SHPs were usually a collection of graphics put in one file, but in C&C and the later games, each game object has its own separate graphics files (usually several ones, to put each specific animation of that object in a different file).

This sounds like a quick and dirty way to code a game to me. Actually, I always thought that Dune 2000 was using an 'upgraded' version of the RA1 engine. But, now I know it is a completely different engine, I am even  more dissapointed.

I bet the RA1 engine could be easily modified to create Dune 2000 as equal or even better than the one released now.

Posted

I would be interested in the R16 files. I had a tool that could extract BMP files from R8 files. But R16 still seems to be a mystery.

My friend and I worked out the R16 format a while back, it's rather simple :)

Please read my tutorial on converting R16 to TGAs here. I have since subsequently used the same technique to convert them to BMPs, and have both working in a tool I'm developing.

There is also information on the tilesetspec I started writing here. Please ignore any mention of R8 files on that spec, as only the R16 information was tested and it turns out some of the R8 assumptions are wrong.

Nyerguds, I believe there is again a four byte identifier, and what you say about this identifier being encoded would make sense. Again I believe there are filenames somehow attached to the Data.R8/R16 files, but my research into it is still ongoing. (I'm trying to research so many aspects of Dune 2000 right now, heh.)

Posted

well if they have filenames, those should be in the exe somehow... and debugging the game could lead you to finding the method the game uses to convert the filenames to these name IDs

Of course, it's always worth checking if it's not simply one of the same functions used in one of the C&C games... Olaf's XCC code should have those :P

Posted

Back to the subject matter, I think it would be nice if the part(s) of the code that define additional House tech tree differences (e.g. the fact that the HK Light Fctry always comes already upgraded; HK WOR having tech level 2; OR always replacing Trikes with Raider Trikes on the production list; OR Heavy Fctry skipping level 2 upgrade etc.) were found. A I also wonder if suchlike changes could be furthered and applied to other Houses/factions as well.

Posted

well, as for the editor, I'm definitely going to add the Houses into that. but these side-specific construction limits, well, I haven't even found that stuff in C&C1. You could get it by looking for that structure's ID number in the disassembled code, but even then it's usually hard to find.

Posted

is the heavy factory techlevel2 skipping Ordos only?

essentially...

if(ordos && heavy factory && techlevel == 2)

  techlevel = 3;

seg007:02B1 26 80 7F 08 02                    cmp    es:[bx+_buildingGame.houseID], 2

seg007:02B6 75 1F                            jnz    short loc_17A87

seg007:02B8 C4 1E C0 84                      les    bx, buildingGamePtrCurrent

seg007:02BC 26 80 7F 02 04                    cmp    es:[bx+_buildingGame.TypeIndex], 4  ; Heavy factory

seg007:02C1 75 14                            jnz    short loc_17A87

seg007:02C3 C4 1E C0 84                      les    bx, buildingGamePtrCurrent

seg007:02C7 26 80 7F 4E 02                    cmp    es:[bx+_buildingGame.techLevel], 2

seg007:02CC 75 09                            jnz    short loc_17A87

seg007:02CE C4 1E C0 84                      les    bx, buildingGamePtrCurrent

seg007:02D2 26 C6 47 4E 03                    mov    es:[bx+_buildingGame.techLevel], 3

theres a bunch more too, except they're located in a different function (called right after the code above)

Hark / Hi-tech

seg010:2618 26 80 7F 08 00                    cmp    es:[bx+_buildingGame.houseID], 0

seg010:261D 75 0F                            jnz    short loc_1CA5E

seg010:261F C4 5E 06                          les    bx, [bp+buildingGamePtr]

seg010:2622 26 80 7F 02 05                    cmp    es:[bx+_buildingGame.TypeIndex], 5  ; Hi-Tech Fact

seg010:2627 75 05                            jnz    short loc_1CA5E

theres a WOR factory check just below this too, if you like give me a list of specifics i should be looking for and ill try track the code down for you

Posted

if it helps,

seg010:2629 33 C0                            xor    ax, ax

then it returns :)

all calls to this function seem to be used to determine the value for buildings field_4f, which gets either a 0x64 or a 0

think this field is the tech-upgrade %, but havnt done any debugging yet

Posted

Thanks for the info, segra :) I wonder if suchlike code can be replicated for other Houses/sides... Probably not, right?

Also, I've noticed that bit 6 of Unknown 06 is set to NO for all units in v1.0, and set to YES for all units but except projectiles in v1.07 (all releases). I have no idea what it actually does though.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.