Jump to content

My (miserable) attempts in dune2 editing


Recommended Posts

lol, capturing with a saboteur is worth testing... worst cas scenario, it first captures it for your side and THEN blows it up ;D

But the amount of damage done by a unit when entering will not be a true/flase value, so it can't be a bit switch. My guess is that a lot of that is programmed into that mysterious unit.emc

Your "Movement behaviour" is actually terrain behaviour. Looking at Red Alert's rules.ini, it becomes very clear how this is done. The percentages below are the unit speed:

 ; clear grassy terrain

; rocky terrain

; roads

; open water


Perhaps my brain is starting to melt down so i began seeing dreams. But i thought harvesters could repair themselves up to half hp?

As far as I know that's only in Red Alert 1.

Edited by Nyerguds
Link to comment
Share on other sites

Today will be a hard days work, so i dont think i will be able to find out anything. If i have time remaining, i might work more on ordos defence drone.

These flying trikes directly assault my base when they are produced. It shots me once or twice, but when it goes out of screen it does not come back. Flying trooper is much more stable, but i dont want to change it.

At least, cpu can handle building it.

Note: any possible way of toying with unit.emc?

Link to comment
Share on other sites

well, all we know about these emc files is that they each have their own kind of assembler-like language. Every byte command would have to be analyzed before we can even start messing with it. There's a page with info on it already, you could take a look at it.


Basically it's a script with blocks of bytes representing each command and the parameters given to it, but if you've never done assembler before, the stack operations will probably be really confusing.

Link to comment
Share on other sites

Windwalker, one more thing about SSTEditor - it's useful to have the "Auto Decompression" option on when you edit TEXT#.ENG files, as it automatically opens and saves compressed text. However, turn it off when editing MENTAT#.ENG files, because the editor will decompress text in them anyway, but with Auto Decompression it will screw up all paragraphs. Remember to enable the "Use compression" option when out of Auto Decompression mode, otherwise the text will be saved uncompressed.

As for the Mentat images, you gotta use Ultraq's Red Horizon tools (which AFAIK are currently not available for download since the forum is down). You can create the static Mentat image with XCC Mixer, as it is in the CPS format supported by this tool, but for the MENSHP#.SHP animation set, you'd require Red Horizon.

As for the value which determines the side's units' resistance to the Deviator gas, I've been able to identify it.

Link to comment
Share on other sites

Wow, friends, thanks for all the information and tools! Digging with a renewed strength now.

Since i have found everything to be able to do what i first had in mind, i can now freely dive deeper. I have not worked with assembly before, but i have read some other topics you two discussed similar topics and i believe a have a basic understanding. This whole editing thing indeed opened a new page for me.

Today, work will be light and i will be able to do some experiments. Hope to share the results afternoon.

Cya guys.

Link to comment
Share on other sites

Pictures of changes in intro language, gameplay language, level design coming in monday, because all my modding is done from work. In fact, i could even open the first two levels for playtesting. It would be wonderfull! That is if you wish to play them though...

It will be public, but i will have to translate it back to english beforehand. That is easy indeed. Hope you like it guys!

Link to comment
Share on other sites

Standart method of screenshop (pressing prtscn and pasting it in paint) did not work somehow. I downloaded capture2file but it failed too.

Thus, i am organising everything in folders and zipping them. You will have three for now.

The first one is the modified campaign for atreides (first two missions only) For now, it is completely in turkish. I you may exclude english.pak for just the gameplay.

The second one is the complete failure in ordos defence drone, my trial on flying raider trike. For trial purposes i gave it to the atreides player in my modified scena1. Just for the hope's sake, i am going to give them to player "flying, wormcamouflaged and shadowed" so that wraith like trike could be seen.

