techtree.tec - TalShiar operatives report successful mission

This forum is for outdated or irrelevant Modding Information that may or may not be 3 months old.

Moderator: thunderchero

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

Post by Tethys »

There is error in above code, when breakthrough next tech level, CTD no crash log... Will update when changes made correctly

EDIT: Further analysis suggests that the display value is located at 4D6378, subsequently this causes a crash when Tech breakthrough is achieved (i also tried editing every other 0B to 0C same results), however this could be due to lexicon (although no crash log suggests this, only speculation)

Perhaps I should try to nop the whole code? :/

EDIT2: Im leaving this for a later time, my mind needs time to regenerate *goes to alcove*
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
AlexMcpherson79
Commander
Commander
Posts: 326
Joined: Thu Sep 04, 2008 2:00 am

Post by AlexMcpherson79 »

*pokes head into threat, sees gibberish, pulls out*

*scratches head* Quantum Theory, sure. Understanding Temporal Paradoxes, Fine. Figuring out how space/time works as 7 dimensions, sure.

But Hex code... ouch.

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

Post by Tethys »

Just did another test and the replacement of 80 FB 0B with 80 FB 0C at 0xd5778 causes a crash no matter what level you are when you increase your tech level.

EDIT: hmm ok crash seems unrelated now to the change since i changed it back to test something... I will start from scratch with clean trek.exe, give me a while :P
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2075
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

*begins to dance uncontrollably*

Ok, here we go, just disregard all past Code changes... focus on these 2 only (this is assuming that you have correctly placed your new Tech 11 correctly in the techtree.tec file) :P

(asm 452C2A) 0x5202A

Code: Select all

66 83 FE 0B 
with

Code: Select all

66 83 FE 0C

AND



(asm 4D6378) 0xd5778

Code: Select all

80 FB 0B
with

Code: Select all

80 FB 0C
The first code allows ship of Tech 11 to be built in Shipbuilding screen without the need to restart the game; Second code will allow (for now) only 1 future tech to be displayed in Tech Field Database windows (all windows i believe, tho this is not fully tested), however the drawback is that the first Tech level of the following Tech field will be visible.

EDIT: First code was duplicate, fixed :oops:
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2075
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Interestingly, as a test I decided to create 1 extra Tech for each field, here is the result:
2vjr1uc.png
2vjr1uc.png (525.15 KiB) Viewed 2633 times
qs7drp.png
qs7drp.png (535.98 KiB) Viewed 2633 times
As you can see, as you move down the list (through the other tech fields) the new Tech pushes the following Tech, despite correctly naming/labeling them in techtree.tec file... so i assume that another one of those values that SCT posted last page has something to do with how many physical instances of Techs (in this case 12) will be displayed per Field, so this would mean that each time you added a new Tech, you would have to do so for every other Tech Field AND set the value to exactly how many Techs are supposed to be physically allowed in that particular category - this is speculation and needs testing, but Im too tired to do it now, so good night :D

EDIT: Hi Flocke I see ur online... hope u have some ideas, also take a look in my 4shared folder if you would like to play around with the Techs/see what u can come up with 8)

http://www.4shared.com/file/BBmiE8Ld/Techs.html
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2591
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

Tethys wrote:EDIT: Hi Flocke I see ur online... hope u have some ideas, also take a look in my 4shared folder if you would like to play around with the Techs/see what u can come up with 8)
I think you're on a good way, I'm watching the progress, but have to go on building the garden shed outdoor on this sunny day. ;)

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

Post by Tethys »

Well I tried messing with SCTs values... no luck. But I am almost certain that somewhere in the exe it calls to the specific locations within techtree.tec (fe. Basic Biotech location at 0x28, Basic Computer at 0x340, Basic Construction at 0x658)

I do not believe that trek.exe would call to the beginning of the name, but to its locator in techtree

Hellllppp meeeee Flocke i know u keep checking lol! :roll: <- back to bed for now...
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2591
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

My garden shed needs a roof, am sorry Tethys :lol:
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2075
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Im stuck... I got the Techs to show up but i cant get them to line up, I dont know where the calls to the techtree.tec locations would be :cry:

Its ok Flocke, if I could i would help u build it (really im pretty good with a drill :P) wanna pay for my round trip ticket? :lol:
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2591
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

