Ultimate Editor

Ultimate Editor; support/discussion/questions

Moderator: thunderchero

User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

this is what I am seeing for vanilla and mum

MUM
mum.jpg
mum.jpg (147.7 KiB) Viewed 2046 times
vanilla (same as you image)
vanilla.jpg
vanilla.jpg (130.86 KiB) Viewed 2046 times
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

weird, are those negative values set by UE? that case it is a bug of UE. :o
Last edited by Flocke on Mon Apr 25, 2022 9:32 am, edited 1 time in total.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

no it is code using a signed single byte
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

Ah sorry, I just realized what the problem is, the reference value is a single byte value. Those structure ids actually should not be changed at all and if they are automatically changed by UE, it indeed should prompt a warning!
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

Flocke wrote: Mon Apr 25, 2022 9:37 am if they are automatically changed by UE, it indeed should prompt a warning!
the list of values changed by UE is in;
source
ue\edit\exe\Trek.java starting at line 209

edit
personally I would like notifications when UE edits any location in trek.exe
with location, before and after values
but that might be asking too much
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

thunderchero wrote: Mon Apr 25, 2022 9:50 am personally I would like notifications when UE edits any location in trek.exe
I agree, and I dislike such changes to be sneaked in alot and already thought about it too, but it is so many, I am not sure how to address this.

Without having to add popups for every single trek.exe change, that both require alot of work and soon become annoying, one option might be to add another menu similar to the file listing, and collect all the changes. Then on save there could be one single prompt asking whether to apply those.

This actually shouldn't be too much work since all the trek.exe segments touched, already derive from a special InternalSegment class, and aren't applied until the changes are saved. As far I have found, each such segment further has an address and a size, and it is already stored whether the data got changed. Furthermore the existing save routine can be used to print out the changes to a byte stream, which then could be displayed and compared to the trek.exe code, instead of writing it to trek.exe itself.
If it goes well, it is simple logic and requires only a few code locations to be altered. :roll:
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

Flocke wrote: Mon Apr 25, 2022 6:17 pm I agree, and I dislike such changes to be sneaked in alot and already thought about it too, but it is so many, I am not sure how to address this.

Without having to add popups for every single trek.exe change, that both require alot of work and soon become annoying, one option might be to add another menu similar to the file listing, and collect all the changes. Then on save there could be one single prompt asking whether to apply those.

This actually shouldn't be too much work since all the trek.exe segments touched, already derive from a special InternalSegment class, and aren't applied until the changes are saved. As far I have found, each such segment further has an address and a size, and it is already stored whether the data got changed. Furthermore the existing save routine can be used to print out the changes to a byte stream, which then could be displayed and compared to the trek.exe code, instead of writing it to trek.exe itself.
If it goes well, it is simple logic and requires only a few code locations to be altered. :roll:
this was exactly how I expected it would be done.

before saving maybe a popup message with locations and code changes before and after, maybe with a check box (each change prechecked) but user could un-check each change if desired before saving.

plus in case of martial law issue above warning "structure ID exceeds signed single byte value limit"

Edit;
BTW MUM has another issue with UE
when a structures are changed it will adjust the main structure upgrade table.
I think UE is set to adjust table for either starting structure +8 upgrades or no upgrades, but since MUM has starting structure +4 upgrades the table gets messed up.
the only way I was able to get it to work was like this;
first 5 increase, but last 4 is same as last entry
row C,H,F,K,R
column upgrades
sections food, industry, energy, intel, research

Code: Select all

30 00 58 00 80 00 A8 00 D0 00 
31 00 59 00 81 00 A9 00 D1 00 
32 00 5A 00 82 00 AA 00 D2 00 
33 00 5B 00 83 00 AB 00 D3 00 
34 00 5C 00 84 00 AC 00 D4 00 
34 00 5C 00 84 00 AC 00 D4 00 
34 00 5C 00 84 00 AC 00 D4 00 
34 00 5C 00 84 00 AC 00 D4 00
34 00 5C 00 84 00 AC 00 D4 00 

2A 00 52 00 7A 00 A2 00 CA 00 
2B 00 53 00 7B 00 A3 00 CB 00 
2C 00 54 00 7C 00 A4 00 CC 00 
2D 00 55 00 7D 00 A5 00 CD 00 
2E 00 56 00 7E 00 A6 00 CE 00 
2E 00 56 00 7E 00 A6 00 CE 00 
2E 00 56 00 7E 00 A6 00 CE 00
2E 00 56 00 7E 00 A6 00 CE 00 
2E 00 56 00 7E 00 A6 00 CE 00 

3A 00 62 00 8A 00 B2 00 DA 00 
3B 00 63 00 8B 00 B3 00 DB 00 
3C 00 64 00 8C 00 B4 00 DC 00 
3D 00 65 00 8D 00 B5 00 DD 00 
3E 00 66 00 8E 00 B6 00 DE 00 
3E 00 66 00 8E 00 B6 00 DE 00
3E 00 66 00 8E 00 B6 00 DE 00 
3E 00 66 00 8E 00 B6 00 DE 00 
3E 00 66 00 8E 00 B6 00 DE 00 