The third one is the more stable, yet still problematic flying trooper. When you change their movement to "flying" they fly, but attack like failed trike, (circling around enemy in short range) and cant give them orders and no shadows could be added. When you make them walk, and change their movement pattern and attack like a good ol' thopter, however, they are not flying in fact. Feel free to toy around and hopefully find a solution. For now, i decided to exclude any flying unit except for normal thopter and carryall in my mod.

Hope i can add zip files to post.... here we go:

Hmm.. seemingly they have to be zip. Another go:

Now what! I did not post this message already. Come 'on!

my mod first two levels for atre.zip

defence drone.zip

Flying trooper.zip

Link to comment
Share on other sites

about the problematic buildings; here is the .ini file atre buildings;







as you see, the numbers are below 256, but these buildings still begin gameplay with full health. Is there a problem here?









as you see the succesfull attempt in my harvester beginning with half hp, its line has "160" as the third number, however everything else has 64, and buildings do not have a third number at all. What is this 64? a portioning between 256 and 64 means the total hp?

I am about to try this timeout thingie...

Link to comment
Share on other sites

Teh heh he!

A lucky shot indeed;

On buildings tab of nyerguds wonderfull editor, unknown 27 is hereby identified:

It is the attack priority for the building. The higher the number, the higher priority it has in enemies eyes. I am adding a workfile for it; In this map, atreides has a conyard and a windtrap. I chose these two because they shared uk27: 300. I surrounded them with enemy ordos tanks in hunt mode, and they were evenly attacked. When i increased uk27 of conyard to 900, all tanks attacked it, ignoring windtrap. When i lowered conyard uk27 to 300 and increased windtraps to 900, all tanks ignored conyard and attacked windtrap!

So, it will be easier to modify the enemy behavour and create a more potent ai. I suspect units have this kind of value too. But i am unsure of that.

Oh, btw, i accidently noticed something else. In my first try where each building shared uk27:300, the tanks were evenly distrubed while attacking. However, when i began repairing my windtrap, more of them began attacking it. Seemingly repairing temporarily increases this value.

The trial map is in added zip, mod the numbers and see for yourself;

Your wind.

building unknown 27 target priority.zip

Link to comment
Share on other sites

I tried saboteur - red hp enemy structure dilemma.

Saboteur directly destroys it instead of capturing, or capture+destroy. So there is no bug there.

I also tried some flying worms. I dont know why i did something like that.

Note that if you change a units movement type to slithering, they can only move over sand. I wonder if i can create a seemingly burrowed unit... probably will look like a worm, will only move on sand, attack in close proximity. Like the deadly machines in the old movie "screamers" Might name it hunter/seeker.

And one final note: I am worried about sandworms disappearing after three swallows. I want permament worms (except for killing them) In fact, having real permament worms would be much more dune-like, but i believe it would be very frustrating for the player to harvest anything.

In order to make them stay after 3 swallows, i believe i will have to modify unit.emc. I followed the basi guides in emc editing in somewhere, first step was fine but it gets complicated for me afterwards. I will try to find out what makes worms disappear.

I will today also try to change the mentat image for atreides. However, i am concerned about palettes. ı dont think i can put anything i want there right? And advices? Do i have to modify dune 1 too and take palette files there?

NOTE: for some time i have been working on mentata.cps. I tried to edit it, however i dont know the correct steps. I can extract it wit xcc mixer, however i cant change it to an editable format. There are options like "copy as png" or alike, but the red horizon tools dont have png2cps kinda option. Need some help here guys;


Link to comment
Share on other sites

Pretty much every decent graphics editing program you will find can save as pcx, which you CAN convert with Ultraq's tools. So just open the PNG, and save it as PCX.

If you don't know any free editing programs, I strongly recommend this old trial of Paint Shop Pro:


It has incredibly handy palette support.

Oh, and thanks a lot for all of your research! I'll try to implement it into the editor soon.

Link to comment
Share on other sites

Thank you Nyerguds!

