Jump to content

Recommended Posts

Posted

repairCost = (si->o.buildCredits * 5) / (si->o.hitpoints * 3);
  • Palace: 1
  • Light Factory: 1
  • Heavy Factory: 5
  • Hi-Tech: 2
  • IX: 2
  • WOR: 1
  • CY: 1
  • Windtrap: 2
  • Barracks: 1
  • Starport: 1
  • Refinery: 1
  • Repair Facility: 5
  • Turret: 1
  • R-Turret: 2
  • Spice Silo: 1
  • Outpost: 1
Yes it's a bit different by original repair costs, but I tried to make sense of relationship between HP and Build Cost.

Again, the important thing is that this formula could work with modified values about existing Structures or even new structures created (therefore more than 512 HP structures).

  • Upvote 1
Posted

That's very cool! The repair expenditures in the original game needed the adjustments anyway.

BTW, drnovice, what hex editor do you use? I have two quite old programmes, and when implementing one of your fixes (the radar unit count one to be exact) I ran into the problem that neither of my editors are able to replace large chunks of code with the find-and-replace command (in fact, out of the two only ICY Hexplorer has the find-and-replace option anyway). So I had to split the code into several parts and replace them one by one, which was a bit tedious, and could in fact introduce errors into the modified EXE.

I assume that in more modern hex editors such routine is easily carried out by a single click, but I'm kind of not inclined to test several programmes out there to find out which does have this feature.

Posted

BTW, drnovice, what hex editor do you use? I have two quite old programmes, and when implementing one of your fixes (the radar unit count one to be exact) I ran into the problem that neither of my editors are able to replace large chunks of code with the find-and-replace command (in fact, out of the two only ICY Hexplorer has the find-and-replace option anyway). So I had to split the code into several parts and replace them one by one, which was a bit tedious, and could in fact introduce errors into the modified EXE.

I personally use Editpad Pro. It's technically a text editor, but, throw any binary file in it, or just press ctrl+h, and it switches to hexadecimal mode. Has search & replace that supports regex, even in hex mode I think.

Only disadvantage is that it's a "free trial", meaning you gotta click away some small screen on startup every time.

  • Upvote 1
Posted

Unlike a lot of applications, Editpad Pro also overwrites on pasting, if you pressed the Insert key to switch from Insert to Overwrite mode :)

And if you specifically tab to the bytes part in hex mode, it'll perfectly paste byte codes copied as text as the actual bytes.

  • 4 years later...
Posted

Anyone tried converting these fixes to the other versions of the game/exe? Also several of the referencing posts listed in the documentation are missing or broken. I assume you upgraded this forum at one point. I say that because the same thing happened to the Quake forums (I have multiple tastes in video games).

  • 3 months later...
Posted (edited)

Hi!
What other versions do you refer? I applied those mods to v1.07 EU if I remember correctly.
If you want all documentation send me mp and I'll send you all stuff I worked for.

Edited by drnovice
  • 5 years later...
Posted (edited)

I decided to revisit Dune 2 modding and found the HEX editing collection very useful!

However, I need to note that in the file 0x047D00 fix loop reinforcements.pdf, the line you're suggesting to find

81 1f 50 16 8d 86 5e ff 50 9a f8 3a 00 00 83 c4

occurs multiple times across the binary, so it's probably more handy to use Segra's original fix where he suggests to look for

16 8D 86 5E FF 50 9A F8 3A 00 00 83 C4 08 8B D8 8E C2

and replace the beginning with

6A 00 6A 00 90 90 

 

Edited by MrFlibble

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.