• We have updated our Community Code of Conduct. Please read through the new rules for the forum that are an integral part of Paradox Interactive’s User Agreement.
Greetings Earthlings!

Today’s dev diary is an important one, because it deals with something that makes Stellaris stand out, something that really defines the early stages of the game: the Science Ships. These bad boys are necessary to survey unknown planets and other objects in space, finding out which resources they contain and making sure habitable planets are actually safe to colonize. Although a Science Ship can operate without a Scientist character as captain, it is strongly discouraged because skilled Scientists are required to research many of the strange anomalies you will find out there...

stellaris_dev_diary_07_01_20151102_survey.jpg


I like to compare these intrepid explorer-scientists with the questing heroes you might see in an RPG. They fly around the galaxy exploring, having little adventures, gaining experience and perhaps picking up some new personality traits. The galaxy is, after all, ancient and full of wonders. The way this works in the game is that when a Science Ship completes a survey, it might uncover an Anomaly of some sort. Each Anomaly has a difficulty level, so you often want to delay researching some of them until you have a Scientist with a high enough skill. Researching an Anomaly takes time and may result in success, failure, or, sometimes, catastrophic failure… For example, if the Anomaly consists of some strange caves on an asteroid, the Scientist could find out their origins and learn something of value, come to a wrong conclusion (the Anomaly would then disappear forever), or accidentally trigger a fatal explosion which might knock the asteroid out of orbit and put it on a trajectory towards an inhabited planet.

stellaris_dev_diary_07_02_20151102_anomaly.jpg


Anomalies are thus quite like little quests, and usually require some player choices (exactly like the “events” you’ve seen in our other games.) Some options are only available under certain conditions. For example, a special option might require that the Scientist or empire ruler has a specific personality trait.

The biggest challenge we face when writing these Anomaly events is to provide enough variation that players keep getting surprised even after several complete playthroughs. Therefore, we work with rare branches and having multiple start and end points, so that you might initially think you’ve seen the Anomaly before, only to find that this time it plays out differently...

There are other important tasks for Science Ships as well; they are required for many special research projects and for analyzing the debris left behind after a battle, perhaps managing to reverse engineer some nifty technologies (the subject of a future dev diary…)

That’s all for now folks! Next week Henrik "GooseCreature" Eklund will talk about the “Situation Log” and special research projects.
 
Last edited by a moderator:
There are simpler mechanisms. For example almost all RNGs are pseudo-random*. That means there's some kind of algorithm which gives out numbers which appear to be random. If you input the same numbers in the algorithm it will always give the same 'random' result. Just save the current state of the RNG and reloading to avoid random bad events won't work.


* It's actually pretty difficult to program a genuine RNG. Computers have to be deterministic or they won't work.
 
  • 3
  • 1
Reactions:
Just use a variable with milisekonds for multiplying and the result is random. More or less
 
  • 3
  • 2
Reactions:
With regards to abusing saves. You could possibly introduce something like we had in Baldurs gate. The traits each character gets on next level are determined at the previous level. So you could run the outcome possibilities of the anomalies a player can research over say the next 2 autosave cycles. That way we could either bite the bullet or not research it for a long time (until the Science officer has a higher level?).
Just a thought.
Actually that just encourages savescumming but at earlier date. If your late-game traits are determined by early-game traits, then you want better early-game traits and you reload till you get them.


There are simpler mechanisms. (...) Just save the current state of the RNG and reloading to avoid random bad events won't work.

I think Civilization included this option.
 
  • 1
Reactions:
Just use a variable with milisekonds for multiplying and the result is random. More or less
It's 'less'. Your approach creates a lot of predictable patterns in the 'random' numbers which is exactly the opposite a RNG is build for.
 
It's 'less'. Your approach creates a lot of predictable patterns in the 'random' numbers which is exactly the opposite a RNG is build for.
Not sooo predictable. You can also use the timecode, multible with pi and use the number after the coma with is vaulete trought the day of the month. so on de 16 uses the 16 number after the koma. :p
Lots of ways to get easily random numbers. Not THAT comlicated and, tought the use of milisekunds its quiet hard to get the same twice.
 
Not sooo predictable. You can also use the timecode, multible with pi and use the number after the coma with is vaulete trought the day of the month. so on de 16 uses the 16 number after the koma. :p
Lots of ways to get easily random numbers. Not THAT comlicated and, tought the use of milisekunds its quiet hard to get the same twice.

What if you need to calculate two random values in one function? Then in each function call your random numbers will be separated by the same amount of miliseconds resulting in correlated values.
 
