Star Frequency

Star Frequency; support/discussion/questions

Moderator: thunderchero

User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Star Frequency

Post by Gowron »

Today I found what could be called the last piece to an old jigsaw ;)

Didn't these BotF galaxies sometimes look a bit empty? ^^





For every map size, there's one reference value which controls the total number of stars (including anomalies). The exact number is also subject to some sort of random generator, but it will still be close to the corresponding reference value. Their positions and default values are:

reference value for small map
position 0xAF8AB
default 0x30

reference value for medium map
position 0xAFA25
default 0x46

reference value for large map
position 0xAFA3B
default 0x5A

Their length is always 4 bytes. (should be more than enough ^^)

Minor Races "go extra", so maps with many minors will generally have more star systems than maps with few or no minors.

So, neglecting minors, there are approx. 48 stars on a small map and about 90 on a large map. But a large map contains 450 sectors. Let's see what happens if we set the reference value for large maps to 600:





Not bad. There's still a limit - we get about 200 stars, not more (further increasing the reference value does not change that).

So much for the moderate part ;)


Remember that old topic about Galaxy Control Values?
At position
0x17D568
there's a value controlling the Galactic Density. It's 500 by default. Increasing it with the above reference values staying at their defaults did not seem to do anything, but now we have higher reference values. So let's just set the Galactic Density to some astronomically high number and see what happens:





The stars are packed so tightly that, apparently, the game has run out of system names (or slots of some kind), and the bottom area is completely empty.

Now back to that old topic. At position
0x17D538
(thanks again to Spocks-cuddly-tribble for correcting the offset) we have the star/anomaly ratio. It's 5/6 by default. We set it to 1/2, prepare for some scan values close to -200 (^^) and watch the result:






Gowron wrote:apparently, the game has run out of system names (or slots of some kind), and the bottom area is completely empty.
The star system limit is found at position 0xAFA49 and at position 0xAFA94.

2 bytes signed = 32767 systems max. Default 0xE6 (230)

Note changing of the limiting value at both positions is needed!


It is believed to avert:

NOTE: If starname.bin runs out of names game will crash or freeze during map creation.
Last edited by Gowron on Wed Jan 07, 2009 12:56 pm, edited 2 times in total.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7857
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Post by thunderchero »

very cool :wink:

that on impossible 8O 8O

I can't wait to see what you have next :lol:

EDIT; if you lower percent of wormholes and newtron stars would they be replaced with normal systems?

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

Post by Flocke »

Wow, I want to play that map! LOL
Really great discovery! :D
User avatar
Martok
Rear-Admiral
Rear-Admiral
Posts: 1210
Joined: Thu May 01, 2008 2:00 am

Post by Martok »

Gowron, you truly are a god. I've always wished the map would have more star systems for me (and the AI) to play with, and now you've done it. My hat's off to you, mate. :D
"Evil is easy, and has infinite forms." -- Pascal
stardust
Rear-Admiral
Rear-Admiral
Posts: 1381
Joined: Sat Apr 26, 2008 2:00 am
Location: good ole Blighty

Post by stardust »

Righty...if i ever play a map like those ones and i still get the other empires whining at me for expanding too near to them then i will tell them to take a hike :lol:

And Gowron's last map....hmm a cloaked ship's paradise that with so many anomalies to uteerly screw up the best scanning equipment surely..?

I'm impressed :)
Computers! [Expletive deleted]

My 4shared folder
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron »

kingy wrote:1 Q, will this work with the minors, e-g having them all on a map,
Yep, even the last settings (last picture) worked with "many" minors as well :)
thunderchero wrote:EDIT; if you lower percent of wormholes and newtron stars would they be replaced with normal systems?
Yes, they would. You can set the ratio to 1.0 to have all anomalies replaced by normal stars.
Weirdness wrote:looks like there is a system limit in the game...

would it be possible to create more systems
Maybe extending starname.bin could help.
kingy wrote:look's good thunderchero

about the right space inbeween the stars, do u think it would crash more, my god just think of all the systems that you will have to look after, man the a-i will blow it head off,
And that's not everything. Look at those 20+ wormholes to keep track of in MP ;)


EDIT:
Extending starname.bin did not allow for more star systems.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
KrazeeXXL
BORG Trouble Maker
BORG Trouble Maker
Posts: 2323
Joined: Sat Jan 03, 2009 3:00 am
Location: the 36th Chamber

Post by KrazeeXXL »

so much for the bigger galaxies... slow down the ships a little bit and you have a suggestion of a larger map! I would like to play a game in such a gal, too!

sure, it'll be a great change of the game we all know. maybe the scans have to be changed to use cloaked ships and don't making them "useless" (except in tactical of course).

if you have a scan value of 500 or more; the yellow scan level should be set to 250. At least I cannot say how the scans would be, but they seem most important for me to keep the balancing alive in the game.

either way it's a giant step in the right direction - to get finally 4 quadrants with a lots of stars and 100 minors ;)
User avatar
DCER
Code Master
Code Master
Posts: 683
Joined: Sat Apr 26, 2008 2:00 am

Post by DCER »

Good job, Gowron, like Krazee said this will be great for making the maps appear bigger.
User avatar
eber3
Captain
Captain
Posts: 674
Joined: Sat Apr 26, 2008 2:00 am

Post by eber3 »

Great idea, I already want to play that last map Gowron posted, but slowing down the ships and reducing the scan range really would make the whole thing seem like a bigger universe as well! I can't wait to see this implemented.
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron »

thunderchero wrote:
Gowron wrote:EDIT:
Extending starname.bin did not allow for more star systems.
I was thinking planet.pstwould need to be extended. But would have to count 1052 planets 8O to check and this would include gas giants.

