Page 3 of 3
Re: planet numbers for missions
Posted: Mon May 02, 2011 6:21 pm
by Smivs
Just added more to the above, in case you missed it.
Re: planet numbers for missions
Posted: Mon May 02, 2011 6:42 pm
by Staer9
in your post you called world scripts the 'world-scripts.plist' and the 'worldscripts.plist' which is correct?
Re: planet numbers for missions
Posted: Mon May 02, 2011 6:46 pm
by Thargoid
There are two basic ways to get this type of javascript script (an "always running" background script, as opposed to a script associated with an NPC ship), both of which have been mentioned above.
The first is to call the file script.js and to put it in the config folder of the OXP. That's the simplest way, but you can obviously only have one such file per OXP.
The second is to call the file whatever you want (but with the suffix .js) and place it in a folder called "scripts" in the OXP. There can be as many scripts there as you want, and can be a mix of such world scripts and also ship-related ships. But by default the OXP will not see these, so you need the other file (worldScripts.plist) which is basically a list of the scripts in the scripts folder that should be run as world scripts by the OXP. All it is is essentially an array listing the script names.
Hope that's a little clearer.
Re: planet numbers for missions
Posted: Mon May 02, 2011 7:33 pm
by Kaks
Apart from using js, (system.ID will always tell you the id number of the system you're at), the wiki has got quite a lot of other info too: for example, you can always look up the various planets' names & IDs (& quite a lot more besides) if you have a look here:
[wiki]Oolite_planet_list[/wiki]