Ultimate Editor

Ultimate Editor; support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7069
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

Post by thunderchero »

Spocks-cuddly-tribble wrote: Tue Apr 26, 2022 12:48 pm This should work for any IDs:
yes it would fix issue, but any time UE is used it would auto correct in wrong location.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1251
Joined: Sun Apr 27, 2008 2:00 am

Re: Ultimate Editor

Post by Spocks-cuddly-tribble »

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.
Like Flocke said, some building IDs shouldn't be changed (0x12, morale programs and so on).

So wrt UE either:

- prevent changing them
- limit max IDs to 7F
- use extension code

I read your request as workaround for MUM. :wink:
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7069
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

Post by thunderchero »

Spocks-cuddly-tribble wrote: Tue Apr 26, 2022 1:05 pm I read your request as workaround for MUM. :wink:
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.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1251
Joined: Sun Apr 27, 2008 2:00 am

Re: Ultimate Editor

Post by Spocks-cuddly-tribble »

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
Be careful, some of them are max index IDs for main research buildings (in vanilla same value as max building index)!

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


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?
If you insist of having your above MUM morale program building IDs at the same locations as in vanilla, try this:

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...
But Flocke and me won't like you anymore.... :razz:


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 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).
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Deimos
Lieutenant-Commander
Lieutenant-Commander
Posts: 140
Joined: Sat Apr 26, 2008 2:00 am

Re: Ultimate Editor

Post by Deimos »

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
Ah hmm I was using the link from the original post, which goes to 4shared.
Can you possibly reply with the link please?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7069
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

Post by thunderchero »

Deimos wrote: Tue Apr 26, 2022 6:13 pm Ah hmm I was using the link from the original post, which goes to 4shared.
Can you possibly reply with the link please?
https://gitlab.com/stbotf/ultimate-editor/-/releases
User avatar
Deimos
Lieutenant-Commander
Lieutenant-Commander
Posts: 140
Joined: Sat Apr 26, 2008 2:00 am

Re: Ultimate Editor

Post by Deimos »

Much appreciated, thanks :)
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7069
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

Post by thunderchero »

Spocks-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:

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...
But Flocke and me won't like you anymore.... :razz:
When testing latest UE modded_save_detection build I am getting this error and tracked it down to this patch used by MUM
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.
error.jpg
error.jpg (149.41 KiB) Viewed 133 times
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2865
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

Simply don't use that flawed patch. SCT should get arrested for even having made that dreadful suggestion! :P
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. :)
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7069
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

Post by thunderchero »

Flocke 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! :P
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 went with option 2
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
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2865
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

I dunno what that's worth for, but as long you keep things documented... :lol:
the patch looks to be compatible
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7069
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

Post by thunderchero »

Flocke wrote: Wed Sep 21, 2022 2:05 pm the patch looks to be compatible
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. :wink:

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.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2865
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

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.
Will do, already troubled on it myself. :grin:
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.
By the work I put into this it feels like a complete overhaul indeed. Just watch the change log. :smile:
The many code refactoring ofc isn't even part of the log.
Post Reply

Return to “Ultimate Editor”