adapting UE for structures above tech ten

Ultimate Editor; support/discussion/questions

Moderator: thunderchero

User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: adapting UE for structures above tech ten

Post by Flocke »

Spocks-cuddly-tribble wrote: Thu Apr 21, 2022 1:35 pm The uploaded vanilla save shows an example of a messed up player display (actually there is only two cruisers):
Thanks, I checked it now, it is the same temporary id issue which I already fixed for the MUM save posted by thunderchero.
temp_id_duplicates.jpg
temp_id_duplicates.jpg (71.08 KiB) Viewed 1601 times
UE integrity check reads:
dup_tempid_int_chk.jpg
dup_tempid_int_chk.jpg (77.19 KiB) Viewed 1601 times
I however keep the save for reference in case I further tweak the integrity checks. Further I noticed a small mistake that I fixed. (messed GTForceList and GWTForce for the result.lst TF reference check)
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1884
Joined: Sun Apr 27, 2008 2:00 am

Re: adapting UE for structures above tech ten

Post by Spocks-cuddly-tribble »

Your error report lists a cardassian AI ordInfo bug wrt training vs attack. Does this imply fiddling with own task forces can corrupt another empires' ship orders?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: adapting UE for structures above tech ten

Post by Flocke »

Spocks-cuddly-tribble wrote: Sat Apr 23, 2022 12:06 pm Your error report lists a cardassian AI ordInfo bug wrt training vs attack. Does this imply fiddling with own task forces can corrupt another empires' ship orders?
From what I observed it is common that in some cases the task force mission is not updated by the ai. Further at least for the move order it is valid that the task force mission is set to evade or engage instead.

This case the train crew order is assigned to the task force the next turn, so I fixed the check to update the task force mission instead.
not_training.jpg
not_training.jpg (16.4 KiB) Viewed 1586 times
training.jpg
training.jpg (16.41 KiB) Viewed 1586 times
The check however is new and might fail in some other cases.

Further I noticed that UE messes the sorting of the task forces. This however is a small penalty in benefit for a sorted task force id lookup when manually editing the hex files, so I keep it.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: adapting UE for structures above tech ten

Post by Flocke »

thunderchero wrote: Tue Mar 29, 2022 6:50 am would it be possible to add a Edifice patch detection? if new format reset to original format then on close reset to new format if it detects structures above tech 10?

edit; don't forget we do have source code for Edifice patcher
files can be found in this post
viewtopic.php?p=53975#p53975
Lets get back to topic. I researched forums on edifice.bst and checked the edifice.zip file attached in above post.
The file format luckily is pretty much the same, and is very well documented in viewtopic.php?f=261&t=1597

What changed indeed is the tech map, which currently is hard-coded by UE to 10 tech levels and got doubled to 20.

From 492 bytes (1ECh):
0x08-0x17 = 7 short numbers of buildings per tech requirement + empty 32bit alignment
7 * [tech requirement] = 7 * 68 bytes = 476 bytes (1DCh)
0x18-0x3F = 10 * [tech level] 4 byte address of first building
0x40-0x43 = 4 byte separator?
0x44-0x57 = 10 * [tech level] 2 byte number of buildings
0x58-0x5B = 4 byte separator?

To 920 bytes (398h):
0x08-0x17 = 7 short numbers of buildings per tech requirement + empty 32bit alignment
7 * [tech requirement] = 7 * 128 bytes = 896 bytes (380h)
0x18-0x67 = 20 * [tech level] 4 byte address of first building
0x68-0x6B = 4 byte separator?
0x6C-0x93 = 20 * [tech level] 2 byte number of buildings
0x94-0x97 = 4 byte separator?

This will be easy to detect and fix for UE. More problematic would be the ignore list when exceeding 384 buildings. Does there exists a patch for extending the ignore list too, or is 384 buildings still a hard limit?
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: adapting UE for structures above tech ten

Post by thunderchero »

Flocke wrote: Sun Apr 24, 2022 7:09 am More problematic would be the ignore list when exceeding 384 buildings. Does there exists a patch for extending the ignore list too, or is 384 buildings still a hard limit?
no patch that I know of, UE allows more structures so I am not really sure of your question. or what "ignore list" you are talking about.
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: adapting UE for structures above tech ten

Post by Flocke »

With the ignore list I refer to viewtopic.php?f=261&t=1597:
DCER wrote: Fri Jul 09, 2010 6:59 am File Structure Overview
Offset 0x01F4 to 0x02E3 ignore list (240 bytes)
Ignore list

Code: Select all

For each empire (5)
    bit mask of all the buildings (48 bytes == 384 bits)
The bit index of a building in the list is calculated as 2^(building index) - 1

If the bit is set to 1, this means the building is ignored. The way UE sets these is it checks if the building can be build by the empire and then sets the bit to 0 (if it can) or 1 (if it can't).
Since that list has a fixed size of 240 bytes it would conflict with the onfollowing building data if exceeded.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7849
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Re: adapting UE for structures above tech ten

Post by thunderchero »

Hi Flocke,

just downloaded the latest "modded_save_detection" version.

awesome progress :up: :up:
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 3197
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Re: adapting UE for structures above tech ten

Post by Flocke »

thunderchero wrote: Sat Jul 30, 2022 4:21 pm awesome progress :up: :up:
thanks, I still have a few todos left before release, but it'll be this year for sure :D
Post Reply

Return to “Ultimate Editor”