yes it would fix issue, but any time UE is used it would auto correct in wrong location.
Ultimate Editor
Moderator: thunderchero
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
- Spocks-cuddly-tribble
- Code Master
- Posts: 1532
- Joined: Sun Apr 27, 2008 2:00 am
Re: Ultimate Editor
Like Flocke said, some building IDs shouldn't be changed (0x12, morale programs and so on).thunderchero wrote: ↑Tue Apr 26, 2022 12:55 pmyes it would fix issue, but any time UE is used it would auto correct in wrong location.
So wrt UE either:
- prevent changing them
- limit max IDs to 7F
- use extension code
I read your request as workaround for MUM.

I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
I was about to edit my post when you replied. I might still be able to use it by properly placing the nop and only editing the last 2?
but will have to look at it closer later.
- Spocks-cuddly-tribble
- Code Master
- Posts: 1532
- Joined: Sun Apr 27, 2008 2:00 am
Re: Ultimate Editor
Be careful, some of them are max index IDs for main research buildings (in vanilla same value as max building index)!Flocke wrote: ↑Sun Apr 24, 2022 9:52 amThe EdificePatcher further patches the max building indexes at following offsets:
0x4f8e5, 0x4f90e, 0x4fad8, 0x53105,
0x851c3, 0x85296, 0x85345, 0x853d0,
0x8544f, 0x85475, 0x85926, 0x85f39,
0x8602b, 0x86240, 0x862e3, 0x8636e,
0x86394, 0x86755, 0x8680f, 0x868ec,
0x869cd, 0x86abd
Code: Select all
00485DC1 cmp ecx, 13Dh // 0x851c3
00485E94 cmp ecx, 13Dh // 0x85296
00485F43 cmp ecx, 13Dh // 0x85345
00485FCE cmp ecx, 13Dh // 0x853d0
0048604D cmp ecx, 13Dh // 0x8544f
00486E3E cmp ecx, 13Dh // 0x86240
00486EE1 cmp ecx, 13Dh // 0x862e3
00486F6C cmp ecx, 13Dh // 0x8636e
The max building index can be larger in mods!
Peter1984 removed them from the main list: viewtopic.php?p=21852#p21852
If you insist of having your above MUM morale program building IDs at the same locations as in vanilla, try this:thunderchero wrote: ↑Tue Apr 26, 2022 1:10 pmI might still be able to use it by properly placing the nop and only editing the last 2?
Code: Select all
@ 44D0EF:
jz short loc_44D109 -> 44D0DD
cmp dx, ID2 (keep vanilla code with your new ID)
jz short loc_44D109 -> 44D0DD
cmp dx, ID3 (keep vanilla code with your new ID)
jz short loc_44D109 -> 44D0DD
66:81FA XXXX CMP DX,ID4
JE SHORT 44D0DD
mov bx, ID5
cmp bx,dx
JE SHORT 44D0DD
JMP SHORT 44D0B8
nop...

I think it's some random vanilla glitch. Back in the day it happened to me more often when either saving via keyboard or mouse confirmation (don't recall which variant increased chance).thunderchero wrote: ↑Tue Apr 26, 2022 8:10 amwhen I overwrite an old save when I click "accept" button game will just close. no crash log and it is random, and on reload I can not duplicate.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
Re: Ultimate Editor
Ah hmm I was using the link from the original post, which goes to 4shared.thunderchero wrote: ↑Tue Apr 26, 2022 6:45 am just tested downloading on chrome without issues
are you sure you are selecting correct link it is only link text not a box
link.jpg
Can you possibly reply with the link please?
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
Much appreciated, thanks 

- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
When testing latest UE modded_save_detection build I am getting this error and tracked it down to this patch used by MUMSpocks-cuddly-tribble wrote: ↑Tue Apr 26, 2022 3:20 pm If you insist of having your above MUM morale program building IDs at the same locations as in vanilla, try this:
But Flocke and me won't like you anymore....Code: Select all
@ 44D0EF: jz short loc_44D109 -> 44D0DD cmp dx, ID2 (keep vanilla code with your new ID) jz short loc_44D109 -> 44D0DD cmp dx, ID3 (keep vanilla code with your new ID) jz short loc_44D109 -> 44D0DD 66:81FA XXXX CMP DX,ID4 JE SHORT 44D0DD mov bx, ID5 cmp bx,dx JE SHORT 44D0DD JMP SHORT 44D0B8 nop...
![]()
the morale program buildings all show properly as "martial Law" for correct race.
so it is picking up the ID's But see's changed code.
- Flocke
- BORG Trouble Maker
- Posts: 2980
- Joined: Sun Apr 27, 2008 2:00 am
- Location: Hamburg, Germany
- Contact:
Re: Ultimate Editor
Simply don't use that flawed patch. SCT should get arrested for even having made that dreadful suggestion! 
The martial law ID must not be increased above limit, point!
Doing a patch for this is not worth the trouble. If I do a patch it must work for all the id limited buildings, and it should be forcefully applied to all the mods + vanilla, or at least there must be a serious reason, not just for better human readable sorting of those entries. Move the Tribunal and other limited special buildings to the top and you are fine.

