Jump to content

Dune II editor with 1.07 support


Nyerguds

Recommended Posts

lol, okay...  Sidebar Modes found so far:

0: Not a clue, but screws up the game immediately

1: Select target (for any command other than move and attack it gives the "Select location to harvest" text)

2: Place building (makes the game hang immediately when used for a unit command)

3: Keep normal commands sidebar

4: Empty sidebar (as if nothing would be selected)

5: Same as 0

[edit]

Hmm, maybe this means we can finally fix the Sabotage option of the saboteur to make it select a target :)

Link to comment
Share on other sites

Hmm, maybe this means we can finally fix the Sabotage option of the saboteur to make it select a target :)

Is there any reason really? The "Move" command works nicely, except for the fact that sometimes the guy explodes when moving to an empty cell. (Or did you mean exactly that, make the "Move" command work normally with the Saboteur? I thought that his behavior is defined via UNIT.EMC...)

BTW, can the following parameters be modified: 1) the hot key used for each command (I know that they correspond to the strings in DUNE.ENG/GER/FRE, but in v1.0, the Harvester could be ordered to "Harvest" by pressing either H or A; whatever that is, it would be nice to know; also I believe the "next best key" logic in the non-English modes of the EU version seems not to work for every sidebar command) and 2) the unit speech clips played when executing a command (e.g. infantry units say "Infantry out" when ordered to "Guard", yet vehicles say nothing when given the same order).

Link to comment
Share on other sites

um, really... try it out? As I said, there are hardly any options there -_-

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.15.2.zip

image.png.11c4559988f8928dd3811a01058e2b1e.png

[edit]

Hmm... changing Unknown 5 from 22 to 21 removed the move-specific voices for the infantry. I'll try the opposite right away.

[edit again]

yep, works... let's get experimenting 😛

[edit yet again]

It seems to be a series of SB clips. I haven't tested which sound effects I get when playing this in "low-tech" sound, but since these are mostly unit responses, I suspect most of them are just confirmation beeps and such. There seem to be death sounds and explosions too though.

[some more editing]

Bah, they only work for infantry. Something seems to override this thing for the units. That's also probably why Retreat and Guard don't do anything for them.

Edited by Nyerguds
Link to comment
Share on other sites

I hope this immediately answers the question "can we use these special unused sound files?" ;)

I added "come to poppa!" as Sabotage response sound. Pretty cool. Gives the Saboteur a bit more character :D

btw, I think Sabotage IS different from normal Move. I got the impression the unit was not hindered by terrain differences in Sabotage mode.

[edit] Nevermind, looks like I got the wrong impression. They move the same way. [/edit]

Another oddity: This list contains all the mentat voices, but the "Mercenary" one refused to play (in 1.07-US). Haven't tested in other versions, but I doubt it'll make any difference.

The sound is currently just listed as "empty", but it's pretty clear from the rest that it should be that Mercenary one. But despite the fact the ?merc.voc files DO exist, it doesn't play.

Link to comment
Share on other sites

Another oddity: This list contains all the mentat voices, but the "Mercenary" one refused to play (in 1.07-US). Haven't tested in other versions, but I doubt it'll make any difference.

The sound is currently just listed as "empty", but it's pretty clear from the rest that it should be that Mercenary one. But despite the fact the ?merc.voc files DO exist, it doesn't play.

Yeah, I know that. I had to do a bit hex-editing to make it work in SD2Classic and DuneX. In a certain part of the EXE, you'll find the following data:

[pre]%cHARK.VOC %cATRE.VOC %cORDOS.VOC %cFREMEN.VOC %cSARD.VOC FILLER.VOC[/pre]That last one was supposed to be %cMERC.VOC (and reinstating it indeed makes the ?MERC.VOC sound clip to play in appropriate situations), but it appears that the devs deliberately disabled it.

On a related note, a nonexistent file called OK.VOC is listed in the US v1.0 and v1.07, both in the global sounds list and as a part of VOC.PAK. It was removed from all later releases (The Battle for Arrakis).

Link to comment
Share on other sites

Right... v1.16.0 doesn't actually have any new stuff, but it has tons of internal optimizations. Pretty much all internal lists use the same functions to be displayed, read and written now. For example, both the prerequisites and owners are bit switches; well now they actually use the same read & write functions instead of pairs of slightly different ones.

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.16.0.zip

