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
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

NB

0xd1e17 66 83 fa 0a -> 66 83 fa 0F shows correct discription is science screen for tech 11 - 15 not future tech 1 et al

00xd1e29 09 -> 0e this change by DCER make the science screen display the correct FT level

0x521a8 0a -> 0f x stops research progress at level 10
0x521b8 09 -> 0e x repairs brocken progrees but didn't produce an tech level notice[/code]
Last edited by Peter1981 on Tue May 18, 2010 6:59 am, edited 1 time in total.
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

the last two changes above 0x521a8 and 0x521b8 these might control the values for wether quadratic futur tech rp are used or techtree.tec vales? can anyone confirm this?
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

woohoo tethys is about to post success...!
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Ok. somehow we missed SCT's post in this thread: viewtopic.php?name=Forums&file=viewtopic&p=19984#19984

So this next bit outlines, the completion of the successful implementation of extra tech up to 15:

Code: Select all

asm			Hex			Values

424416		0x23816   66 83 FA 0B       cmp     dx, 0Bh 
4245C5		0x239c5   80 FB 0B          cmp     bl, 0Bh 
4527F0		0x51bf0	66 83 FB 0B       cmp     bx, 0Bh 
452B9F		0x51f9f	83 FD 0B          cmp     ebp, 0Bh 
452C2A		0x5202a	66 83 FE 0B       cmp     si, 0Bh 
452DA7		0x521a7	BA 0A 00 00 00    mov     edx, 0Ah * 
45328A		0x5268a	83 F8 0B          cmp     eax, 0Bh 
4532E7		0x526e7	BA 0A 00 00 00    mov     edx, 0Ah * 
4535E7		0x529e7	83 FA 0B          cmp     edx, 0Bh 
4537CE		0x52bce	80 FB 0B          cmp     bl, 0Bh 
4539BF		0x52dbf	80 FB 0B          cmp     bl, 0Bh 
455208		0x54608	66 83 FB 0B       cmp     bx, 0Bh 
4D2A17		0xd1e17	66 83 FA 0A       cmp     dx, 0Ah * 
4D2A46		0xd1e46	BA 0A 00 00 00    mov     edx, 0Ah * 
4D6378		0xd5778	80 FB 0B          cmp     bl, 0Bh
Changing all instances of 0A and 0B values to 0F and 10 (RESPECTIVELY) should not only solve the notification popups, but also the Future Tech costs as well (but the Future Tech costs have not been fully tested, it is only known that research progresses faster than when you get to Tech 16, then it is immensely slow).

Look for this "cookie" in future mods :D

First and foremost I would like to thank SCT, DCER, and Flocke (anyone else if ive forgot you, correct me please) for helping Peter and myself with locations and UE stuff: THANK YOU!

Thanks Peter, for doing this project with me... on to the minor races!! :roll:

Also, some screenshots:
vzd3eu.png
vzd3eu.png (378.37 KiB) Viewed 4717 times
2emfv2g.png
2emfv2g.png (418.43 KiB) Viewed 4717 times
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

you'll also need to change these values else technology will stop at T15. this was mentioned above but just to remind every one

Code: Select all

0x521a8 0a -> 0f
0x521b8 09 -> 0e
testing has shown that the T(16)'s (or FT(6)'s iyp) required RP's is still calculated based on t10's i.e. RP(FT(x)) RP(T(10))*FTL*(FTL+1) where RP is research point FT is future tech and x is current level. so FT6 requires 42*T10

does anyone know where to find the value that controles this calculation :) thanks
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

if you want to you can extend the technologies beyond 15 -- i've tested successfully scrolling in tech description window :D -- this work as in other windows by selecting the last entry and pressing the appropriate f key ie in this case F4
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1955
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

This reply fits better here than in the coding section.


Sub_4529F0 is the responsible code area as specified in Research Progress and Decay.

At a hasty glance, multiplication for cost of future techs is located here:

Code: Select all

452DB9           imul    eax, ebp
452DBC           mov     edx, [esp+3Ch]
452DC0           imul    edx, eax

And here are more values to change in addition to this list.

Code: Select all

452CF8       66 83 FB 0B      cmp     bx, 0Bh

452DB3       8D 45 F6         lea     eax, [ebp-0Ah] *
452DB6       83 ED 09         sub     ebp, 9 **

452E67       83 E9 0A         sub     ecx, 0Ah *
452EB7       83 E9 0A         sub     ecx, 0Ah *

4D2A27       83  E8 09        sub     eax, 9 **

maximum for starting tech level:
453027       66 83 FA 0A      cmp     dx, 0Ah
45302D       BA 09 00 00 00   mov     edx, 9 **
Some of them might already have been posted in this topic (please make an updated post with all values/code-changes but without bla, bla & pictures).

