planet numbers for missions

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

User avatar
Smivs
Retired Assassin
Retired Assassin
Posts: 8408
Joined: Tue Feb 09, 2010 11:31 am
Location: Lost in space
Contact:

Re: planet numbers for missions

Post by Smivs »

Just added more to the above, in case you missed it. :D
Commander Smivs, the friendliest Gourd this side of Riedquat.
User avatar
Staer9
---- E L I T E ----
---- E L I T E ----
Posts: 570
Joined: Fri Feb 18, 2011 4:53 pm
Location: Hatfield, Hertfordshire (poor industrial)

Re: planet numbers for missions

Post by Staer9 »

in your post you called world scripts the 'world-scripts.plist' and the 'worldscripts.plist' which is correct?
Image
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: planet numbers for missions

Post 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.
User avatar
Kaks
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 3009
Joined: Mon Jan 21, 2008 11:41 pm
Location: The Big Smoke

Re: planet numbers for missions

Post 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]
Hey, free OXPs: farsun v1.05 & tty v0.5! :0)
Post Reply