It looks like you're new here. If you want to get involved, click one of these buttons!
Hello, Either I am not understanding you or you are not understanding me.
This was my original question
Response I got
Hi,
Yes, you can have more than one field. But they can't be the same name.
What I would do is use System Data Fields (Sector-Sector Properties from the menu). Define a custom field for each type of body (terrestrial, etc) that you want to have one. Then the values will show in the system data tree.
Ed
I do not want for example separate fields for different types of bodies asteroid would only have custom field of mining, terrestrial would only have custom field of manufacturing
I want where some terrestrial worlds have a custom field of mining and other terrestrial worlds have custom field of manufacturing.
I want this to be randomly generated so I do not have to edit each terrestrial world, can this be done if so how?
-thanks
Comments
A custom field contains both a name and a value. Like "Gravity: 0.9". Or "Industry: mining". You can have any number of custom fields, but the name of the field must be different. So a body can't have two "Gravity" fields, for example.
What it sounds like what you want is not sector-wide custom fields. Rather you want to configure the System Data Fields (what gets displayed in the info tree). To do that, use Sector->Sector Properties from the menu, and go over to the System Data Fields tab. Navigate to the type of body in question (such as 'Asteroid Belt'). Right click over it and select "Insert New". Set the values for this new data field like this:
Now whenever you select an asteroid belt in the system data tree, you can right click on it and use the 'additional fields' tab to populate the custom field.
The result will be show in the data tree (as well as in the sector report if generated):
Note - if you don't check 'hide if zero' when setting the new system data field up, it will let you display arbitrary text without a value if you want.
These fields can be filled randomly using the scripting API. It will involve iterating all the bodies in the sector and setting the field for matching objects in the script. So long as you have the System Data Fields configured using the above, the field values will show up in the system data display.
Hello, I understand a world cannot have more then 1 custom field of industry, but that is not what I am asking. This is what I want when I randomly generate a sector. For example in star system alpha there is a terrestrial world I want to have a custom field industry mining and in star system beta there is a terrestrial world I want to have a custom field industry manufacturing now I know I can edit the custom field of each world, but I want to include the different custom fields in the random sector generator. Resulting in different terrestrial worlds randomly having different custom fields of industry some being mining and some being manufacturing some having none.
To do that, you'd want to configure the system data fields as I describe above, and create a script that assigns a value to an 'industry' custom field on each planet.
Here's the scripting API doc:
https://www.nbos.com/support/docs/AlienAPI/
Hello, this is the second time in two separate questions I have been led to AlienAPI. I have zero training, understanding, and experience in any type of programming since AlienAPI seems to be the solution I require, are there any video tutorials on how to use it. I ask because this is how I have realized I best learn things. If there isn't are there examples that I can study and even experiment with such as simply by editing. I mean in the same way I was taught math I was given a formula and I just had to use the same formula to get the expected answer. I could even reverse engineer it by editing letter variables for number, which is a key element in algebra.
I've added an example plugin script that iterates all bodies in a sector and applies an Industry custom field depending on the properties of the planet.
https://www.nbos.com/nox/item/1113
Download this file and place it in the /Plugins directory under Astro, and then restart the program. It'll show up under the Plugins menu. You will also need to configure the System Data Fields as described above.
This script has a function called SetFields() which is where you decide whether to add an industry field, and if so what it should be based on the properties of the body.
Thank you, I will see what I can do.