Jump to content

Modifying Dune 2


2468_1454213254

Recommended Posts

Hi everyone. I'm making some modifications to Dune 2. No separate mod, just a few tweaks to the original game to make it even more interesting. I have a couple of things in mind that I've been talking about in a couple of other threads, but I guess it's better to create a separate thread for my stuff... smile.png

I was hoping you guys could help me figure out ways to make these changes:

1 - I think it would be cool to have a way of healing ("repairing") infantry units, much like the way vehicles can be repaired by sending them directly into the Repair Facility. I see several ways to accomplish this:

- One option is to be able to send damaged infantry units (either on foot or possibly using a Carryall) directly back to the Barracks or WOR where they were produced, to be healed. The carryall is just an option, of course; while it does make the whole process of healing infantry faster, it might be needed for harvesters or for evacuating damaged vehicles... It's all a matter of priorities...

- We might have two separate buildings for infantry as we have for vehicles. Vehicles are produces in either of the two factories, and they are sent to the Repair Facility when damaged. Likewise, we might have all infantry units be produced only at the WOR and healed only at the Barracks (simulating a field hospital, or Lazarett as in German). This would leave the WOR free to produce units while the Barracks (or Hospital if we rename it) heals others, which is good because it doesn't look like it's possible in Dune 2 to have a structure build a unit and repair another at the same time. This is actually my favorite option right now. smile.png

- We might also send infantry units to be "repaired" at the Repair Facility, just like vehicles. At least that would save the player the trouble of building, powering and maintaining yet another separate facility, but the Repair Facility is expensive, can only be built in later levels, takes up a lot of space and is meant only for vehicles anyway... Besides, why would the player want to repair infantry if there are combat vehicles that can hardly even move anymore?

Using Nyerguds' editor, one of the parameters that we have to consider in structures is, of course, "units can enter". But how can we make a structure repair units like the Repair facility and then deploy them after repairs are done?

I also notice one parameter named "repair facility", set at -128 for the Repair Facility and at 0 for every other structure... But I don't know what it does.

2 - I would like to make Quads have the same kind of weapons as Troopers: rockets at long range, machineguns at short range. We've discussed this in another thread but didn't figure it out, because we can't tell what makes a unit be able to fire secondary weapons like the Troopers. Any ideas?

3- It would be cool to have some kind of mobile anti-aircraft weapon other than the rocket launcher. Maybe a Quad with anti-air capability, using rockets and/or machineguns as I said above. How might this be done?

I'll post some more ideas later if I get them... tongue.png

Thanks for your attention.

Link to comment
Share on other sites

Haven't been able to get this working so far... :-

Hey, does anybody know this: when I was editing the scenario files, I noticed that the parameters for the reinforcements include either an asterisk or a plus sign next to the deployment time. For example, "S,Troopers,EnemyBase,20+". Does anybody know what those symbols are for?

Link to comment
Share on other sites

+ (plus) sign means that the reinforcements should arrive every period of time and not only once.

Wow, I didn't know that (though I suspected this was the case).

EDIT: BTW Minniatian, any chance you'll resume your work on the EMC files and decode UNIT.EMC and/or TEAM.EMC (am I right to suppose the latter controls AI attack teams?)?

Link to comment
Share on other sites

EDIT: BTW Minniatian, any chance you'll resume your work on the EMC files and decode UNIT.EMC and/or TEAM.EMC (am I right to suppose the latter controls AI attack teams?)?

Well, I was very busy these years and didn't complete UNIT.EMC description. In short UNIT.EMC describes units' behavior in various states like:

  • Attack
  • Move
  • Harvest

etc. The fact is that I could continue it even in short time, but the only obstacle is ~63 huge UNIT.EMC so called "external routines" (read about BUILD.EMC "external routines" here) which access some unknown data. I wish I could describe mentioned ~63 routines and finish the work. By far I decoded only few of them.

Link to comment
Share on other sites

Uh, I meant that Nyerguds' editor might be useful in identifying what's what with those exernal routines :)

Nyerguds' editor allows to edit statistics of units like firepower, range, hitpoints. EMC External routines refer to structure of unit ie. current position on map, house of this unit, state of the unit etc. I have recognized most of the members but still some are unknown to me. Unit structure is used within EMC external routines (ie. pieces of code within EXE). For example first UNIT.EMC external routine obtains some information about unit.