-> Status of 424416 & 4245C5 ?
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

UPDATE: the following are the changes made to trek.exe

Code: Select all

.424416		0x23816		66 83 FA 0B   	cmp  dx,  0Bh		66 83 FA 10 
.4245C5		0x239c5		80 FB 0B        cmp  bl,  0Bh		80 FB 10

Code: Select all

.4527F0		0x51bf0		66 83 FB 0B   	cmp  bx,  0Bh     	66 83 FE 10
.452B9F		0x51f9f		83 FD 0B      	cmp ebp,  0Bh     	66 83 FE 10
.452C2A		0x5202a		66 83 FE 0B   	cmp  si,  0Bh     	66 83 FE 10 
.452DA7		0x521a7		BA 0A 00 00 00	mov edx,  0Ah     	BA 0F 00 00 00
.452CF8		0x520f8		66 83 FB 0B   	cmp  bx,  0Bh     	66 83 FB 10 
.452DB3		0x521b3		8D 45 F6      	lea eax, [ebp-0Ah]	8D 45 F0 
.452DB6		0x521b6		83 ED 09      	sub ebp,   9h        	83 ED 0E 
.452E67		0x52267		83 E9 0A      	sub ecx,  0Ah      	83 E9 0F
.452EB7		0x522b7		83 E9 0A      	sub ecx,  0Ah     	83 E9 0F
.453027		0x52427		66 83 FA 0A   	cmp  dx,  0Ah      	66 83 FA 0F
.45302D		0x5242d		BA 09 00 00 00	mov edx,   9h     	BA 0E 00 00 00
.45328A		0x5268a		83 F8 0B      	cmp eax,  0Bh      	83 FA 10
.4532E7		0x526e7		BA 0A 00 00 00	mov edx,  0Ah     	BA 0F 00 00 00
.4535E7		0x529e7		83 FA 0B      	cmp edx,  0Bh     	83 FA 10
.4537CE		0x52bce		80 FB 0B      	cmp  bl,  0Bh     	80 FB 10
.4539BF		0x52dbf		80 FB 0B      	cmp  bl,  0Bh     	80 FB 10
.455208		0x54608		66 83 FB 0B   	cmp  bx,  0Bh     	66 83 FB 10
.4D2A17		0xd1e17		66 83 FA 0A   	cmp  dx,  0Ah     	66 83 FA 0F
.4D2A27		0xd1e27		83 E8 09      	sub eax,   9h     	83  E8 0E
.4D2A46		0xd1e46		BA 0A 00 00 00	mov edx,  0Ah     	BA 0F 00 00 00
.4D6378		0xd5778		80 FB 0B      	cmp  bl,  0Bh     	80 FB 10
EDIT:

Code: Select all

.4532F7		0x526F7		8D 41 F6      	lea eax, [ecx-0Ah]	8D 41 F0
.4532FA		0x526FA		83 E9 09        sub ecx, 9        	83 E9 0E
I have tested reserch using -mudd F9 cheat and the tech notifications for FT now start at T16 but while they are based on t15's RP's the display % researched seems to now display based on t10's RP's so while it works very well i may have missed the display calculation subroutine, any ideas?

EDIT2: Can any one shed some light on what effect

Code: Select all

4D6378		0xd5778		80 FB 0B      	cmp  bl,  0Bh     	80 FB 10
has? thanks :)

EDIT3:

Code: Select all

.453ca3		0x530A3		4D					71
Last edited by Peter1981 on Wed May 19, 2010 12:03 pm, edited 2 times in total.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

Nice work Peter, cant wait til my rig is fixed so i can put this into my mod... :D

PS: im just disappointed that i couldnt help out with that last bit :( and why arent u on msn :?
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
jonesie85two
Lieutenant-Commander
Lieutenant-Commander
Posts: 201
Joined: Sat Apr 26, 2008 2:00 am

Post by jonesie85two »

im sorry mod masters. but as a noob modder i must ask for a lay-mans version of this. not so much the understanding of how it was figured out but more the implementation of this new information.
User avatar
Tethys
Past Administrator
Past Administrator
Posts: 2404
Joined: Fri Jul 18, 2008 2:00 am
Location: Your mom's bed ;)
Contact:

Post by Tethys »

well, pretty much the last 4 pages (but might want to read all) of this thread go through everything you need to change, and it MUST be hex edited in order to work, so if you dont know/arent willing to learn any basic hex editing, you shouldnt bother with it until, maybe, DCER incorporates this FULLY into UE, which I also suspect is a ways away, considering how *young* this discovery is... tho I could be wrong, and I hope I am ;)

