Page 1 of 1

Galaxy Control Values

Posted: Sat Apr 26, 2008 12:10 am
by thunderchero
Credit for this post topic; Gowron

As announced in my "trek.exe multipliers" topic, there was another interesting data field in trek.exe, and indeed it turned out to include some *really* useful stuff

All these values are stored as floats.

Some certain changes to these values will render the game unable to create new galaxies. In this case, starting a new game will cause an infinite loop. I'll refer to this as a galaxy hang-up.

I hope everyone knows what [pi] is (if not, try google or wiki ^^).


position: 0x17D538
length: 8 bytes
default value: 5/6
description:
This value controls the decision if a new object (during the galaxy creation) will become a star or an anomaly (Black Hole, Nebula etc.).
If it's set to 1.0 or more, all objects will be stars.
The lower the value, the higher the anomaly ratio.
If it's set too low, you'll get a galaxy hang-up.
The lowest value that worked during my tests was 0.13 .
The highest value that didn't work during my tests was 0.125 .


position: 0x17D538
length: 8 bytes
default value: 5/6
description:
This value controls the decision if a new object (during the galaxy creation) will become a star or an anomaly (Black Hole, Nebula etc.).
If it's set to 1.0 or more, all objects will be stars.
The lower the value, the higher the anomaly ratio.
If it's set too low, you'll get a galaxy hang-up.
The lowest value that worked during my tests was 0.13 .
The highest value that didn't work during my tests was 0.125 .


position: 0x17D598
length: 8 bytes
default value: -1.0
description:
This value controls the basic shape of a Spiral Galaxy, i.e. the alignment of the "arms".
Setting this value to zero will yield a crash or galaxy hang-up.
It's sort of hard to describe how this value works, just play around with it and see. Negative values very close to zero seem to yield the "clearest" spiral galaxies.


position: 0x17D5A0
length: 8 bytes
default value: 1.5 * [pi]
description:
This value controls the extent of the inner part of spiral galaxy "arms". Any significant change can lead to a galaxy hang-up.

position: 0x17D5A8
length: 8 bytes
default value: [pi]
description:
This value controls the extent of the medium part of spiral galaxy "arms". Any significant change can lead to a galaxy hang-up.

position: 0x17D5B0
length: 8 bytes
default value: 0.5 * [pi]
description:
This value controls the extent of the outer part of spiral galaxy "arms". Any significant change can lead to a galaxy hang-up.

Think of the arms as a conbination of three arcs (per arm) with different radii, approximating a spiral.


position: 0x17D668
length: 8 bytes
default value: 0.2
description:
This value controls the number of minor races. Setting this to zero or lower led to a maximum of 4 minors under any settings. Setting this to 1.0 or higher resulted in 29-30 minor races on large irregular galaxies with minors set to "many".
Update:
The value seems to determine the chance that a given sector get a minor race during the placement of the races.
Apparently the sectors are scanned from left to right:
With the value set to 1.0, I observed a definite general accumulation of the minor races in the left part of the map.
See also: Minor Race Frequency.


position: 0x17D6E8
length: 8 bytes
default value: 1.01
description:
This value is used for the Climate Probability Check. You shouldn't want to change this value, normally.


position: 0x17D9F4
length: 8 bytes
default value: 0.1
description:
The probability that a star system contains dilithium. Negative values are treated as zero, values larger than 1.0 are treated as 1.0 .
Home systems of major races and space-faring minor races will get dilithium anyway.


And that's it so far
I'll now cut down (a bit) on the research and will concentrate more on my upcoming BotF mod which will be named "Balance of Power" and will probably be finished in 2 or 3 months. It will implement quite a lot of my findings and contain bugfixes, exploit-fixes, balance changes and a "no CD" crack, so stay tuned


covered area: 0x17D200 through 0x17E000
(this is just a reminder for myself; all values in this area have been tested, not necessarily with success)

Posted: Sun Dec 07, 2008 2:54 pm
by Gowron
That one needs to be corrected, thanks :)
Since I can't edit the posting...


position: 0x17D538
length: 8 bytes
default value: 5/6
description:
This value controls the decision if a new object (during the galaxy creation) will become a star or an anomaly (Black Hole, Nebula etc.).
If it's set to 1.0 or more, all objects will be stars.
The lower the value, the higher the anomaly ratio.
If it's set too low, you'll get a galaxy hang-up.
The lowest value that worked during my tests was 0.13 .
The highest value that didn't work during my tests was 0.125 .

Posted: Thu Mar 05, 2009 3:02 pm
by ManweSulimo
How are the default values being derived? I am rusty with hex and am not recalling how to extrapolate the decimal numbers you all are acquiring. Any advice or assistance is greatly appreciated.

Posted: Sat Mar 07, 2009 8:48 pm
by Gowron
You can either use the Calculator function of the Ultimate Editor (recommended) or any online IEEE 754 converter, for example
http://babbage.cs.qc.edu/IEEE-754/

Posted: Fri Jun 12, 2009 1:41 pm
by Gowron
Update:

Tests with different galaxy sizes have shown that the values at
position: 0x17D5A0,
position: 0x17D5A8,
position: 0x17D5B0

control the extent of the inner, medium and outer parts of spiral galaxy arms. So all three values have an effect which is NOT limited to one galaxy size setting.

Think of the arms as a conbination of three arcs (per arm) with different radii, approximating a spiral.

Re: Galaxy Control Values

Posted: Tue Aug 12, 2014 1:39 pm
by DS9_xRomulus-V
ok, apologies in advance if my post is in the wrong place. I also realize the topic is old(srry).

So after combing through various topics throughout the site i've hit a dead end. :mad:
The only thing to do is ask the question and hope someone responds...
(bare in mind i'm a newbie so any response I ask is clear and direct thx)

In the first post it states about altering the dilithium value - im using HxD(hexedit), however
I don't understand how to interpret the "value". A guy said in a post about his botf mod where he
changed the default value from 10% to 20%.
Does the (0x17D9F4) section which is currently 9A (154 decimal) relate to dilithium percentage upon map generation,
or have I got all this terribly wrong?

So to be clear - How did thunderchero or gowron interpret the 0.1 default value from what is written in Hexedit ?
Thx.

Re: Galaxy Control Values

Posted: Tue Aug 12, 2014 2:17 pm
by thunderchero
thunderchero wrote:position: 0x17D9F4
length: 8 bytes
default value: 0.1
description:The probability that a star system contains dilithium. Negative values are treated as zero, values larger than 1.0 are treated as 1.0 .Home systems of major races and space-faring minor races will get dilithium anyway.
first if you do not already have it pick up UE
https://www.armadafleetcommand.com/get-f ... file_id=71

UE has a hex calculator (tools/other/calculator)

you will notice Gowron already posted length of value (length: 8 bytes) you need to change UE calculator to double (8 bytes)

if you enter 0.1 it will calculate in hex to 9A 99 99 99 99 99 B9 3F (if unedited this should be hex at 0x17D9F4)

change to what value you want then add new hex value to trek.exe at 0x17D9F4

thunderchero