Link to comment
Share on other sites

EMC External routines refer to structure of unit ie. current position on map, house of this unit, state of the unit etc.

I remember there was a Dune 2 savegame editor that would read and modify exactly this kind of data from savegames - could that be of any use?

BTW, can you tell what things does UNIT.EMC define exactly? From my experience, I've learnt that lots of stuff are defined by what is called "movement type" (Foot, Wheeled, Tracked etc.) - this includes unit voice, graphics animation handling and, of course, the interaction with different terrain types while moving.

Link to comment
Share on other sites

I remember there was a Dune 2 savegame editor that would read and modify exactly this kind of data from savegames - could that be of any use?

Yes, it can be of great use.

BTW, can you tell what things does UNIT.EMC define exactly? From my experience, I've learnt that lots of stuff are defined by what is called "movement type" (Foot, Wheeled, Tracked etc.) - this includes unit voice, graphics animation handling and, of course, the interaction with different terrain types while moving.

I attach log file of UNIT.EMC. It contains unit names e.g Carryall or Trike but not the names of external routines (only indexes). Foot, Wheleed etc. are used in TEAM.EMC but from my experience the game does not use it at all within game engine.

LOG.TXT

Link to comment
Share on other sites

Yes, it can be of great use.

Here's the link: http://www.destinys-darlin.com/play/dune/dune2/dune2ed2.zip

Foot, Wheleed etc. are used in TEAM.EMC but from my experience the game does not use it at all within game engine.

Actually, the game didn't use Wheeled and Tracked teamtypes because of a syntax error in the scenario files. Read more here. My patch also fixes this issue.

Link to comment
Share on other sites

  • 1 month later...

Umm... Hi everybody.

Reading everythin about editing dune 2, because i want to change the storyline and gameplay towards the original books for a friend. Many things are done, i changed first level to field many mercenerias and some ordos silos. According to story, atreides have been forced to accept a seemingly profitable ruling of Arrakis, however emperor and harkonnen are trying to remove them from existance. As soon as they arrive they are attacked, and thufir sends his young commander (player) to gather some sources south of shield wall.

However, there are mercs there. Some harkonnen and only one sardaukar spies, too. In first level, most mercs just guard their spice territory, one group guards and attacks after player enters their guarded area, and all spies attack. quote is 3300, so the player is forced to find new harvest zones (and build 3 rafineries btw) and there he can notice ordos silos. one raider and some troops guard their silos.

Enemy reinforcements arrive, though weak, there is no way the player can build army in this lvl so some harvester combat might be neccessary.

Now to the subject; I need help guys. I translated most of the game to my language, changed subtitles in intro movie to tell the new story... However i cant change what the mentat says during briefing and its very important to tell the story to the player. I used siberian string editor for most changes, however i couldnt find those lines anywhere in game.

likewise, i am unable to change mentat section in-game, i could only succeed changing the power requirements part over the pics of units. When i change anything here, it all goes into letter soup...

I also want to change the speech in the inro movie. Is it possible?

Thanks in advance!

Link to comment
Share on other sites

I translated most of the game to my language

Which language is that?

As for the mission briefings, I don't know which file those are stored in, I think MrFlibble will know about that.

The audio bits for the intro are in the .pak files somewhere (introvoc.pak I think), but creating voc files is a tedious business, since they crash the game if they're too long. Also, they's only allow you to replace those actual audio bits, so it won't be easy to construct new sentences saying totally different stuff.

Link to comment
Share on other sites

My language is Turkish, sorry for forgetting that.

Well, i cant change the voc files, he will have to chose no sound in setup when he plays. In fact i tried a very small and miserable trick... When you first play a game, and select the construction yard, a text box opens and tells something about cyard. I changed it to sth like:

"Sarge: Sir! Scouts report dense mercernary activity! And they dont seem to like our presence! We expect an attack soon!".

So this was like a (poorly tried) in game message. It works fine for now, as in playtest when i move my units a little and chose my cyard, this message shows up (sometimes it delays until another action but this happened only once) and first single mercenary "humter" arrives about the same time. Merc seem to come in 3 waves... But in fact they are harkonnen agents, and the last Infantry are 3 sardaukars (like in the novel) though their stats are of course same as mercs.

