Page 1 of 1
Additional Starting Systems on any Starting Level
Posted: Thu Jan 29, 2009 5:41 pm
by Gowron
Good news, I've found a way to disable the restrictions to the number of additional starting systems at the lower starting levels
There are two checks in trek.exe which control the limitations:
Code: Select all
Offset hex code asm code
:00450D28 83FA02 cmp edx, 002 // first check
:00450D2B 0F8EAE020000 jle 00450FDF
:00450D58 83FA03 cmp edx, 003 // second check
:00450D5B 0F852F020000 jne 00450F90
[edx] is the starting level of the respective major empire. It's between 0 (beginning) and 4 (advanced).
The first check disables additional starting systems for the lowest three starting levels.
The second check limits additional starting systems for "expanded" level.
EDIT:
A copy & paste hex code to disable both limits:
In trek.exe at 0x
5012B change
0F 8E AE 02 00 00 to
90 90 90 90 90 90
AND at 0x
50142 change
89 C1 to
EB 31
Posted: Thu Jan 29, 2009 5:45 pm
by thunderchero
that is great,
I always thought even at tech 1 you should have more than 1 system.
thunderchero
Posted: Wed Feb 11, 2009 1:27 pm
by Gowron
thunderchero wrote:help....
I have found code in exe but I am unsure what to change to disable checks.
I am just guessing but change 83 FA 02 to 90 90 90 and change 83 FA 03 to 90 90 90?
Edit; I was close.
I got it now 83 FA 90 on both check points and edit
meprvnum.bin
Yep, this works, as now you're comparing the starting level to 0x90 (signed), which is negative. You could also use
83 FA FF.
thunderchero wrote:
I like this
2 systems on start 1, 3 systems on start 2, 4 systems on start 3, 5 systems on start 4, 6 systems on start 5 but I am counting home system.
thunderchero
Yep, that's been my choice as well
daniel wrote:can you include this knowledge in the Ultimate Editor ?
You'd have do ask this in the Ultimate Editor thread (stickied), but keep in mind that the UE is primarily an editor for stbof.res files which are edited a lot, not one-shot changes in trek.exe
Posted: Fri May 01, 2009 7:48 am
by Gowron
Translating assembler offsets into trek.exe offsets:
viewtopic.php?name=Forums&file=viewtopic&t=598
Posted: Sat May 02, 2009 1:32 am
by Gurgeh
Hey, guys.
I've tried editing meprvnum.bin and as long as all the values for the major races (Cards, Feds, Fergs, Klings, & Roms respectively (the alphabetical ordering of the various empires seems to be the default for values in trek.exe and the many files in stbof.res)) are the same (as below), there's no problem.
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 05 00 00 00
However, if you have one line that's different from the others, that has, for example, higher values for one of the empires (I haven't yet tried lower ones) when you run the game the empire that line is for defaults to the same values as the others.... There must be some other sort of check involved.
Any ideas on how it may be working (and how it might be circumvented or disabled) ???
Spocks-cuddly-tribble wrote:BotF just reads the first i.e. cardassian data-set for all empires and ignores the other.
I don't know if this is a bug or unfinished feature, but isn't to fix in five minutes.
Posted: Tue Aug 18, 2009 6:45 pm
by DOT
It would be an interesting alternative to have only home system starting with highest possible tech level and the other starting systems with lower tech level to simulate a step by step expanding imperium.
Spocks-cuddly-tribble wrote:The empires starting eras(range 0-4) for the default buildings on additional starting systems via
bldset.bin are loaded at these locations:
Code: Select all
450DD9 8B842434010000 mov eax, [esp+134h]
450E0B 8B842434010000 mov eax, [esp+134h]
But you need to insert a home system check/switch, since code is shared with them.
EDIT:
Since the AI permanently ignores my tries to give it a boost, is it possible to increase the number of starting systems by one only for AI?
I couldn't even find the code one my own to give it a try...
Spocks-cuddly-tribble wrote:The number of designated (above named limitations) additional starting systems is loaded into ebx at position 4B247B.
Custom starting systems for each empire (meprvnum.bin fix)
Posted: Sat Dec 04, 2010 11:03 am
by Spocks-cuddly-tribble
Spocks-cuddly-tribble wrote:BotF just reads the first i.e. cardassian [meprvnum.bin] data-set for all empires and ignores the other.
==> Custom starting systems for each empire (meprvnum.bin bug-fix)
First, copy & paste
meprvnum.bin into trek.exe at 0x
B7128 (120 bytes)
Code: Select all
Then, in trek.exe at 0xB1843
Replace: (80 bytes)
31 C0 31 D2 83 C1 04 8A 90 2C 2B 5A 00 40 89 54 0C 10 83 F8 05 7C EB 8D 54 24 14 89 D8 E8 CB 58 00 00 30 E4 88 64 24 2C 55 8B 54 24 2C 52 31 D2 8A 54 24 34 89 F9 89 F0 8B 5C 94 08 E8 4C 00 00 00 8A 54 24 2C FE C2 88 54 24 2C 80 FA 05 72 D8
With:
0F B6 91 2C 2B 5A 00 6B C1 14 80 3D 44 2B 5A 00 05 7C 10 B5 01 D2 E5 84 2D 28 2B 5A 00 B5 00 75 02 B0 64 8B 9C 90 28 7D 4B 00 8A D1 8B C6 51 8B CF 55 FF 74 24 30 E8 52 00 00 00 59 80 C1 01 80 F9 05 72 BC 90 90 90 90 90 90 90 90 90 90 90 90
4B2443 0FB691 2C2B5A00 MOVZX EDX, [ECX+5A2B2C] // starting level race(ecx)
4B244A 6BC1 14 IMUL EAX, ECX, 14h // base offset for race ID(ecx)
4B244D 803D 442B5A00 05 CMP BYTE [5A2B44], 5 // 'Impossible' ?
4B2454 7C 10 JL SHORT 4B2466 // if not skip AI feature
4B2456 B5 01 MOV CH, 1
4B2458 D2E5 SHL CH, CL
4B245A 842D 282B5A00 TEST [5A2B28], CH // AI ?
4B2460 B5 00 MOV CH, 0 // keep race ID(ecx) clean
4B2462 75 02 JNZ SHORT 4B2466 // if not AI skip next
4B2464 B0 64 MOV AL, 64h // 'Impossible' AI offset [4B7D28] +100
4B2466 8B9C90 287D4B00 MOV EBX, [EAX+EDX*4+4B7D28] // number of systems
4B246D 8AD1 MOV DL, CL // race ID
4B246F 8BC6 MOV EAX, ESI
4B2471 51 PUSH ECX // save race ID
4B2472 8BCF MOV ECX, EDI
4B2474 55 PUSH EBP
4B2475 FF7424 30 PUSH [ESP+30]
4B2479 E8 52000000 CALL 4B24D0 (PlaceStartingSystems)
4B247E 59 POP ECX // restore race ID
4B247F 80C1 01 ADD CL, 1
4B2482 80F9 05 CMP CL, 5
4B2485 72 BC JB 4B2443 // loop for next empire ID
4B2487-4B2492 90 NOP
Now at 0x
B718C (i.e. 6th data set) number of AI starting systems on 'Impossible', starting levels 1-5 for all AI empires.
(if you don't want this AI feature just replace 7C with EB at asm-4B2454)
AlexMcpherson79 wrote:Newbie to hex here,if someone could give an example of altered hex alongwith original just so I can set what exactly gets change
In trek.exe at 0x
5012B change
0F 8E AE 02 00 00 to
90 90 90 90 90 90
AND at 0x
50142 change
89 C1 to
EB 31
This, however, won't take care of:
Gowron wrote:since empires can start at the edge of the map, it's not safe to set the value to 6 or higher (a 5 works, since empires cannot start in the corners).
->
X solarsystems at tech Y
Resolved ->
Corner check ->
edge check option
Code: Select all
1.) in trek.exe at 0xB2388
replace: (29 bytes)
39 F1 7D 04 39 F0 7C 3B 39 F1 7D 05 3B 04 24 7D 32 39 E9 7C 04 39 F0 7C 2A 39 E9 7C 05
with:
90 90 90 90 39 F0 7C 3B 90 90 90 90 90 39 E9 7D 32 90 90 90 90 39 F1 7C 2A 90 90 90 90
2.) at 0xB23C2 change 02 to -> 01
3.) at 0xB21AF change 7E -> to EB (skip 100 iterations limit)
Thanks to Gowron, now you can have up to 8 extra starting systems (i.e. in total 9 systems max).
Posted: Sat Dec 04, 2010 5:06 pm
by Tethys
Awesome! 9 systems for mini-empire at tech 5
Re: Additional Starting Systems on any Starting Level
Posted: Fri Dec 16, 2011 11:58 pm
by thunderchero
Spocks-cuddly-tribble wrote:==> Custom starting systems for each empire (meprvnum.bin bug-fix)
this would be great addition to UE trek.exe editing.
got a question here on corner check.
if galaxy generation is rushed by double clicking, will this allow it to try to place at current tested location?
I ask since I have seen rushed galaxy generation on edge and gotten this error with only 4 extra starting systems on small map.
or am I missing something?
File: ..\..\source\universe\placrace.c, Line: 998, pos.row>=0 && pos.col>=0
unless this is part of the needed code (I thought it is only an example to AlexMcpherson79)
Spocks-cuddly-tribble wrote:AlexMcpherson79 wrote:Newbie to hex here,if someone could give an example of altered hex alongwith original just so I can set what exactly gets change
In trek.exe at 0x
5012B change
0F 8E AE 02 00 00 to
90 90 90 90 90 90
AND at 0x
50142 change
89 C1 to
EB 31
thunderchero
Spocks-cuddly-tribble wrote:1.) I don't think the 100 iterations limit will be skipped when rushing galaxy generation via double clicking. But, like Gowron said, sometimes 100 iterations could be too less, especially when the corner check was replaced with an edge check.
-> I'll look into this, should be easy to solve.
2.) The example to AlexMcpherson79 is best option to disable the checks in post 1.
-> I'll update this & related topic(s) when I fix point #1.
EDIT:
Code: Select all
004B2DAF jle short loc_4B2DC6 // jle -> jmp
-> Above code is updated.
Re: Additional Starting Systems on any Starting Level
Posted: Sun Jan 12, 2014 4:11 pm
by mickar
I've searched but couldn't find the answer to this question:
How do I change the number of starting systems for each tech level on UDM? I want to change it so I start with only the 1 system.
Thanks to anyone who can help me.
Re: Additional Starting Systems on any Starting Level
Posted: Sun Jan 12, 2014 4:31 pm
by thunderchero
mickar wrote:I've searched but couldn't find the answer to this question:
How do I change the number of starting systems for each tech level on UDM? I want to change it so I start with only the 1 system.
Thanks to anyone who can help me.
open the trek.exe with a hex editor
at 0x0b7125 - 0x0b719f
if you want only home system edit this area with 00
thunderchero
Re: Additional Starting Systems on any Starting Level
Posted: Sun Jan 12, 2014 6:37 pm
by mickar
thunderchero wrote:mickar wrote:I've searched but couldn't find the answer to this question:
How do I change the number of starting systems for each tech level on UDM? I want to change it so I start with only the 1 system.
Thanks to anyone who can help me.
open the trek.exe with a hex editor
at 0x0b7125 - 0x0b719f
if you want only home system edit this area with 00
thunderchero
I opened trek.exe but don't can't find oxob7125 - oxob719f. What are they, the offset?
Re: Additional Starting Systems on any Starting Level
Posted: Sun Jan 12, 2014 7:36 pm
by thunderchero
yes those are offsets.
but those are zero's not o's
most hex editors will have a "go to" function in "search" tab. this would take you directly to location 0x0b7125
you will see in normal UDM trek.exe
Code: Select all
00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
change all of the numbers to 00
thunderchero
Re: Additional Starting Systems on any Starting Level
Posted: Sun Jan 12, 2014 7:40 pm
by mickar
thunderchero wrote:yes those are offsets.
but those are zero's not o's
most hex editors will have a "go to" function in "search" tab. this would take you directly to location 0x0b7125
you will see in normal UDM trek.exe
Code: Select all
00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
change all of the numbers to 00
thunderchero
When I use goto it says 'the entered number contains an invalid digit'.
Re: Additional Starting Systems on any Starting Level
Posted: Sun Jan 12, 2014 7:43 pm
by mickar
mickar wrote:thunderchero wrote:yes those are offsets.
but those are zero's not o's
most hex editors will have a "go to" function in "search" tab. this would take you directly to location 0x0b7125
you will see in normal UDM trek.exe
Code: Select all
00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00 00 00 00 00 01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
change all of the numbers to 00
thunderchero
When I use goto it says 'the entered number contains an invalid digit'.
Ok I got it now.
Thanks thunder