The martial law ID must not be increased above limit, point!
Doing a patch for this is not worth the trouble. If I do a patch it must work for all the id limited buildings, and it should be forcefully applied to all the mods + vanilla, or at least there must be a serious reason, not just for better human readable sorting of those entries. Move the Tribunal and other limited special buildings to the top and you are fine.

- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
I went with option 2Flocke wrote: ↑Wed Sep 21, 2022 2:59 am Simply don't use that flawed patch. SCT should get arrested for even having made that dreadful suggestion!
The martial law ID must not be increased above limit, point!
Doing a patch for this is not worth the trouble. If I do a patch it must work for all the id limited buildings, and it should be forcefully applied to all the mods + vanilla, or at least there must be a serious reason, not just for better human readable sorting of those entries. Move the Tribunal and other limited special buildings to the top and you are fine.![]()
I moved the offending code to relocation table leaving the vanilla code in original location.
UE is happy now
I did not have to re-sort structure list
I will add a note, if martial Law structures moved, manual editing of ID's would be required at x locations.
edit;
here is the patch for MUM if you want it for testing
Code: Select all
NAME: moving matrial law id's
AUTHOR: thunderchero
DESC: This patch moves martial law structures id's at 0x0004c4e6 to relocation table
DESC: patch file name: MUM_martial_law.patch
URL: https://www.armadafleetcommand.com/onscreen/botf/viewtopic.php?p=57328#p57328
# >> = vanilla/original value
# << = new value
>> 0x0004c4e6 83 fe 07 75 27
>> 0x0004c4f0 ec
>> 0x0004c4f6 e6
>> 0x0004c4fc e0
>> 0x0004c4fe 81
>> 0x0004c501 00 74 d9 66 bb
>> 0x0004c507 00 66 3b da 74 d0 eb a9 90 90 90
>> 0x001a0000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 0x001a002c 00 00 00 00 00 00 00 00 00
>> 0x001a0036 00 00 00 00 00 00 00 00 00 00 00 00 00 00
<< 0x0004c4e6 e9 15 db 23 00
<< 0x0004c4f0 18
<< 0x0004c4f6 12
<< 0x0004c4fc 0c
<< 0x0004c4fe 83
<< 0x0004c501 74 06 66 83 fa
<< 0x0004c507 75 af b8 01 00 00 00 5f 5e 59 c3
<< 0x001a0000 83 fe 07 0f 85 09 25 dc ff 66 83 fa 1d 0f 84 ca 24 dc ff 66 83 fa 6d 0f 84 c0 24 dc ff 66 83 fa 45 0f 84 b6 24 dc ff 66 81 fa 95
<< 0x001a002c 0f 84 ab 24 dc ff 66 bb bd
<< 0x001a0036 66 3b da 0f 84 9e 24 dc ff e9 74 24 dc ff
- Flocke
- BORG Trouble Maker
- Posts: 2980
- Joined: Sun Apr 27, 2008 2:00 am
- Location: Hamburg, Germany
- Contact:
Re: Ultimate Editor
I dunno what that's worth for, but as long you keep things documented... 
the patch looks to be compatible

the patch looks to be compatible
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
that is good to hear.
I had already tested on the latest UE modded_save_detection build I downloaded yesterday.
I really loved the better human readable sorting of all the categories.

My favorite was the trek changes "investigate" button, when it compares code change if possible could it highlight changed bytes I had a hard time seeing them.
Right now it looks like an all new version of UE and I am very impressed.
- Flocke
- BORG Trouble Maker
- Posts: 2980
- Joined: Sun Apr 27, 2008 2:00 am
- Location: Hamburg, Germany
- Contact:
Re: Ultimate Editor
Will do, already troubled on it myself.thunderchero wrote: ↑Wed Sep 21, 2022 9:08 pm My favorite was the trek changes "investigate" button, when it compares code change if possible could it highlight changed bytes I had a hard time seeing them.