I think the final exe file actually got smaller, despite the fact almost all lists have a fixed string size of 30 characters now :)

(which, of course, was necessary to be able to use more general functions)

If anyone finds bugs in this version, please report them. I think I checked the reading, writing, listing and displaying of all data types, but I removed and replaced so much code I really can't be sure.

Link to comment
Share on other sites

I noticed that my 1.07us version didn't play the frigate countdown voices... does any version actually play those?

Um, it's not the frigate countdown, it's the missile launch countdown, played only for House Harkonnen (unless you give the missile to any other house or make the Palace capturable, that is).

Link to comment
Share on other sites

No, capturing palaces doesn't work, I tested that. You just get your own superweapon on the captured palace.

Ah, just like you don't get to construct buildings you're normally not allowed to (e.g. WOR for Atreides) if you capture an enemy CY. That is kinda logical, since you can't produce Troopers as the Atreides anyway (by default, that is), and analogously, at least one superweapon - the Fremen - is useless for most other sides.

Link to comment
Share on other sites

// Stored internal File table

struct sExeFileData {

#pragma pack(1)

dword fileName;

word  field_4;

word  field_6;

word  field_8;

word  field_A;

word  field_C;

word  field_E;

byte  parentIndex;

byte  field_11;

byte  fileType;

};

filedata = 0x31600

Just noticed this... since these file entries seem to have a reference to the name too, it shouldn't be hard to implement them in the editor. Any info on these file types? Or are they just SHP/WSA/VOC/etc? In that case it'll be easy to figure out.

[edit]

Crap... obviously this list has a different length depending on the version. I'm going to have to change some code to get this right...

Link to comment
Share on other sites

Just noticed this... since these file entries seem to have a reference to the name too, it shouldn't be hard to implement them in the editor. Any info on these file types? Or are they just SHP/WSA/VOC/etc? In that case it'll be easy to figure out.

Yeah its just a table of all the files used within the game and the PAK file to check in for them (parentIndex field is index in the filetable)

i believe the table is always terminated with an entry of 0's, so you should be able to use that for the size

Link to comment
Share on other sites

Not really, since I got general methods for all tables. Some of the others don't end in all zeroes. Also, that would mean that if you change all values of the last file into zeroes, you'll irrepairably drop it from the editor. I don't really want that. People should be able to use the editor to repair what they screw up ;)

Anyway, I just made the list lengths a multidimensional array where each version has its own list sizes.

Sizes of the file lists:

demo  : 189

1.00   : 568

1.07US: 606

1.07EU: 676

1.07HS: 675

Now I just need to write a method to make a list of the files to use for these "Parent index" values. Problem there is that the lists of files go beyond 256 items, and the index value is only 1 byte.

I might solve this by doing an extra check on the field_4 word value, since that value is only filled for the pak files. Might be some sort of internal identifier. The fact the extra language PAK files (german.pak and french.pak) have the same value there might be another hint towards its exact function.

This is also odd... the US 1.07 version seems to have almost all of the file entries for the german and french files.

[edit]

Method to read the second option is implemented. I could just check for the ".PAK" in the filename too though...

[edit again]

I got both ".PAK" string and pak identifier methods in the source code atm, but I commented out the string check one.

New version, with Files included:

http://nyerguds.arsaneus-design.com/dune/dune2edit/d2editor_v1.16.2.zip

Bug fixes in this version:

-fixed a method (to read an integer) that accidentally used 'Byte' type for the list index values; this obviously didn't work well when the lists started going beyond 256 items.

Link to comment
Share on other sites

Is there any reason really? The "Move" command works nicely, except for the fact that sometimes the guy explodes when moving to an empty cell.

Still, giving it a targeting cursor is better than just having a useless command that does nothing but blow up the unit when you click the button :P

Link to comment
Share on other sites

This is also odd... the US 1.07 version seems to have almost all of the file entries for the german and french files.

I told you, the US v1.07 has "rudimentary" non-English language support. The file sets within GERMAN.PAK and FRENCH.PAK are identical to those within a standard v1.07 ENGLISH.PAK (all text, title screen, House selection screen, "Do you wish to join..." screen and graphical buttons - i.e. everything that has text on it). Whichever language you set in US v1.07, the speech will be always English.

Still, giving it a targeting cursor is better than just having a useless command that does nothing but blow up the unit when you click the button :P