Just had a short look at your files.
Beside you've forgotten to adjust the reference (label) number of biogenics, there must be a fixed pointer in trek.exe for the start entry of each technology. That would aquire too much of my time to search for currently. But I'm sure, when SCT finds some free time (He's more into it - and knows more about anyway :D) he'll find them. (havn't checked his discoveries on the subject yet either - he might have already found it, I dunno :lol:)

If you wanna try search yourself, the offset between those pointers should be 11*[entry size]. Alternatively it's the entry size again that gets multiplicated with current technology (bio: 1, comp: 2,...) to determine the start offset pointer. I'd normally expect the 2nd solution, so searching for the entry size value in trek.exe should bring up something.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2075
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Flocke wrote:Beside you've forgotten to adjust the reference (label) number of biogenics...
Did I? :oops:

Just so I understand this, either the 11 (which would be 0B) or the [entry size], but not both, must be changed according to how many physical Techs there are, and it seems it would be easier to change the 11 and not the [however many bytes this is]? (This might also allow an Add Tech Level function in UE) I suppose I will take another look at this when I (re)awaken later on today :P
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Flocke
BORG Trouble Maker
BORG Trouble Maker
Posts: 2591
Joined: Sun Apr 27, 2008 2:00 am
Location: Hamburg, Germany
Contact:

Post by Flocke »

whatever it is, it must be used by sub_4D62E0, cause that's the function listing the entries in the technologyscreen. I'm now trying to find it. ;)
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2075
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Cool, I hope you find it, and I hope its not taking too much away from your shed building :P
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 876
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

Try this:

Remove:

Code: Select all

4540AC                 mov     dl, al
4540AE                 lea     eax, ds:0[edx*4]
4540B5                 sub     eax, edx
4540B7                 shl     eax, 2
4540BA                 sub     eax, edx
4540BC                 xor     edx, edx
Use instead:

movzx eax, al // al=tech level
imul eax, X // X = number of standard techs (i.e. default 0xB / 0-10)

Code: Select all

004540AC     0FB6C0                 MOVZX EAX, AL
004540AF     6BC0 XX                IMUL EAX,EAX, XX
004540B2     90                     NOP
004540B3     90                     NOP
004540B4     90                     NOP
004540B5     90                     NOP
004540B6     90                     NOP
004540B7     90                     NOP
004540B8     90                     NOP
004540B9     90                     NOP
004540BA     90                     NOP
004540BB     90                     NOP

another missed value for the list (not related to this issue)

Code: Select all

4D2A46       BA 0A 00 00 00          mov     edx, 0Ah
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2075
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Thanks SCT I will go test this out now and report my findings... <3 ;D

EDIT: I have to say this works almost flawlessly... techs show up properly, ship is buildable and techs for ship are correct, however (a very minor issue) is that when breakthrough is researched, no notification of new advancements for those techs are given in summary, nor does it show notification of new ship allowed to build... this is minor things and it would be nice to have them *line up* with the other techs, but as I said a very minor issue, I think I can live with this fix...

EXCELLENT work once again... Now to see if DCER can put an add tech level button into UE ;)

So in conclusion, the codes needed to successfully add working Techs to your Mod are as follows:

(asm 452C2A) 0x5202A

Code: Select all

66 83 FE 0B 
with

Code: Select all

66 83 FE XX

AND



(asm 4D6378) 0xd5778

Code: Select all

80 FB 0B
with

Code: Select all

80 FB XX

AND



(asm 4540AC) 0x534AC

Code: Select all

88 C2 8D 04 95 00 00 00 00 29 D0 C1 E0 02 29 D0 
with

Code: Select all

0F B6 C0 6B C0 XX 90 90 90 90 90 90 90 90 90 90 

AND lastly, VERY important for having Techs over 12!



(asm ?) 0x530A3

Code: Select all

4D
with

Code: Select all

71
the previously stated hex bytes XX refers to the case of how many Techs you plan on having total in your tech tree (default is 11 or in hex 0B)
Last edited by Tethys on Wed May 12, 2010 2:02 am, edited 3 times in total.
Not for the weak of heart...
Image
GALM <--- GALM/Galaxies Mod
Post Reply

Return to “Modding Information Archive”