Jump to content

A handy Dune 2 scenario editor for Windows


MrFlibble

Recommended Posts

At the 8 and 16 bit computer era the "Flag" term meaned a bit wich can be true or false.

And if value "1" = "no buildings" then the value cannot mean the same because "1" = "0000000000000001" and "4" = "0000000000000100".

Maybe these are aren't real flags, just AI list pointers. But the program calls them flags.

It is possible that the flags 4 and 5, used in missions 1 and 2 respectively, mean not just "no buildings", but "no means to build a refinery" (since accumulating a quota is the objective) - like losing the construction yard or spending all credits on something else - but I haven't checked that out.

BTW, regarding your recent addition, the 64 radars map revealer: I believe Stefan told me that a building, when placed where it does not belong, will result in additional rock in it place when the savegame is decoded by the seed revealer. Meaning that 64 outposts will add extra 64 2x2 rock patches ??? Here is the part of that discussion.

Link to comment
Share on other sites

Dark Knight ez: Thank you.

MrFlibble:

a building, when placed where it does not belong, will result in additional rock in it place when the savegame is decoded by the seed revealer. Meaning that 64 outposts will add extra 64 2x2 rock patches

That is NOT true. This is just only happens if you DESTROY one of the buildings. I've tested it before i released the program in January, but i forgot to put the "kecske.txt" to the pack. In the BGAFC_DE seedpack the seeds "65535" "-1", "0" are all extracted with this method.

Summa summarum: You can use it safely. If none of the radars was destroyed before you saved it, then the seed map will be absolutely correct.

Link to comment
Share on other sites

That is NOT true. This is just only happens if you DESTROY one of the buildings. I've tested it before i released the program in January, but i forgot to put the "kecske.txt" to the pack. In the BGAFC_DE seedpack the seeds "65535" "-1", "0" are all extracted with this method.

I never checked it myself, but if the method works that's definitely good news. It also means that the seed maps revealed previosly (some of them, Ordos missions to be precise, personally by me, although I don't know if Stefan made the whole pack downloadable somewhere) are 100% accurate 8)

Link to comment
Share on other sites

If you use the "kecske.txt" then only one byte will be missing from the seed map, in the lower right corner. So your maps are very very nearly 100%. They are 99,9755859375%.

By the way. Just to prove what i am saying, i am extracted two more seeds ("7777", "8888") and added it to the default seedpack. And added a few new stuffs too, so BGAFC_DE 1.03 is now out. You can download it from http://oscomp.hu and soon from http://bgafc.t-hosting.hu too.

Link to comment
Share on other sites

I decided to check things myself, and used the revealer to uncover a map (seed 586), first with Stefan's map (with a windtrap, an outpost and trikes), and then with yours. Here's the result:

Stefan's map:

oldseednq7.png

Your map:

newseedue0.png

Obviously they're different. Looks like Stefan was right after all.

On the other hand, I might be using an outdated version of the revealer ??? If this is the case, then my apologies.

