Probability of monster hatching from nests?

Describe your experience with the latest version of FreeOrion to help us improve it.
Forum rules
Always mention the exact version of FreeOrion you are testing.

When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Post Reply
Message
Author
User avatar
Oberlus
Vacuum Dragon
Posts: 661
Joined: Mon Apr 10, 2017 4:25 pm

Probability of monster hatching from nests?

#1 Post by Oberlus » Fri Jul 28, 2017 10:43 am

Playing 2017-07-25.7e2d33a_Test_Win32

I'm repeating a map setting+seed to check how different AI's aggressiveness settings affect its performance. In the first time, I got a juggernaut nest around turn 50 and got more than ten juggernauts in the following 50-70 turns (so 1 new juggernaut per 10 turns most). Now that I'm repeating the map I went straight forward to get that nest (not for the military power because, jeez, they are so slow, but to avoid having many juggernauts wandering and killing my outpost ships), so I got it around turn 15. Now I'm turn 55 and I've got no juggernauts yet (so ratio now is less than 1 juggernaut per 40 turns).
Differences with previous game are that now I've got domesticated megafauna after outposting the nest and that the outpost was disconnected from main supply group until turn 48 or so.
So I'm wondering what is the base probability of monster hatching (particularly juggernaut hatching) and if it is affected by game turn, getting megafauna before or after outposting, being connected to a supply group, having an exobot colony on it or anything else.

Edit: I found monster hatching from owned nests is controlled by MONSTER_NEST(JUGGERNAUT,juggernaut,0.06), with that macro defined in monster_nest.macros. If I understood it well, probability is 6/100 per turn and it is not affected by anything appart from having the domesticated megafauna tech (not having would mean probability 0). So the chances to not get any juggernaut in 40 turns is 0.084 (0.94^40), so I guess it is reasonable to not having got any juggernaut yet.

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Probability of monster hatching from nests?

#2 Post by MatGB » Fri Jul 28, 2017 1:08 pm

Pretty much, yes, it is actually random and while the seed generator can be a bit iffy at times you do still get good and bad periods for any random effect.

For what it's worth, doing something with domesticated monsters has been on the low priority todo list for scripting for years now, various random ideas have been kicked around including flagship effects to boost their speed and similar, if you're up to reading the scripts you're up to playing around with them ;-)
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

Post Reply