I have loaded 5-6 maps and not one had the same amount of systems all with same settings. They ranged from 167 to 230 systems. From these numbers if each system has 4-5 planets or more this could reach the 1052 planets in game.

EDIT:
I counted every planet on 2 maps. it is close to using all the planets but did not in both tests.

test 1 978 of 1052
test 2 998 of 1052

thunderchero
Good idea, but it's not a planet limit, but a system limit.

I just ran a test:
I vastly increased the planets' population values, so that the game would only create systems with very few planets (since the game does not add further empty planets to a system that already has a population capacity of more than 400). It did not change the result.
Last edited by Gowron on Sun Jul 18, 2010 6:55 am, edited 1 time in total.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron »

Damar_72 wrote:Gowron and DCER,

I followed you steps; learn in 2 days how to use the hex editor just to be able to play a map with a lot of systems. But I have to admit that I don't understand it 100% yet, not far that much...
I was able to create a map with more than 130 systems and everybody will love to hear that....29 minors...

The only problem in the map, it's fully of nebulas!

Now that I've learned how to change the game configurations "I want more..."
First of all, unless you want *really really* many stars, you just need to edit the reference values, not the Galactic Density and not the star/anomaly ratio.
That way you don't have to worry about nebulas covering your map ;)

If you want to reduce the number of nebulas, there are two options:

1. Increase the star/anomaly ratio. This means more star systems and less anomalies (nebulas, black holes, etc.).

2. Use the UE, go to
Edit -> Galaxy -> Stellar Objects,
and change the nebula frequency there (increasing the frequency of other stellar objects, since the sum has to be 1.0). This means less nebulas and more other anomalies.
jaruler wrote:where can i play with this bit of coding to try on mine? how do you get to it i tried using notepad on the res file and it just tried for 20 miniutes until i terminated the operation.
stbof.res:
http://www.7-zip.org/

trek.exe:
http://mh-nexus.de/en/hxd/
jaruler wrote:have you doen a full game yet with all those lovely stars?
No, but I think it's safe to assume there are enough volunteers ;)
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
Gowron
Code Master
Code Master
Posts: 304
Joined: Sat Apr 26, 2008 2:00 am
Location: 50° N, 11° E

Post by Gowron »

Spocks-cuddly-tribble wrote:
Gowron wrote:They don't go extra.
So additional adjacent systems have been good for game balance, but not for filling the galaxy
Are you sure? You shouldn't have tested the star limit with BoP. Cause it corrupts the results for this reason.:wink:
Yep, I'm sure ^^
Testing this with BoP as well as vanilla strongly incidated that the additional adjacent systems did not increase the overall number of systems. Note that we're talking about the original setup here (regarding ref. values and galactic density), with the reference values being the critical limit.

Spocks-cuddly-tribble wrote: -> If there is no other limit (low density, reference value, map grid, galaxy type...) BotF stops adding star systems after the 230th (225 if you exclude home systems), regardless of star/anomaly ratio.

It seems additional adjacent and/or starting systems are added later and they can replace (or turn into) already local existing ones.
Now this looks interesting. Maybe the 225 is used as an additional limit. Did you test this with all map sizes? I'm asking because 225 is 18*25/2, with 18 and 25 being the map size parameters for a big galaxy.

Spocks-cuddly-tribble wrote:Of course! There is no evidence for a size relation. But since 230 > 130 or 192 the value is also hard to verify.

The effective reachable maximum of star-density by small seems a bit lesser than by medium:
(too less testing to ensure significance)
Small (130) ~100 systems
Medium (192) ~160 systems

Large (450) =230 systems -> Regardless of minors!

Only additional starting/adjacent systems cause here pseudo-random increase.
A discovery consists in seeing something everybody has seen and at the same time thinking something nobody has thought yet.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7857
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Post by thunderchero »

I have been testing a little too. And I have had a maps with 240 systems. last 8 maps were all over 236
Spocks-cuddly-tribble wrote:additional adjacent and/or starting systems are added later and they cause here pseudo-random increase
Ok, now I see why I was getting more systems. extra 1 for tech 4 and extra 2 systems for tech 5. these do not count cause they are added later.

but if this was so, I should have 240 every time with tech 5 but it does not?

using tech 3 I do get 230 every time.

thunderchero
Spocks-cuddly-tribble wrote:No - placement coincidences (=same sector) cause the pseudo-random i.e. some of the 230 can be replaced by (or turned into) additional systems.

230 + (additional) - (amount of placement coincidences)
Spocks-cuddly-tribble wrote:It seems additional adjacent and/or starting systems are added later and they can replace (or turn into) already local existing ones.
User avatar
Spocks-cuddly-tribble
Code Master
Code Master
Posts: 1886
Joined: Sun Apr 27, 2008 2:00 am

Post by Spocks-cuddly-tribble »

The star system limit is found at position 0xAFA49 and at position 0xAFA94.

2 bytes signed = 32767 systems max. Default 0xE6 (230)

Note changing of the limiting value at both positions is needed!

Code: Select all

asm offsets -> code
4B0644  ->  cmp   word ptr [esp+78h+var_20], 0E6h
4B068F  ->  cmp   word ptr [esp+78h+var_20], 0E6h
Last edited by Spocks-cuddly-tribble on Fri Mar 26, 2010 8:35 am, edited 2 times in total.
I don't know how many bugs is too many but that point is reached somewhere before however many in BotF is.
User avatar
thunderchero
Site Administrator aka Fleet Admiral
Site  Administrator aka Fleet Admiral
Posts: 7857
Joined: Fri Apr 25, 2008 2:00 am
Location: On a three month training mission, in command of the USS Valiant.

Post by thunderchero »

great news!!! Great job!!!!! looks nice!!!!! :D :D
Post Reply

Return to “Star Frequency”