EDIT: An obvious solution to the problem that has just occurred to me is to place a pattern of units with long sight range and absolutely no buildings. You can set both win flags and lose flags to six, and quota to some random number (with player's credits being zero) so that the mission doesn't end with an instant success/failure. This can get us 100% accuracy with zero problems, right?

Link to comment
Share on other sites

Well first, both of your picture shows that, what is you extracted is wrong.

This what you extracted with Stefan's method: a Windtrap and Trikes. See that 2x2 rock field in the middle of the spice?

oldseednq7.png

This is the "kecske.txt" version. See? The rock field is no longer here. The windtrap.

newseedue0.png

And here is the "586" what i extracted with "kecske.txt".

586.png

It has leaved sand fields instead of rock fields. Very strange. That's why i did not noticed the difference. I do not know why is it creates rock at you or Stefan and why creates sand at me.

So the solution will be what you suggested. Launchers all on the map.

Link to comment
Share on other sites

The problem is that the map is being extracted from a savegame. But, with units and structures on the map, it will not deliver map data for that.

Ie, the savegame map data delivers information about "what can be seen on the radar".

Meaning:

- sand, rock, spice, moutain

- unit, structure

thats it.

The revealing utility i wrote (thanks to Olaf van der Spek's tool for extracting the vital data from the savegame), simply does some guessing what terrain is what.

TCH: It is easy to explain why it creates sand for you and rock for me (or spice, or whatever).

What it does:

- it knows it is a 'gap' , ie it knows it is NOT terrain for a certain cell.

when it knows that, it does a very simple check:

- if surrounded by rock, then it probably is rock (etc etc)

- if it is 50/50 , then take a gamble.

In the end, it would not matter that much for the person who creates the maps. Because when one places a structure on sand by accident , once destroyed, it is 'rock' anyway.

BTW:

With launchers you will still create a lot of rubbish, and i don't know if it will work because you do no have a radar. Perhaps it does not matter; thinking out loud here.

Link to comment
Share on other sites

MrFibble:

I have a working Seed map generator too, but first, it is an Amiga program, so i am the only who can use it and second, i have no sources just the program, and third it is just generates the rock/sand parts. The spice and raised rock are not generated as i saw while tested it.

Stefan:

The units are not affect the terrain, except you shoot at the spice fields with explosive weapons, so the solution is no enemy units and the winning/losing is both the quota. Or i hope this is the solution.

Or we can just disassemble the dune2.exe and search for the seed generator. I would like to avoid this opportunity.

Link to comment
Share on other sites

Yes, I even have that program with the C source.

I've come up with yet another (half) crazy idea: edit the Dune 2 exe to have a 1x1 sized outpost with 0 power demands, and a Raider Trike (or whatever unit) with the maximum movement speed and sight range possible. This could reduce seed inaccuracy to a more than reasonable minimum (if it works, of course). Actually, I can try that when I'm in the mood. Right now I've just passed a big exam, and I haven't slept the previous night doing revisions for it.

Link to comment
Share on other sites

Stefan:

I know that the Amiga prg is not generating the spice fields. I've mentioned that in my last post. But even that would be an advancement. Where i can download that C source?

MrFibble:

Can you upload the seed algorythm to somewhere?

Link to comment
Share on other sites

I've tried revealing the map with a grid of launchers, and the results seem accurate. For a try, I have revealed all the original seed maps, which I post here. Also I have included the map I used in the package. Note that the launchers leave some areas near the top and right borders of the map unrevealed, you'll have to do it manually 'cause there's an 80 unit per map limit, so I couldn't make an instant revealer. Also, make sure you've got the latest version of Stefan's seed revealer tool.

@TCH: Another package contains the seed generator. I don't know where I got it anymore, but it used to work somehow, I only couldn't convert the maps to dunedit seed format (I didn't try though ;)) Let's hope you find it useful.

seedgen.zip

Link to comment
Share on other sites

Now, I made some test and the newly generated maps appear to be accurate after all. If you wish to see it for yourselves, I'm posting some comparison stuff. There's a completely original image of a Dune 2 map (seed #300), which I painstakingly assembled from actual in-game screenshots, and a Dune Legacy-generated representation of the new seed map revealed by using the "launcher grid" method. Also, I included images of both old (from TCH's editor seed package) and new versions of this map as viewed by the editor, so that the (mostly minor) differences are seen. In any case, you should judge for yourself. Note that either the seed map or Dune legacy does not show spice dunes, only spice sand. But other than that, the new seed keeps all info about the map cells accurate.

@Stefan:

I noticed that the seed revealer package on http://arrakis.dune2k.com is older than the one I used to reveal Ordos seed maps some time ago. Maybe that's the reason why TCH's revealed maps are different from mine? Anyhow, I have taken the liberty to post the newer version (the EXE there is called seedrev.exe) with the "launcher grid" map that I used to reveal the maps. I also edited the readme file to incorporate the instructions for it.

I believe that units, unlike structures, do not interfere with the map revealing tool's functions, and the presence of a radar also doesn't seem to be critical. In fact, I think that the info on the minimap is only secondary to what the player can see in the main game window.

@TCH:

I've encountered a bug in the new version of the editor. When I was going to define CursorPos, I accidentally moved the mouse cursor out of the editor's window, and it immediately crashed with multiple "Range check error" messages, and shortly after that it shut down. I think this didn't happen in the version 1.0.

EDIT: I have updated the seed pack with some new seeds, including the abovementioned 300.map, for your use and reference.

EDIT2: Now that the new, more effective version of the seed map revealer is available here, I have removed the old version that was attached in this current post.

map_compare.zip

seedpack.zip

Link to comment
Share on other sites

nice work. Looks like the differences are not that much, but having a more accurate seed file is desirable.

Btw, Dune Legacy uses the dunedit seed files (as does d2tm) to draw the map.

I believe some older versions of the seed revealing utilities only do this:

- sand

- spice

- rock

- mountain

while instead; it should be:

- sand

- sand hill

- spice

- spice hill

- rock

- mountain

Because older revealing tools did not make the distinction between sand and sand hill (etc) it could explain why Dune Legacy does not show those details.

By the way, if your seed files do have the distinction, it would be a very nice addition / update to Dune Legacy and/or D2TM to have them show proper terrain differences as well.

Link to comment
Share on other sites

As far as I can tell, the seed maps generated by the latest version of your program do not make distentions between spice sand and spice dunes. Other terrain types are present. Regarding the map editor, such deficiency is not critical. Technically, it is accurate representation of rock that has paramount importance, and it is present.

As for the capabilities of the revealing tool, I don't know whether it is Olaf's map extractor or your seed converter that omits spice dunes, but I think this could be fixed.

Also, I hope you'll update your site with the new version of the revealer. If you write an even newer program, I'll be glad to test it whenever possible.

Link to comment
Share on other sites

MrFibble:

The seed generator wich was posted by you is working. I will convert the C sources to Delphi and include the seed generator in BGAFC_DE, and after that we'll rid from the seed revealing and the seedpack.

And the "Range check error" will be fixed too.

Link to comment
Share on other sites

Well, but have patience, because i am very amateur in C. My preferred languages are ObjPasjcal and Assembly.

BTW i noticed, that there is just 65536 seed map are available. If you write a larger or a negative number then only the last 16 bit will be interpreted. It is just like

  seed = seed & 0xFFFF;

any upper bits are available, will be all ignored.

I think that sentence was totally "understable". My english is sucks.

Link to comment
Share on other sites

The number 65536 seems to be the upper limit in Dune 2, because I have already encountered it in some other info regarding the game ???

As for your English, you will quite soon acquire the "Standard Average (European?)" that we all speak here (with individual variations) using it as lingua franca. Forum conversations provide very good practice for learning English; if you want to progress faster, you should also refer to dictionaries quite frequently, as this really helps too ;)

Link to comment
Share on other sites

Stefan:

You mean 16 bit, right?

MrFibble:

It does not matter what are you using for seed. A 16 bit value if it signed then its maximum will be 2^15 = 32767 and its minimum will be -2^15 + 1 = -32768.

Correctly it is NEG 0x7FFF or 1 + NOT 0x7FFF.

In practise it means you can write anything to seed because of the cyclic repeating (by 65536) it will be the same. You can write 654165654156154615416546 then it will be 50914 or you can use -72346578236 then it will be 53956 because only the last 16 bit will be used.

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.