Random system generation with constraints

I'm trying to use AstroSynthesis for help in mapping a space RPG I'm running. What I am having problems with is adding the systems that are already described in the game as they do not contain enough information. For example, it will give the star name, position, spectral class, and number of planets, then only describe the one planet that is inhabited. I have looked at some of the sample scripts for generating new system bodies, but the function "RandomSystem" is a bit too random. Is there any way to tell it how many objects to create? I have tried writing my plugin so that if there are less than X number of children it calls the function again, but anything higher than eight children is difficult to get (I have it quit after 1000 tries).

Is there another function to use other than RandomSystem, or are there additional arguments that can be passed other than parent body and generate population true/false?

Thanks for any help.


  • Got it to work more reliably for larger number of planets. It would still be nice to have some more control over the randomness though.
  • Any other luck? Ed_NBOS is isn't very helpful is this regard, but maybe some others around here are.
  • My final version just uses the RandomSystem function and checks how many children were created compared to how many were requested. If the numbers don't match, it tries again. I have it time out after 1000 tries. The majority of the time it succeeds, and when it doesn't I just try again. The maximum number of children in a system appears to be 15.

Leave a Comment