I have a set of arrays with the numbers of certain systems in them and need to match them with the name of the system they correspond to. I cannot figure out a way to do so.
My first thought was to make a look-up table containing the names of all of the systems in a given galaxy, but I cannot find any OXP that does anything similar. Since I can't figure out how to do it on my own, I can't use this method.
My second method would be to query Oolite for the name that a given system number in a given galaxy has, but I cannot find any documentation that suggests that something like this exists.
Does anyone have any suggestions as to how to match a system number with the name of that system?
Finding the Name of a Star System
Moderators: winston, another_commander
You mean The Oolite/Elite planet list?
http://wiki.alioth.net/index.php/Oolite_planet_list
or do you want to do it in-game?
http://wiki.alioth.net/index.php/Oolite_planet_list
or do you want to do it in-game?
That's the second time I brought up something related to matching system numbers and names and that's the second time that someone's first thought was to direct me to that page. I really should mention that that's not what I need.
I need a method in script to do that matching. I already have the lists. They're just not usable in an OXP as is.
Yes, what I need is a method to do so while the game's running.
I need a method in script to do that matching. I already have the lists. They're just not usable in an OXP as is.
Yes, what I need is a method to do so while the game's running.
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
You can query what system you're in - you could use that number to look up a position in an array - the array holding all the system names in numerical order.
http://wiki.alioth.net/index.php/Oolite ... ce:_System
However, this is from somebody who has never written an OXP (so you may wish to take your own condiment)
http://wiki.alioth.net/index.php/Oolite ... ce:_System
However, this is from somebody who has never written an OXP (so you may wish to take your own condiment)
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
system.systemIDForName and system.systemNameForID will do it in Javascript.
They take in the system's number and throw out the system's name (or vice-versa respectively). So for your purposes you'd want the latter one.
They take in the system's number and throw out the system's name (or vice-versa respectively). So for your purposes you'd want the latter one.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
- DaddyHoggy
- Intergalactic Spam Assassin
- Posts: 8515
- Joined: Tue Dec 05, 2006 9:43 pm
- Location: Newbury, UK
- Contact:
Knew if I said something dumb then somebody would immediately come along and say something sensible! Fortunately, I am a bird of very little ego.
Oolite Life is now revealed hereSelezen wrote:Apparently I was having a DaddyHoggy moment.
Nothing dumb about it at all. Those two commands are detailed on the page you linked to.
So when can we expect the first DH Javascript OXP?
So when can we expect the first DH Javascript OXP?
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link