But according to what i read in Mr Flibble's super dune 2 extended project where he changed the mentat images, i will have to find a way to remove the animation from mentat screen. I believe he mentions somewhere in his topic about it, but yet i need his help. Seems he rarely visits nowadays. I feel like i was a little bit late into this...

I have also been thinking on why i am happy in doing this, why my friend gets excited in the idea of playing a 16 year old game, when dow2 is out and star 2 is in the door.

This nostalgic aproach is indeed everywhere in my life, and i began questioing the reasons and if that is allright. I have some answers but i dont if they are correct.

Perhaps its about hope. Back at those times, the world had the hope to be a better place, and i've grown up with the stories of people trying to achieve this. However, either i was dreaming and wrong about hope, or the world is now in a lot worse shape.

Feels like quantity is gaining over quality, expression gaining over meaning, dreams gaining over hope... things like that. Or that, i am actually not missing the "old times" but missing the hope itself. What is hope in the rapidly "material"ising world? A substance that cant be used to gain "money" or to build a "future".

Aw.. forget it. Back to... "work"... i guess...

Link to comment
Share on other sites

Well, for some time i have been working on unit.emc Its in fact much more complicated than build.emc. Unit buid.emc all script is seperated into different parts for buildings; like repair, refinary, etc. But unit emc is looking like an endless sea of scriptual madness. It stars with line 1 and rains down to thousands without a break. Only somewhere is some statement like [concrete]

However, after learning very very small portion of emc scripting, i have began searching for push 3 line, which i hoped to be the number for the worms swallow limit. So script should have been something like

push 1

push 3

if worm eats subtract

push rc

there is nothing quite clear like that, however, there is only one line consisting push 3

With hopes this is the worm swallow limit, i increased it to 9...

However, there seems to be a problem with the pak/unpak procedure. fifth line does not show up in normal chars. And when i return txt to emc some error messages are given. And when i repak and use the edited dune.pak, game crashes as soon as game starts. "division error"

I would be very happy if anyone herearound (which seems like only 3 people) could remove unit.pak and transformed it to a clear txt, or could show me how to achieve this, i would be very gratefull.

Think about real worms. The fearsome effect of shai-hulud in novels.

For now, i will try to see if there is a solution available on exe file, using nyerguds editor. Man, i love this program...

Link to comment
Share on other sites

Fearing i was dreaming of my worms always swallowing three units as i did in regenerating harvesters; i prepared a map for harkonnen and tried it.

It always eats three.

I changed the harvesters to devastators and to troopers, and the result was same.

It always eats three.

But i still cant change it. Whenever i edit unit.emc and repak it, the game crashes so badly that i have to reinstall it.

The aforementioned "push      3" line is... line number 250.

my damaged line is:


Link to comment
Share on other sites

I believe i have some lead now. I did not leave office in order to be able to solve this disappearing worm problem. I failed and failed and than, failed again.

However, when i began to get crazy and decided to try a Grocket launching worm, things changed.

I will pass the many hours worth of weird experiments and come to results

When i change weapon type for the worm and make it for example "bullets", worm normally moves under its victim to swallow it, but then begins to shoot a bullet few squares left of victim. When i move some poor harkonnen troopers to this square which is rapidly being hit by a 300 damage worth of bullet, this poor troopers die. And the worm is still there, trying to "swallow" a trooper on top of himself but keeps killing poor harks i move a few squares left. Which means, the weapon type:sandworm is responsible for worms disappearance. I might try to

a) change the properties of this "sandworm" weapon

b) give another weapon to worm and try to alter its killing method.

both are out of my reach at the moment...


LATS MOMENT CHANGE: when i change worm weapon type to bullets and give it a range of 1, it succesfully destroyed all 9 harkonnen troopers in the map. poor guys.

will try to make some... err.. make up?

Link to comment
Share on other sites

AFAIK, UNIT.EMC is not editable yet - check this topic.

As for the Mentat graphics, you've got to convert the image from Dun palette into the Dune II palette, IBM.PAL. I did it the following way:

- made some screenshots of desired Dune characters in DOSBox

- converted a Dune II Mentat CPS image into PCX via XCC MIxer, and then re-saved this PCX as BMP (256 colours)

- copy-pasted the new character image from a DOSBox PNG image to the BMP

- had to jiggle the colours a bit, since it didn't look too good when converted into another palette

Perhaps there's an easier way round, but I don't know it.

I'm also attaching the blank Mentat screens from Dune II (the normal one and that of the Bene Gesserit lady) - perhaps you'll find 'em useful ;)


Link to comment
Share on other sites

Thanks for the screen. I hoped to work on them today, but work is getting large, probably wont have time today.

And i have yet to playtest my third and fourth levels. Third one is a basically, defend your base from a constant rain of enemies till the reinforcements arrive, and fourth one is a classic build and - destroy enemy style.

I am having hard time giving theme to my levels because of the limitations on win/loseflags. Will try to color them up as much as i can.

Hope you will like it guys...

EDIT: oh btw, i am going to change, currently bugged and out of style deviator to a rapid - mini rocket launcher. Small amount of damage for each misile but they rain. Will be only limited to Harkonnen.

And.. do you have any idea how to make a cpu fremen ally to player?

Link to comment
Share on other sites

Its all right if Fremen are always allied with Atreides. It suits my scenario. However, i wonder why fremen worms attack atreides units, in this case.

And why do they prefer player units over enemy ones?

3rd level was very fine. I had given the player a single basic tank, but noticed it still makes huge difference, even when it cant crush infantry. I am trying to give the basic tank a capability so that it can still be producable in latter levels.

The way to make units still preferable should be about giving them unique abilities, or boost one of their abilities so high that you may need them later. Like a trikes speed for scouting, or even hit and runs.

Siege tank in every aspect is much more stronger than a normal tank. To solve this i have to change the potential area of at least one of them. Giving the normal tank the ability to crush infantry might solve this, however this may again trash the infantry thing. Needs a lot playtesting.

Open to advices, your wind. (damn i wish i could add a regeneration ability to a unit...)

Link to comment
Share on other sites

Here are some of the changes i am thinking to make on units:

Infantry: will be a little bit (about %15) cheaper, will have a longer LoS, will be uncrushable except harvesters and devastators.

Trike: will increase LoS greatly and speed and hit points slightly.

Raider trike: will be a lot more expensive but will have superior firepower. Ordos will be given normal trike, while raider one will be like a fast tank with low hp. will reduce the weapon range greatly though...

Quad: will almost be the same.

Basic tank: will be dirty cheap, rapid fire low damage medium range vehicle.

Siege tank: will amost be the same.

Rocket tank: will almost be the same. Might consider a slight range increase to better take down turrets. I must see how the cpu uses this though... If they are complete failure, i might indeed shorten their range to force the player when facing turrets.

Deviator: Will launch small misiles rapidly over an extreme range. Player will not be able to build or order them from starport. They will be expensive and slow to build, even for the cpu. So no more gas thing.

Saboteur: I will see if i can change saboteur to something else. What i have in mind is a close compat specialits sardokar which will be a real trouble to player. I will show a few of them in the mid levels which will demonstrate their serious power, and i want the player to live a shock when they rain down to him in final level. I hope i can do this.

Unfortunately, there seems to be no way left to them for fremen. Which should have been superior to emperors troops. I may try to change the raider trike to fremen, however this will be the final touch if i can.

Turrets: Will require double the energy (maybe even more) and money. I dont want the player to sit back and enjoy. He should be in his toes all the time. Also note that this mode will be for veteran players. So no laziness! Work up your fingers!

Most buildings: Will have slightly more hp. Most importantly, construction yard will be about %30 boosted. No easiy opponent finishings.

Worms: will move faster. fear the shai hulud and love the rocky terrain. Bring back the strategical movement factor.

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.

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...