Help Needed on Hex Editor Neo

General Modding Information/Questions; support/discussion/questions

Moderator: thunderchero

Forum rules
:idea: Please search before starting new topic. :idea:
There is a good chance it has already been asked.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3237
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Help Needed on Hex Editor Neo

Post by Flocke »

and make backups ;)
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2403
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Re: Help Needed on Hex Editor Neo

Post by Tethys »

You must make sure NOT TO CHANGE trek.exe FILE SIZE. If it asks you this will change file size, say NO. You did not enter the bytes correctly.
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

i think thats what i did save the file size in order for it not to work but il start again when i get time
When will we have another Enterprise-E?
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

Ok im back and readly meddle this is what i see when i load up the B8 Offset by the way iv set the production value to 9 on the colony ships so all that is done
When will we have another Enterprise-E?
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: Help Needed on Hex Editor Neo

Post by QuasarDonkey »

Okay, you're in the right place. Now you need to know what hexadecimal is.

As you know, counting in decimal is like 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11...
Counting in hexadecimal (hex) is like 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F, 10, 11... 19, 1A, 1B...

All the numbers you see in the hex editor are in hexadecimal, not decimal.

In your image, you see 64? That's 64 hex, which is 100 decimal. That's the starting population of the colony, 100.

Skip three bytes (00's). See the next number listed is 0a. That's 0a hex, which is 10 in decimal. That's the number of farms.

Skip three bytes (00's). The next number is again 0a. That's factories, so 10 factories.

This converter will translate decimal numbers into hex numbers for you.

So if you wanted 20 factories, you'd go to that convertor, type in 20, and it tells you that 20 decimal is 14 hex. So you overwrite 0a (10) with 14 (20).

Make sure you don't insert the numbers, or it will ruin Trek.exe. You have to overwrite. Like what tethys said about changing the size of Trek.exe.

The next thing you need to know is that there are different colony ship levels. So those first three numbers were for colony level 1. The next three numbers are for colony level 2. Et cetera. It's the same for each level: Population, Farms, Factories. You'll have to set the hex numbers for each level (or at least for the first few of them).

I hope that helps. Hex can be a bit tricky if you've never seen it before.
User avatar
adi
Commander
Commander
Posts: 442
Joined: Sun Aug 12, 2012 6:53 pm
Location: US East Coast

Re: Help Needed on Hex Editor Neo

Post by adi »

QuasarDonkey wrote: The next thing you need to know is that there are different colony ship levels. So those first three numbers were for colony level 1. The next three numbers are for colony level 2. Et cetera. It's the same for each level: Population, Farms, Factories. You'll have to set the hex numbers for each level (or at least for the first few of them).
by colony level 1 he means colony ship with production set to 1 from UE etc... From the values, colony ship level 1 looks like the heavy colony ship from UDM (prod:1 pop:100(64 in hex), farms:10(0A in hex), factories:10(0A in hex). Then next 2 look like colonyShip1 (prod:2) and colonyShip2 (prod:3)
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

Hi Quaser i only see 1 0a in the b8 coloum but however on the 0018e2co coloum i do see another 0a coloum is that the one with the factories? also the converter is showing that in order to get 30 factories u need to change the code to 1E Is this correct?
When will we have another Enterprise-E?
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: Help Needed on Hex Editor Neo

Post by QuasarDonkey »

pal28 wrote:Hi Quaser i only see 1 0a in the b8 coloum but however on the 0018e2co coloum i do see another 0a coloum is that the one with the factories? also the converter is showing that in order to get 30 factories u need to change the code to 1E Is this correct?
Yes, that's correct: 0018e2c0 is the number of factories (b8 column is population, bd is farms, c0 is factories).

And yes, 1E is the right value if you want 30 factories.
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

Exellent now just need to find the overwrite button on the hex editor neo which i cant seem to find i think i knw what im doing now i just need this bloody overwride button
When will we have another Enterprise-E?
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: Help Needed on Hex Editor Neo

Post by QuasarDonkey »

There may not be a button for it. Just click on the byte you want to edit, and start typing in the new value (1E). If it asks you to insert or overwrite, choose the overwrite option.

You should be able to tell if it's overwriting: if all the bytes to the right of the column shift right, then it's inserting (bad). Otherwise you're okay.
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

Hi quaser just to let you know iv successfully made changes to hex editor when colonised I now have 30farms and 30 factories im now bit of a code anaylist myself lol :grin: I finally understand this thing now but I just need the code for the plasma reactors as I want 16 ready made so I can colonise a lot more and not spend ages in building stuff
When will we have another Enterprise-E?
User avatar
QuasarDonkey
Code Analyst
Code Analyst
Posts: 433
Joined: Tue Jul 26, 2011 8:29 pm
Location: Ireland

Re: Help Needed on Hex Editor Neo

Post by QuasarDonkey »

Okay Pal. Now you know about hex editing, and how easy it is to make a mistake. And if you make a mistake, it's very hard to go back and fix it.

That's why I created the BoF Patcher. You store the hex code in patch files, and the BoF Patcher program can install or remove the patches by clicking a few buttons.

Here's a BoF Patcher file that changes Trek.exe to make better colonies:

Code: Select all

NAME: Better Colonies
DESC: Changes the code for colony starting values, and replaces the colony table. Starting colonies now have more buildings based on the production level of the colony ship.
AUTHOR: Spocks-cuddly-tribble
AUTHOR: Gowron
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?f=9&t=64

# Colonies Starting Pop and Buildings - original code:
>> 0x068f54              8b 94 24 e0  01 00 00 31 c0 8a 42 34
>> 0x068f60  8d 94 24 bc 00 00 00 e8  b4 b5 fd ff 85 c0 75 1c
>> 0x068f70  b9 0c ac 57 00 be 5d 0b  00 00 b8 84 a8 57 00 89
>> 0x068f80  cb 89 f2 e8 28 e6 09 00  85 c0 75 ee 8d 1c bd 00
>> 0x068f90  00 00 00 29 fb c1 e3 02  8b b3 bc 04 59 00 31 c9
>> 0x068fa0  85 f6 7e 20 31 d2 8b 45  0a 66 8b 94 24 0c 01 00
>> 0x068fb0  00 c1 f8 10 41 e8 36 c2  fd ff 3b 8b bc 04 59 00
>> 0x068fc0  7c e2 8b c0 8b 94 24 e0  01 00 00 31 c0 8a 42 34
>> 0x068fd0  8d 54 24 0c e8 87 b4 fd  ff 85 c0 75 1f be 1c ac
>> 0x068fe0  57 00 b9 84 a8 57 00 ba  63 0b 00 00 89 f3 89 c8
>> 0x068ff0  e8 bb e5 09 00 85 c0 75  ee 8d 40 00 8d 1c bd 00
>> 0x069000  00 00 00 29 fb c1 e3 02  8b 93 c0 04 59 00 31 c9
>> 0x069010  85 d2 7e 1c 31 d2 8b 45  0a 66 8b 54 24 5c c1 f8
>> 0x069020  10 41 e8 c9 c1 fd ff 3b  8b c0 04 59 00 7c e5 90

# Colonies Starting Pop and Buildings - new code:
<< 0x068F54              0F B6 42 4C  89 44 24 0C 6B FF 0C 81
<< 0x068f60  C7 BC 04 59 00 33 F6 89  74 24 10 80 3F 00 74 4C
<< 0x068f70  8B 44 24 0C 8D 54 24 20  6B CE 03 C1 E1 06 BB 20
<< 0x068f80  51 44 00 2B D9 90 FF D3  90 90 0F B6 94 24 85 00
<< 0x068f90  00 00 8B 44 24 0C E8 E5  9A FE FF 48 90 90 3C 08
<< 0x068fa0  7E 02 B0 08 33 C9 0F B7  5C 24 70 03 D8 8B 45 0C
<< 0x068fb0  8B D3 E8 39 C2 FD FF 41  3A 0F 7C F1 47 FE 44 24
<< 0x068fc0  10 8B 74 24 10 83 FE 05  7C A1 74 44 90 90 90 90
<< 0x068fd0  8B 8C 24 E4 01 00 00 83  79 04 01 75 53 0F B6 07
<< 0x068fe0  01 41 40 80 7F 01 01 75  47 8B 41 44 E8 93 0A FD
<< 0x068ff0  FF 8B D0 8B 45 0C E8 F5  C1 FD FF EB 33 90 90 90
<< 0x069000  90 90 90 90 90 90 90 90  90 90 90 90 90 90 90 90
<< 0x069010  8B 44 24 0C 0F B6 B0 EB  9D 46 00 E9 4B FF FF FF
<< 0x069020  90 90 90 90 90 90 90 90  90 90 90 90 90 90 90 90

# Colony Starting Pop/Buildings Index Bug Fix - original code:
>> 0x068EE1  83 ff ff 0f 8e b3 02 00 00

# Colony Starting Pop/Buildings Index Bug Fix - new code:
<< 0x068EE1  4F 83 FF FF 7F 02 33 FF 90

# Starting Pop and Buildings Table - original data:
>> 0x018e2b8  0a 00 00 00 01 00 00 00 00 00 00 00
>> 0x018e2c4  0a 00 00 00 02 00 00 00 00 00 00 00
>> 0x018e2d0  14 00 00 00 02 00 00 00 01 00 00 00
>> 0x018e2dc  14 00 00 00 03 00 00 00 01 00 00 00
>> 0x018e2e8  1e 00 00 00 03 00 00 00 02 00 00 00
>> 0x018e2f4  1e 00 00 00 04 00 00 00 02 00 00 00
>> 0x018e300  28 00 00 00 04 00 00 00 03 00 00 00
>> 0x018e30c  28 00 00 00 05 00 00 00 03 00 00 00
>> 0x018e318  32 00 00 00 05 00 00 00 04 00 00 00

# Starting Pop and Buildings Table - new data:
# New 12 byte entry structure of the colony ship production table at 0x18E2B8: 
#    1-4 starting population (unchanged)
#    => Number of main buildings:
#    5 - Food
#    6 - Industry
#    7 - Energy
#    8 - Research
#    9 - Intel
#    10 - Race specific bonus buildings (see below)
#    => AI bonuses:
#    11 - AI starting pop bonus (i.e. +value from byte 1-4)
#    12 - 1= AI extra starting shipyard
# 
# Sane defaults:
#             Pop         Fd In En Re Il Bonuses
<< 0x018e2b8  0a 00 00 00 01 00 00 00 00 00 00 00
<< 0x018e2c4  0a 00 00 00 02 00 00 00 00 00 00 00
<< 0x018e2d0  14 00 00 00 02 01 00 00 00 00 00 00
<< 0x018e2dc  14 00 00 00 03 01 00 00 00 00 00 00
<< 0x018e2e8  1e 00 00 00 03 02 01 00 00 00 00 00
<< 0x018e2f4  1e 00 00 00 04 02 01 00 00 00 00 00
<< 0x018e300  28 00 00 00 04 03 02 01 01 00 00 00
<< 0x018e30c  28 00 00 00 05 03 02 01 01 00 00 00
<< 0x018e318  32 00 00 00 05 04 03 02 02 00 00 00
Just copy-paste all that code above, and save it to a file called better_colonies.patch. (If using MS Notepad, make sure you choose "All Files" instead of "Text Files" when saving, otherwise notepad will rename it to better_colonies.patch.txt). Then put that patch file in BoF Patcher's patches folder. Run the patcher program, and the patch will be listed as Better Colonies. Install, apply. Test it out.

But that won't give you much more starting tech.

At the very end of the patch file, delete the table where it says "Sane defaults", and paste in this if you want some serious starting tech :twisted:

Code: Select all

#             Pop         Fd In En Re Il Bonuses
<< 0x018e2b8  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e2c4  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e2d0  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e2dc  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e2e8  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e2f4  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e300  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e30c  7f ff 00 00 64 64 64 64 64 00 00 00
<< 0x018e318  7f ff 00 00 64 64 64 64 64 00 00 00
But don't forget, this applies to your opponents' colonies too!
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

Hi quaser i dont need the patch to be honest all i just need is the codes for the plasma reactors i do feel i wont make a mistake i know i did 1st time but i got it right 2nd time so if u can can u provide me with the code for plasma reactors and also iv noticed that all empires colonise when i colonise aswell u were right about it applying to other races
When will we have another Enterprise-E?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7929
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Help Needed on Hex Editor Neo

Post by thunderchero »

pal28 wrote:i dont need the patch to be honest all i just need is the codes for the plasma reactors
that patch is for plasma reactors.

thunderchero
User avatar
pal28
Commander
Commander
Posts: 411
Joined: Tue Aug 14, 2012 9:40 am
Contact:

Re: Help Needed on Hex Editor Neo

Post by pal28 »

thunderchero wrote:that patch is for plasma reactors.
[/quote]

Will i have to edit the replicators to my liking or will it be already on 1E?
When will we have another Enterprise-E?
Post Reply

Return to “General Modding Information/Questions”