A quick question please

Hello,
I just bought Astro 3. I had downloaded the free trial to see what it was like, played around with it and I loved it. I have read that the scripting documentation isnt ready for Astro 3 yet so I have a question.

Im wanting to randomly assign a race to each inhabited planet. Does anyone know how to script a plugin for this? I have a list of 14 possible races.


http://www.theqcontinuum.com

Comments

  • There's a couple scripts in the download area that show you how to iterate through all the bodies on a sector.
    http://www.nbos.com/nox/index.php?pcatid=37

    What you'd need to do is iterate through all the bodies, and if one is populated, add a field called something like 'species', and set it to the race you want. Then in the system data config setup for the sector (sector-> sector properties, ssytem data fields tab), add 'species' as a field to terrestrial planets. That will show the race along with the rest of the usual data in the system data display.
  • Ok in System Data Fields of the sector properties I have added Species. It offers a Display text, Data Source, Field Source and hide if zero or empy.

    I have a plugin that will scan all habital bodies, roll for random species and will put it on the GM Notes. But im having a problem getting it to update the system data.

    The Data Source drop down doesnt show my plugin data so I put the name of my plugin in the field souce. Is that right? I can get the Species to show up on the System Data list above population but not what kind, its blank.
  • You're close. You dont want to add the species to the GM Notes. You want to add it as a custom field to the body.
    o.SetField "species", "Ferengi"
    

    In the sector settings, set the 'data source' for that new system data field you made to 'customfield', and the 'field source' to 'species'. It wil then show the 'species' field when you click on a planet that has that field assigned.

    Oh, after you add the species field to a body, mark it as modified so that Astro knows to save it. So call
    o.ModifySystem
    
    on the planet object.
  • I finally got it. I used what you advised but had to make some minor changes since it didnt work. What I did was chiChild.SetField "Species", Ra and it works fine. It places the random species to each populated planet.

    Now my question is what is the code for space stations? LIke chiChild is for planets of a star, what is the code for space starions?

    Thanks for your help.

    Peace.
  • What im trying to do now is determine who is occupying the stations. Are they from nearby systems or a species who is living in a dead system on a space station/ship.

Leave a Comment