asm is assembler, you want to look at 0x(value) for hex locations, and the double digits (example: 01 0e 0f 10 etc..) are the codes youd be looking to change with new values, which are usually highlighted in bold or explicitly referenced to:

example only:

Change:

0e 04 20

to:

0f 05 21
Not for the weak of heart...
Galaxies MOD v0.4.0 <--- GALM/Galaxies Mod latest version
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

@ jonesie85two (Chris?) --

To implement this in your verison of Star Trek the Next Generation: Birth of the Federation you will need a hex editor and a slight understanding of hexadecimal numbers.

Gowron Wrote:
You gotta try out the HxD Editor
http://mh-nexus.de/en/ (English)
resp.
http://mh-nexus.de/de/ (German)

It's small, free, ad-free and reliable.
the following link will help you with hex editing:-
http://www.members.aon.at/zelli/shiplist.htm

simply ignore the first column thay are asm offsets and need not bother you. In the hex editor you'll find the number listed 0x##### these are hexadecimal and are positional if you go to the first on you'll find the sequence

Code: Select all

e.g 0x51bf0      66 83 FB 0B replace this with 66 83 FE 10
so in that example just the last byte needs to be changed from 0B -> 10
make all the changes in my post above this one.
and at

Code: Select all

 0x530A3 replace 4D with 71
Then something a little harder; -- replace
at 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 10 90 90 90 90 90 90 90 90 90 90
If you have done this you've one more job to do... sadly this is perhaps the hardest of all...

open UE and load the trek.exe's coresponding stbof.res file and Extract techtree.tec and techdesc.tec and open them both in your hex editor for techtree.tec set the column view to 72 (hex 47) -- if you look at it in this view you can see that you'll have 77 rows one for each science area (read the first post for more on this.)

IMPORTANT you will need to put a line similar to this for each new tech level for each science area

Code: Select all

53 69 6c 69 63 6f 62 69 6f 6c 6f 67 79 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 0b 00 62 69 6f 00 00 00 00 00 00 00 00 00 00 00 0b 17 40 00 a4 6f 00 00 00 00 00 00 0c 81 00 00
this reads as 40bytes name in this case 'Silicobiology'
two bytes little endian

Code: Select all

0b 00
= 11th index of tech tree (We'll be coming back to this!
followed by 'bio'

Code: Select all

62 69 6f 00 00 00 00 00 00 00 00 00 00
following that is a single byte for the science area in this case it's

Code: Select all

00
which is Biotech. and following this is a single byte for the science area index in this case it's

Code: Select all

0B
which is 11th.
the following three bytes are always the same

Code: Select all

17 40 00
put these in as well
this is followed by the research points cost (RP's) 8 byte long little endian in this example

Code: Select all

A4 6F 00 00 00 00 00 00
= 28580 points.
the final four bytes are for reference to the techdesc.tec file at the end of the techdesc.tec and

Code: Select all

00 00
and looking at the address of the second 00 use this for the four byte address remember it's little endian so in our example

Code: Select all

0c 81 00 00
refers to address 0x810C

With the above changes you'll need five new tech levels for each science area (it is not known wether sociology is required but i recommend adding them in as the original plan with this topic was to make use of the 7th tech level.)
so techtree.tec should now consist of 16*7 = 112 rows of 72 bytes take a look at the 40th column the one after the name of each technology (it's 0x28 in hex) this column will likely as not need putting in order and will need to read 00,01,02...09,0a,0b...0f,10,11....6e,6f
from top to bottom.

Having done all this save both the files and import them back into stbof.res with UE save the Stbof.res file as is.
(if you closed UE you'll have to re-load stbof.res)
In UE now goto
Edit -> Technology -> Technology Fields
your new technologies are going to need a description - select a technology field from the dropdown box; then select one of the new technologies and type a description for it in the box labeled 'Description:' when you've finished editing your technologies save the stbof.res file.

Hope this is enought to get you going mate :).
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

asm_0x45290E cmp dx, 9 01 C1

Understanding that you very busy and realising that my question is very noobish

this is part of a subroutine in trek.exe starting at asm_0x4528A0 which i believe (and i maybe (easily) be mistaken) dealing with the calculation of the F4 screen RP% display.

my question is how do i make this a comparison with 0e?

Thank-you for you time and effort as always your help is appreciated ;)
User avatar
Peter1981
Rear-Admiral
Rear-Admiral
Posts: 1118
Joined: Tue May 06, 2008 2:00 am
Location: England

Post by Peter1981 »

report of bug :- with this as it stands tech 16 (FT1) seems to be instantly researched can anyone verify this?
Post Reply

Return to “Modding Information Archive”