Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.98a is out! (03/27/25)

Author Topic: Coronal Hypershunts and Orbital Solar Arrays only spawn sometimes for some seeds  (Read 865 times)

5centmike

  • Ensign
  • *
  • Posts: 4
    • View Profile

I've seen variants of this bug reported previously but not recently, so I wanted to post that this was still occurring. The same seeds can have different coronal hypershunt locations. The other feature I have observed being non-deterministic is orbital solar arrays.

This seed MN-6470290063350753680, for instance, sometimes has a coronal hypershunt in Zeta Lamya and sometimes does not. From my own very small sample size, it may be related to choices made during character creation, like the starting fleet or difficulty level.

If it would be helpful I can provide the campaign.xml files. I could also generate a large set of campaign.xml files generated from the same seed with different character creation choices.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26044
    • View Profile

Thank you for the report! Just to confirm, is this vanilla or with mods?
Logged

5centmike

  • Ensign
  • *
  • Posts: 4
    • View Profile

I'm on game version 0.97a-RC11. I have two mods installed that I don't think would affect sector generation:

LazyLib 2.8b
Animal Portrait Pack 0.1
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26044
    • View Profile

Thank you!

Thinking about this, the number of officers in your start *might* affect it; made a note to check into this at some point.
Logged

5centmike

  • Ensign
  • *
  • Posts: 4
    • View Profile

Happy to be of help. I have done a little more investigating using a script that automates the generation of new save files, and then another to parse the campaign.xml files to find the hypershunt locations. Using the same seed I posted above I generated 140 sectors with different combinations of starting ships and difficulties selected at game start. Here are the locations of the 280 hypershunts across those 140 generated sectors:

Zeta Lamya        116
Beta Ala          114
Kigameng            8
Alpha Morum         7
Ukobach             5
Gamma Lamya         3
Ranyox              3
Epsilon Enyen       3
Delta Anyang        3
Beta Kalahari       3
Vucub-Came          3
Gamma Anyang        2
Marax               2
Epsilon Deina       2
Maderakka           1
Neter-hkertet       1
Beta Meleuthia      1
Carcus              1
Gamma Sidor         1
Sawal               1

I did not see any immediate correlation with the starting ship or difficulty selection and where the coronal hypershunts spawned. The distribution is very curious though and hopefully can give some insight into what may be going on.

I will generate a larger dataset using my script and see if I can find any statistical patterns. I will also try to look at orbital solar arrays which I have also observed as being stochastic.
 
Logged

5centmike

  • Ensign
  • *
  • Posts: 4
    • View Profile

TL;DR:
  • Sector generation for this seed (maybe all seeds?) has a small chance to choose different hypershunt locations.
  • Most blue stars in the sector can be chosen but not all.
  • Other options selected at game start do not have an impact.
  • Hypershunt locations are chosen in pairs, not individually and with a relatively uniform pattern suggesting a multinomial (choosing randomly from a fixed set of options) distribution.

I'm back with a larger sample size. I generated this sector (MN-6470290063350753680) 100 times for each possible set of starting choices to be made at game start. 1,2,3,4, or 5 for the starting fleets, 1 or 2 for companion ship if you picked a starting ship instead of a starting fleet, and 1 or 2 for easy or normal difficulty. There are 14 total combinations * 100 generations * 2 hypershunts =  2800 total hypershunt locations. These are the results for the hypershunt locations across all of the generated sectors, the generated sectors where the first option was always chosen at game start, and the generated sectors where the second option was always chosen at game start: (and please don’t worry about my sanity, ChatGPT formatted the table for me)

Sample All Option 1 Option 2
Zeta Lamya 1142 82 88
Beta Ala 1132 80 88
Ukobach 65 5 2
Kigameng 60 7 3
Ranyox 37 2 2
Vucub-Came 36 1 0
Marax 35 3 3
Gamma Lamya 32 3 1
Epsilon Enyen 30 4 2
Neter-hkertet 30 2 1
Alpha Morum 28 5 2
Maderakka 26 2 1
Gamma Anyang 20 0 1
Delta Anyang 18 0 1
Beta Kalahari 18 0 1
Zeta Mbombo 16 0 0
Epsilon Deina 13 0 0
Carcus 13 1 2
Beta Meleuthia 11 0 1
Gamma Sidor 11 0 1
Sawal 10 2 0
Delta Kestral 9 1 0
Elsbeth 8 0 0

From the total data we can make a few key observations. There is obviously a strong bias towards the hypershunts being at Zeta Lamya and Beta Ala, but it's actually possible for the hypershunts to spawn at most (but not all!) of the blue giants and supergiants outside of the core in this sector. However, even excluding the Zeta Lamya and Beta Ala systems there is still a bias towards some blue supergiants over others with a large distribution from 65 to 8. This does not match a normal distribution that we would expect from a random selection of any blue star outside of Zeta Lamya and Beta Ala.

Looking at the rightmost columns we can see that breaking it down by the options selected at game start shows that they have no effect. Generating 100 sectors for each set of selected options showed that Zeta Lamya – Beta Ala was chosen approximately 80/100 times for every set of starting conditions.

I was next curious whether the two systems selected for hypershunts were correlated. This heatmap depicts the frequency of each pair of hypershunt systems across all of the save files:



As we can see the locations of the two hypershunts are tightly correlated. The heatmap is largely empty, meaning that most combinations do not occur and indicating that the selection of the two hypershunt locations are entangled. Some hypershunts only occur with one other hypershunt, like Beta Kalahari and Delta Anyang. Some hypershunt locations can occur with multiple others like Kigameng with Alpha Morum,  Maderakka, and Neter-hkertet. Looking at the data broken down in this way we can also see that the distributions are more even. The hypershunt locations outside of the Zeta Lamya and Beta Ala pair that are the most common, such as Kigameng and Ukobach, are the systems that have the most other partners.

This looks to me like it could be explained by a multinomial distribution, basically drawing marbles out of a bag where each system pair is a marble. The majority of the marbles are Zeta Lamya – Beta Ala, but one of the marbles in the bag is Zeta Lamya – Epsilon Enyen, and two of the marbles are Beta Kalahari – Delta Anyang, etc.

I will go ahead and run my script to generate results for another seed to compare the distributions to understand whether this seed is unique or if this stochasticity is present in all seeds. I might also take a look at orbital solar arrays. Hopefully this is helpful in narrowing down where the bug might be occurring. Even if it isn't, I'm enjoying myself :) so thanks for humoring me. I would also just like to say I bought this game in 2012 and have been playing it ever since, so I want to thank you for the years of dedicated development and the inspiringly well-crafted game and I hope I can contribute in some small way to the project by helping you find this bug.
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 26044
    • View Profile

Haha, I was going to say, it looks like you're having fun with it :)

Tracking this down is probably going to involve trying to figure out what *other* thing gets the RNG off the rails, it's unfortunately extremely open ended as to what that might be, could be just about anything!

I would also just like to say I bought this game in 2012 and have been playing it ever since, so I want to thank you for the years of dedicated development and the inspiringly well-crafted game and I hope I can contribute in some small way to the project by helping you find this bug.

Thank you so much! I'm happy you've enjoyed it over the years <3

(... 11+ years, seriously? That's just wrong somehow.)
Logged