I'm sorry? The "Sabotage" command is not an equivalent of "Destruct". When ordered to sabotage, the Saboteur will set off looking for targets to blow up on its own (it may depend on the priority table otherwise used by the AI when choosing target). In fact, "Sabotage" is the default command for the Saboteur, which it executes automatically upon emerging from a Palace.

Link to comment
Share on other sites

The Saboteur may blow up upon reaching his destination after the "Move" command. I think that in v1.07 he became more stable, but it still happens sometimes (I believe this depends on the terrain type, or even particular tiles). I'm pretty sure that in v1.0 he also executes the "Sabotage" command when is summoned from the Palace, and blows up in this mode only if either accidentally runs into an obstacle like a wall, or gets to the auto-picked target and destroys is. Usually he doesn't get to the target on his own, though :)

Link to comment
Share on other sites

Nope, I've just tested this, and it doesn't happen.

As for the terrain-dependent detonation after executing the "Move" order, it seems that the Saboteur explodes upon reaching destination if you order him to move to any rock cell just near the rock/sand border. Odd.

BTW, do you know that you can give the "Sabotage" order to other infantry type units pre-placed on the map, in which case they'll seek out an enemy structure and enter it? That way, you can make the AI capture the player's buildings :)

Link to comment
Share on other sites

Hm, there seem to be 3 possible values for the file type. 0 and 6 are both used for PAK files, and 16 typically indicates a non-PAK file.

I wonder what the difference between file type 0 and 6 is... both are used for pak files, but the 0 ones are typically only used for pak files containing .VOC files. Though the EU version has all of the PAK files set to 0.

I thought it might be something like "files inside this archive can also be read from the game folder". This would be perfectly possible since all files have a parent archive set. But a quick test with mentat.pak (extracting worm.wsa in the game folder and renaming it to wor.wsa) and then testing the replacement ingame on both 0 and 6 statuses showed that this was not the case. The WOR pic was replaced either way.

Link to comment
Share on other sites

But in the first missions, the enemy infantry already tries to enter your buildings, no?

That's right, this behavior is caused by the "Hunt" command. I have no idea what exact differences are, but enemy infantry in the first missions can be distracted from the building they intend to enter (usually it's your CY) by attacking them with your units, in which case the "hunter" will stop and return fire. I'm not sure if the unit set to "Sabotage" will behave in the same way, but this might be the difference.

I wonder what the difference between file type 0 and 6 is... both are used for pak files, but the 0 ones are typically unly used for pak files containing .VOC files. Though the EU version has all of the PAK files set to 0.

Maybe this has something to do with the game's abnormal reaction to removing files from a VOC-only PAK ()as I described here)?

I thought it might be something like "files inside this archive can also be read from the game folder". This would be perfectly possible since all files have a parent archive set. But a quick test with mentat.pak (extracting worm.wsa in the game folder and renaming it to wor.wsa) and then testing the replacement ingame on both 0 and 6 statuses showed that this was not the case. The WOR pic was replaced either way.

I think the EU version will try to read any file from the folder, then from the PAKs. earlier versions, however, ignore certain files in the folder, meaning they read from the PAKs first. IIRC DUNE.ENG is read from the folder first in the earlier releases, but MENTAT#.ENG in the folder are ignored if the corresponding files can be found within ENGLISH.PAK. I did not test it extensively though.

BTW, if you're doing research about game files, maybe this info will be helpful: when I was playing various music pieces through the Mentat screen, I found out that some of them are looping, while others are not (e.g. all default Mentat themes, the map selection screen and credits themes are looped), so I guess this must be indicated somewhere in the EXE.

Link to comment
Share on other sites

I'm testing on the US version though.

As for the music, well, maybe I can find more lists (like the commands & houses) if I take a look at the exe. But I seem to end up doing most of this reseach at school, lol. I'm just too tired when I come home :P

That's right, this behavior is caused by the "Hunt" command. I have no idea what exact differences are, but enemy infantry in the first missions can be distracted from the building they intend to enter (usually it's your CY) by attacking them with your units, in which case the "hunter" will stop and return fire. I'm not sure if the unit set to "Sabotage" will behave in the same way, but this might be the difference.

On a slightly related note, I noticed that the Saboteur, when you just put him on Guard, attacks nearby enemy stuff by shooting at it, just like the normal soldier ;D

Link to comment
Share on other sites

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.