By the work I put into this it feels like a complete overhaul indeed. Just watch the change log.thunderchero wrote: ↑Wed Sep 21, 2022 9:08 pm Right now it looks like an all new version of UE and I am very impressed.

The many code refactoring ofc isn't even part of the log.
- thunderchero
- Site Administrator aka Fleet Admiral
- Posts: 7369
- Joined: Fri Apr 25, 2008 2:00 am
- Location: On a three month training mission, in command of the USS Valiant.
- Contact:
Re: Ultimate Editor
I looked at this saved game with UE new "ultimate-editor-modded_save_detection" version.
it found a few normal error, but this save has a strange problem. save info;
FMPM beta 6a , MPR++, widescreen, rom vs klingons
player can not connect on this saved game anymore
gameranger,
both player are able to get to race selection screen but can not see each other. host player will show t4 start on all race while joining player will show t1 start on all race. when one player leave without starting game, it will display popup "unknown player has left"
mpr hotseat,
host player will get to race selection screen
joining player will see game name and can select game but when join button is selected the game will be remove from list after a couple seconds.
the same player can connect with new game without any issues.
btw this is RSE_Chris and RSE_Dissy so they have MP connection experience.
it found a few normal error, but this save has a strange problem. save info;
FMPM beta 6a , MPR++, widescreen, rom vs klingons
player can not connect on this saved game anymore
gameranger,
both player are able to get to race selection screen but can not see each other. host player will show t4 start on all race while joining player will show t1 start on all race. when one player leave without starting game, it will display popup "unknown player has left"
mpr hotseat,
host player will get to race selection screen
joining player will see game name and can select game but when join button is selected the game will be remove from list after a couple seconds.
the same player can connect with new game without any issues.
btw this is RSE_Chris and RSE_Dissy so they have MP connection experience.
- Spocks-cuddly-tribble
- Code Master
- Posts: 1532
- Joined: Sun Apr 27, 2008 2:00 am
UE Minor Race Table Deviation vs readrace crashes
Trek.exe code reading the minor race max numbers has a -1 deviation bug. UE compensates this by adding +1 to user inputs.
Problem is this workaround increases crashes during the galaxy generation: File: ..\..\source\universe\readrace.c, Line: 257, 0
Deviation fix:
>> 0xB0FDA 04
<< 0xB0FDA 05
>> 0xB1008 04
<< 0xB1008 05
So we need at least a warning note in UE interface if an other solution is too much work (e.g. a check/switch for above fix code).
This fix is for the same issue, but doesn't affect the numbers in the table (prevents empire IDs for random minors):
>> 0xB12D7 23
<< 0xB12D7 1E
>> 0xB12E0 89 D0 31 D2 66 89 C2
<< 0xB12E0 83 C2 05 8B C2 90 90
EDIT: Just tested ECM 800x600 large maps (minor settings still 31 0x1F) many galaxies with both patches without issues (but I didn't count the minors). EDIT2: Nope, I got an endless loop instead of readrace crash and number of minors is far below the table min/max 31 (with large/irregular, so I have to update min/max tables in larger maps patch to max 30 with the min values being lower than the max values (as intended by the feature).
Problem is this workaround increases crashes during the galaxy generation: File: ..\..\source\universe\readrace.c, Line: 257, 0
Deviation fix:
>> 0xB0FDA 04
<< 0xB0FDA 05
>> 0xB1008 04
<< 0xB1008 05
So we need at least a warning note in UE interface if an other solution is too much work (e.g. a check/switch for above fix code).
This fix is for the same issue, but doesn't affect the numbers in the table (prevents empire IDs for random minors):
>> 0xB12D7 23
<< 0xB12D7 1E
>> 0xB12E0 89 D0 31 D2 66 89 C2
<< 0xB12E0 83 C2 05 8B C2 90 90
EDIT: Just tested ECM 800x600 large maps (minor settings still 31 0x1F) many galaxies with both patches without issues (but I didn't count the minors). EDIT2: Nope, I got an endless loop instead of readrace crash and number of minors is far below the table min/max 31 (with large/irregular, so I have to update min/max tables in larger maps patch to max 30 with the min values being lower than the max values (as intended by the feature).
Last edited by Spocks-cuddly-tribble on Tue Oct 11, 2022 5:17 pm, edited 1 time in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.