@Kuschelflummi
variable which represents milliseconds resets every seconds -> only 1000 different states with two clear patterns (ascending numbers & distance between numbers is 1)
multiply by PI -> still 1000 different states, no change in patterns (ascending numbers & distance between numbers is now always 3.14)
pick a number after the decimal point depending on day -> only 10 different states now, change in patterns (nth decimal place is picked for a whole day, there's still a correlation between two numbers which is difficult to describe in a short sentence)

To point out the weaknesses:
- A millisecond time can have only 1000 different states before it loops (0-999 ms).
- Multiplying by a number makes the calculation more complex but it doesn't increase randomness.
- You have choosen a pattern to pick a number which only increases the number of recognizable patterns.
- You reduced the range of numbers (there can be only 0-9 at any point in a number).

The strong point:
- You choose PI which is an irrational and transient number. (Unfortunately there are several ways to calculate it which makes it less random than you think.)


A good RNG outputs a 32 or 64 bit number where each number isn't correlated to the other ones. And it does it in a fast way. You can't archieve that with pure mathematics.
Chip designers already consider measuring voltage changes in a chip to build a RNG. The changes depend on the workload and natural influences (which are random enough).
 
Last edited:
  • 1
Reactions:
In Clausewitz we use a Mersenne Twister that is seeded by time everytime you start a new game. Not sure if Stellaris saves the current seed in the savegame..
 
  • 11
Reactions:
Mersenne Twister... this is interesting. I always assumed something like Perlin Noise or Simplex Noise is used.
 
  • 1
Reactions:
Oh come one... every single random number generator can be calculated. It all looks just "random" You can even calculate encryptions, with enought user of Energy and parts.
If you want, put it all in a hexadezimal 64 bit string or use a 128 bit string.. doesn't chance much. Its theorethical calulatable but for the normale human, it looks random.
 
  • 1
Reactions:
every single random number generator can be calculated. It all looks just "random"
That's why they are called pseudo-random.

Its theorethical calulatable but for the normale human, it looks random.
Don't underestimate what you are. Humans are great at pattern recognition! Almost our whole brain is in fact a biological pattern recognition maschine, the greatest there is. Even our computers can't match its abilities.
 
  • 1
  • 1
Reactions:
My point was.you can calculated "random numbers" in a way, that it is nearly impossible to reproduce the outcome.
 
  • 2
Reactions:
Each Anomaly has a difficulty level, so you often want to delay researching some of them until you have a Scientist with a high enough skill. Researching an Anomaly takes time and may result in success, failure, or, sometimes, catastrophic failure…

This sounds like a really bad design decision. Can the developers explain what this "gamey" system adds to the game, vs being able to start research on an anomaly right away, and getting qualitatively varying results depending on skill level? It's completely unrealistic that a civilization would find something and decide not to research it for a few years, until they got better skill. How would they even know that their skill wasn't high enough?

This sounds like really lazy system/mechanic design, and is the fisrt thing I've read about Stellaris that I've truly disliked.
 
  • 5
  • 4
Reactions:
In Clausewitz we use a Mersenne Twister that is seeded by time everytime you start a new game. Not sure if Stellaris saves the current seed in the savegame..
If it's seeded at game start only, I take it that means an event/result will repeat if you approach it the same way, but differ if you go back and do it on a different time. Or in a different order.

I remember in X-Com it remembered I had a bad shot, but I could give it to someone with 100% chance to hit and then try again with the guy who had difficulty hitting.

Don't underestimate what you are. Humans are great at pattern recognition! Almost our whole brain is in fact a biological pattern recognition maschine, the greatest there is. Even our computers can't match its abilities.
It is indeed very good, but it also gives a lot of false positives so you'll often get a feeling it isn't random when it actually is. Especially if you get an idea of how it works you'll be susceptible to confirmation-bias, where you primarily remember the times when you were right and tend to forget the other times.
 
In Clausewitz we use a Mersenne Twister that is seeded by time everytime you start a new game. Not sure if Stellaris saves the current seed in the savegame..

Can you please make sure that you do, and implement the ability to seed a new galaxy with a given seed? Some galaxies could be interesting to share.
 
It seems like these events are a perfect item to draw from the minds of your customers/fans/loyal minions. Especially since we're talking about creative seeds that your team will otherwise have to come up themselves.

Why not do some crowdsourcing of ideas along these lines? I'm sure everyone here (and on Facebook) would love to contribute something to the development of Stellaris!

--Khanwulf
 
  • 1
Reactions: