Populating Imported Sector

Hello, folks.

I've just finished editing the HYG online catalog for stars within 50pc and imported it into AS; almost 8,000 stars. I had thought there was a system generator to populate all the system contents - planets, moons and what not - but rediscovered that it will only populate stars when creating a New sector.

So, my question is, are there any plans - or, is there an existing set of code - to include a routine to randomly, with some parameters, generate system contents for an existing sector?

I don't look forward to generating the contents of 8,000 stars...

Comments

  • edited September 1

    You'll probably need a script that looks something like this:

    #plugin     Generate From Existing
    #author     NBOS
    #desc       Runs the generator against existing stars on the map.
    
    oSector = GetCurrentSector()
    j = oSector.SystemCount()
    
    
    for i = 1 to j 
        o = oSector.GetSystem( i-1)
    
        #true to generate populations, false to not
        RandomSystem o, false
    next
    

    Save that as GenerateFromExisting.AstroScript in the plugins directory, and restart astro. It should show up in the plugins menu. You may have to expand on it depending on the behavior you are looking for.

    The scripting doc is here:
    https://nbos.com/support/docs/AlienAPI

  • Oooo! Thanx, Ed! Is there any documentation on available functions - like the .getsystem and .systemcount? That sort of library would be really useful.

    Thanx again!

Leave a Comment