Page 2 of 2

Posted: Wed May 07, 2008 11:12 am
by LittleBear
I have Globe Stations, TransHab and Gritty Corrolis installed, all of which work by giving the OXP stations the role Corollis / Dodec. When playtesting Assassins I had to fly (a lot!) round systems where the Native Station was replaced. The Corrolis at Ataneris (G7) for example was always a TransHab however many times I visited the system. I think that (at least with the same commander loaded) the replacement is consitant, but it might not be with a different commander.

Posted: Wed May 07, 2008 11:41 am
by Commander McLane
I seem to recall the same behaviour when I had Globe stations installed (I haven't yet flown around enough with Transhabs), so maybe it is pseudo-random. I just would like to be sure (and so would the creators of the stations in this thread, I presume).

Posted: Wed May 07, 2008 6:57 pm
by JensAyton
Commander McLane wrote:
There is one final question, Ahruman: Does the internal system selector use random or pseudo random?
All random numbers used in Oolite (and most software, except cryptographic software and for-pay gambling stuff) are pseudo-random, that is, they’re produced by a function that generates numbers in a non-obvious sequence. By setting the seed (effectively, the starting number) of a pseudo-random number generator to a specific value, you can generate the same sequence repeatedly. This is how numbers are generated for procedural content.

One of the big problems in hacking on Oolite is that it’s generally not clear whether any given random number is supposed to be using a fixed seed. Two different PRNGs are used, and both are used both for procedural content and “really random” things.

Now that you ask, it seems that a fixed seed is being used for selecting stations. This will be the case in 1.72 as well, but the different (more efficient) ship selection algorithm will give different results, so you’ll have a different fixed set of stations. Additionally, adding new station OXPs will reshuffle all the station. There’s no work-around for this currently except explicitly specifying stations in planetinfo.plist. A possible future direction would be adding system scripts to do planetinfo.plist-style stuff dynamically… actually, I’ve got a quite elaborate scheme in mind there, but being elaborate it’s a post-MNSR thing.

Posted: Fri May 09, 2008 6:04 am
by Commander McLane
Ahruman wrote:
Now that you ask, it seems that a fixed seed is being used for selecting stations. This will be the case in 1.72 as well, but the different (more efficient) ship selection algorithm will give different results, so you’ll have a different fixed set of stations. Additionally, adding new station OXPs will reshuffle all the station.
If I understand correctly, you are saying that - using the probability weight (as opposed to setting up a planetinfo.plist) - in 1.71.1 and previous versions the stations will always be the same. In 1.72 they will also always be the same, but other stations than there were in 1.71.1 and previously. There will also be a change of the complete set of stations, whenever new stations come into the mix through a new OXP.

But the end result is: Once the player has put all station OXPs into his AddOns-folder and fires up the game, he will reliably find the same station in the same system. (Although it may be a different station from before 1.72, or before installing a new OXP.)

And that's the answer Griff and pagroove have been waiting for.

*****

On a different topic: A while ago I had the question how the seed actually works, meaning: how is the next value determined from the start value? Nobody has yet answered it. Can you?

Posted: Fri May 09, 2008 2:00 pm
by JensAyton
Yes.

Posted: Mon May 12, 2008 12:48 am
by pagroove
Gentleman,

Thanks for the insight!
8)