Jump to content
drnovice

Hex Editing Collection on EXE

Recommended Posts

Nice!

Which of these values are modified compared to the original settings (apart from the Palace one that is)?

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×