3F 00 67 00 8F 00 B7 00 DF 00 
40 00 68 00 90 00 B8 00 E0 00 
41 00 69 00 91 00 B9 00 E1 00 
42 00 6A 00 92 00 BA 00 E2 00 
43 00 6B 00 93 00 BB 00 E3 00
43 00 6B 00 93 00 BB 00 E3 00 
43 00 6B 00 93 00 BB 00 E3 00 
43 00 6B 00 93 00 BB 00 E3 00 
43 00 6B 00 93 00 BB D0 E3 00 

35 00 5D 00 85 00 AD 00 D5 00 
36 00 5E 00 86 00 AE 00 D6 00 
37 00 5F 00 87 00 AF 00 D7 00 
38 00 60 00 88 00 B0 00 D8 00
39 00 61 00 89 00 B1 00 D9 00 
39 00 61 00 89 00 B1 00 D9 00 
39 00 61 00 89 00 B1 00 D9 00 
39 00 61 00 89 00 B1 00 D9 00 
39 00 61 00 89 00 B1 00 D9 00
with relocation table I should be able to create new smaller table UE would not edit but have not attempted.
User avatar
Deimos
Lieutenant-Commander
Lieutenant-Commander
Posts: 168
Joined: Sat Apr 26, 2008 2:00 am

Re: Ultimate Editor

Post by Deimos »

Is anyone else having trouble downloading UE?
I've tried with Chrome and Edge, but it just won't let me download it.
If I tick the box beside the zip file, the download as zip button dissapears.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

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
link.jpg (224.89 KiB) Viewed 1950 times
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

Don't bother with that old version any longer! :D
0.8.1 is ready, I just am waiting for TC, whether he throws another save game issue at me I need to fix asap. ;) ;)
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

Flocke wrote: Tue Apr 26, 2022 7:14 am I just am waiting for TC, whether he throws another save game issue at me I need to fix asap. ;) ;)
no new issues that I know of, but on latest game I have had a strange saving issue.

I have played 6-8 game in last couple months of MUM as klingons romulans feds no issues, but my latest game as cardassians when 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.

when playing as klingons romulans feds I used 1 save slot (same slot) every time and was able to save without issues.

just not sure even where to start to look for this issue.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

thunderchero wrote: Tue Apr 26, 2022 8:10 am my latest game as cardassians when 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.

when playing as klingons romulans feds I used 1 save slot (same slot) every time and was able to save without issues.

just not sure even where to start to look for this issue.
Weird, but you should check the windows event log, there should be an application error listed with asm offset that can be looked up in ida and might bring some light to the issue.

I'll do some final testing on UE and if there's nothing serious, I will release an update later the day.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7962
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: Ultimate Editor

Post by thunderchero »

Flocke wrote: Tue Apr 26, 2022 9:53 am Weird, but you should check the windows event log, there should be an application error listed with asm offset that can be looked up in ida and might bring some light to the issue.
it looks to lead no where (unrelated location) it is almost like windows log offset is off like you post on a different issue.

4f1179 0x000f0579
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3258
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: Ultimate Editor

Post by Flocke »

thunderchero wrote: Tue Apr 26, 2022 11:26 am 4f1179 0x000f0579
The address is relative to the image base address to where trek.exe is loaded in the virtual address space:
imagebase.jpg
imagebase.jpg (18.44 KiB) Viewed 1906 times
So you need to look up 0x004f0579
That location however doesn't tell me anything meaningful in ida. :(


Regarding UE, I found another save issue I need to fix. It has to wait till weekend, sry. :???:
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1955
Joined: Sun Apr 27, 2008 2:00 am

Re: Ultimate Editor

Post by Spocks-cuddly-tribble »

thunderchero wrote: Sun Apr 24, 2022 8:50 pmquestion is how can I fix issue in MUM without rearranging structure list? looks like I will be adding code to relocation table area.
your problem is this:

Code: Select all

66:83FA XX     CMP DX, XX   (reference byte sign extension)
You need this (+1 byte each)

Code: Select all

66:81FA XXXX   CMP DX, XXXX (reference word)  eg. 66:81FA 1D00   CMP DX,1D


This should work for any IDs:

Code: Select all

0044D0EB     66:81FA XXXX   CMP DX,ID1
0044D0F0    ^74 EB          JE SHORT 44D0DD
0044D0F2     66:81FA XXXX   CMP DX,ID2
0044D0F7    ^74 E4          JE SHORT 44D0DD
0044D0F9     66:81FA XXXX   CMP DX,ID3
0044D0FE    ^74 DD          JE SHORT 44D0DD
0044D100     66:81FA XXXX   CMP DX,ID4
0044D105    ^74 D6          JE SHORT 44D0DD
0044D107     66:81FA XXXX   CMP DX,ID5
0044D10C    ^74 CF          JE SHORT 44D0DD
0044D10E    ^EB A8          JMP SHORT 44D0B8
0044D110     90             NOP
0044D111     90             NOP

The same limit is here (byte signed):

Code: Select all

0044D0D7                 cmp     dx, 12h

thunderchero wrote: Tue Apr 26, 2022 11:26 amit looks to lead no where (unrelated location) it is almost like windows log offset is off

4f1179 0x000f0579
Seems so, looks like code for energy screen, not loading/saving games.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
Post Reply

Return to “Ultimate Editor”