Now, i may want to add the option to make it possible for player to build inf.barracks; for that i have to edit the exe and lower its tech level to 1 right?

Another problem keeps occuring when i put mercenary silos instead of ordos ones. I use syberian for text editing, pakwest to expand/repak files, and your (wonderfull) editor to modify exe.

I would also like to ask about win/lose flags. Like i want to create a scenario where he needs to take his harvesters along the other of the map... I thought of giving him no credits, 10 harvesters and a quota of 4000 credits, and put the refinary to the other side of the map... But seemingly its impossible to start the harvesters full, so he will need to harvest first, then try to reach the other side. Now how can i make harvesters first priority for enemies? Bu "area guarding" spice fields? this may indeed turn into an interesting variant. Like he tries to lure away the enemies with his trikes and harvest the area, and make a runaway trying to keep alive 6 harvesters... also they will unload one after eachother... I dunno... Somewhere i read it was impossible to set qutoe targets after 2nd level was impossible, is that true?

And finally... In the modified scenario, i suicided and destroyed everything i had, but i did not fail the game... Is that normal?

Thanks in advance. I already PM'd mrflibble but no answer yet.

I also would like to help anybody in anyway that i can about modding d2. I also toyed a little with Tibed for dune2k but it was not satisfactory...

Cya!

Link to comment
Share on other sites

Well, i cant change the voc files, he will have to chose no sound in setup when he plays.

Well, there are ways of writing voc files... I know Audacity can do it.

In fact i tried a very small and miserable trick... When you first play a game, and select the construction yard, a text box opens and tells something about cyard. I changed it to sth like:

"Sarge: Sir! Scouts report dense mercernary activity! And they dont seem to like our presence! We expect an attack soon!".

So this was like a (poorly tried) in game message. It works fine for now, as in playtest when i move my units a little and chose my cyard, this message shows up (sometimes it delays until another action but this happened only once)

Problem is, showing those tooltips can be disabled in the game settings. And I think it only happens the first time you play the game.

Now, i may want to add the option to make it possible for player to build inf.barracks; for that i have to edit the exe and lower its tech level to 1 right?

Yeah, I guess that should do the trick.

Another problem keeps occuring when i put mercenary silos instead of ordos ones. I use syberian for text editing, pakwest to expand/repak files, and your (wonderfull) editor to modify exe.

So, um, what's the problem?

I would also like to ask about win/lose flags. Like i want to create a scenario where he needs to take his harvesters along the other of the map... I thought of giving him no credits, 10 harvesters and a quota of 4000 credits, and put the refinary to the other side of the map... But seemingly its impossible to start the harvesters full, so he will need to harvest first, then try to reach the other side. Now how can i make harvesters first priority for enemies? Bu "area guarding" spice fields? this may indeed turn into an interesting variant. Like he tries to lure away the enemies with his trikes and harvest the area, and make a runaway trying to keep alive 6 harvesters... also they will unload one after eachother... I dunno... Somewhere i read it was impossible to set quota targets after 2nd level was impossible, is that true?

Might indeed be true, since some later mission (I think the last one) accidentally has Quota set, and it has no effect. If only I could debug the exe, I might see how I can change it by looking into the code that uses that "Quota" text.

And finally... In the modified scenario, i suicided and destroyed everything i had, but i did not fail the game... Is that normal?

Uhm... odd. Did you have any buildings? The game only fails when you don't have any buildings left. Units don't count at all.

Thanks in advance. I already PM'd mrflibble but no answer yet.

I haven't seen him around much lately.

Link to comment
Share on other sites

  • 6 months later...

Might indeed be true, since some later mission (I think the last one) accidentally has Quota set, and it has no effect. If only I could debug the exe, I might see how I can change it by looking into the code that uses that "Quota" text.

The Quota parameter only takes effect when the appropriate Win flags are set. It is not linked to the mission number.

The game only fails when you don't have any buildings left. Units don't count at all.

Turrets don't count as well.

My guess is that the Win/Lose flags were wrong. IN THC's editor, both WinFlags and LoseFlags are set to 3 by default, whereas a normal "destroy all enemy buildings" scenario must have LoseFlags=1.

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