Random Station Names OXP (Development Thread)

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

Moderators: another_commander, winston

User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16059
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Random Station Names OXP

Post by Cody »

All 2048 main stations are handwritten, right? So it should be straightforward for a dumb pilot to rename one of them... yes?
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Random Station Names OXP

Post by montana05 »

I hope, same like Random Ship Names, there will be some custom handling, like assigning a particular pool to a station or switch it entirely off. Even better, handling via js so that, for example, like in a condition script I could modify systems from a chosen government type only. :oops:
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP

Post by LittleBear »

Yes to both.

It will name all current OXP stations on release.

If you add the role "random_stations_name_this_station" to your station's OXP shipdata then random stations names will name it.

By default though it won't name other stations if they already have a unique name and it won't name stations released after its release date unless the flag for Random Station Names to name the Station is up in shipdata. So the default is no as I'm assuming other authors are either using their own pool of names to name their station or don't want it to be named by random stations names if they haven't set the flag in their OXP to tell Random Station Names to name it.

This OXP works in a similar way to Random Ship Names. However, because you want the names of ships to change Ransom Ship names can do its dice rolls on the fly. As you want the names of the stations stay the same I have to roll my dice in advance and store them in the OXP's Script file.

So to do still are the names for the Stations for Extra Planets (8,000 odd) and Kitira Stations (4,000 odd). I then have to give my generator a cup of really hot tea and turn it on.

I'll release it with about 20,000 spare names in the random_stations_name_this_station array for other OXPers to use if they want to.

Any name can be overwritten by planet info. I've going to use it to squash any name duplications that come up.

The OXP names all the stations added by Commie's OXP to an appropratley Commie style. But you could use the same code to name both main and oxp stations in a particular Govenment / Tech Level / Econonmy Type to your own custom pool of names for stations in a system matching the variables you set for it. EG you could set a name pool only used in Rich Agricultural Demoncies with a Tech Levl of less than 9 (say).
Last edited by LittleBear on Sun Jan 10, 2021 12:42 am, edited 2 times in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16059
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Random Station Names OXP

Post by Cody »

LittleBear wrote: Sat Jan 09, 2021 11:52 pm
Any name can be overwritten by planet info.
Sweet! I'm in and out of my home system a lot (the Ceerti hub is where I find the best parcel contracts) - if the name just happened to be one that grated on me, I'd be inclined to change it. Ditto with the witchpoint beacon.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP

Post by LittleBear »

For supporting other OXPs and preventing conflicts (and to allow easy changes by players), the way I've done it is:-

For players. If there is a station you would like to name, either because its your home system or you just don't like the name assigned to it: Open the OXP's script.js file with a text editor. Type the name of the station you want to rename into Find. (This must be exactly as you saw the name in game). Type the name you want to give the station into Replace. Click Replace All. Save the script file. The next time you load Oolite in your personal game the stations name (or names) you changed will now be the names you gave to those Stations.

For OXPers, If you want to change the name of a station you can do this by one line in your script which tells Random Station Names not to name that station. Random Station names will then be switched off for the station you have specified. The station will not have any name assined to it and it will have whatever name the OXPer wants to give it.

Random Station names includes a procedural generator which can be turned on. When in devolopment mode it will not name any stations. Instead it will ask for a word list or lists to enter into the generator. It will then generate 256 names using the word list given and store these as a string in your save file. So to use Random Station Names in your own OXP all you need to do is think up some words you would like to use that will fit your station style, turn on Random Stations Development Mode (on the F4 OXP Config Screen).When you've done your word list, type 'em in. Fire up Oolite and the generator will generate 256 names for you. You would need in your script:-

Code: Select all

var mystationpool = [];
Copy and Paste the 256 names generated into the pool between the [].
You then need to add:-

Code: Select all

if(ship.hasRole("my_station_role")) ship.displayName = ship.displayName+": "+mystationpool[system.ID&255];

If your station has a beacon and you would like the name of your station to also appear on the ASC then also add:

if(ship.hasRole("my_station_role")) ship.beaconLabel = "MY STATION NAME: "+mystationpool[system.ID&255];

I think going this way would have the advantage to other OXPers of:-

1) Your OXP is not depended on any other OXP being installed. Your stations will be named even if the player does not have Random Station Names installed.
2) Your station is named in a style you've chosen and suitable to your station.
3) Your stations will always have the same names regardless of whatever other station OXP the player may have.
4) The names of your stations will be the same for all players of the game. So you can if you like in mission text refer to the name of the station and it will be correct.
5) You get the fun of naming your creation.

The reason the OXP generates batchs of 256 is that this is this is the number of systems in each galaxy. So even if your OXP added a station to every system in the game all your stations would be named. You can also specify galaxy if you wanted every station to have a different name then you roll the dice for 8 pools if you like. Random Station Names OXP, naming 12,000 odd stations is only 177k, so using this method will give all your stations a unique name you have chosen and only adds a few k to your OXPs download file.

Using the generator also means that you don't have to faff around working out where the stations you want to name are. And if you later change the number of stations or where they appear, it doesn't matter as everyone of your stations will be assigned a unique and persitant name from your array as you have a name for every system in the game. If your oxp doesn't generate a station at that particular system then the name will not be used. But if it does then it will be.

How varied your names will be depends on how many words you used. A simple 4 x 4 gives 16 combinations. 8 x 8 gives 64, 16 x 16 gives 256, 32 x 32 gives 1,024. How many words and combination lists you want to enter is up to you. If your OXP only adds a handfull of stations to the game then a simple 16 words will be enough to give your stations unique names. You can also nest, so you could generate 512 combinations with three lists of 8 words. All of your stations would have unique names, but as you used only 24 words in total they will all be kinda similar. If you want a more complex effect then a 16 x 16 x 16 gives 4,096 combinations. But as you are substituting a name from each list on each roll your stations will all feel more unique. If your OXP is only adding a few stations you might chose to just make up the names yourself and type them in manually to the pool. This will also work. You don't have to have 256 names if you don't want to. Just typing in 32 names into your pool would give every station a unique name up to 32 but would then loop back to the first name. So if you added a simple array of 32 hand crafted names but your OXP adds a station to every system, your name list would still work, but 8 of the 256 stations your OXP is adding per Galaxy would have the same name.

This is how I've been writing this OXP. For example, their is a certain station added by anarchies oxp the inhabitants are somewhat secretive. So I added 32 words meaning sneaky underhand etc and combined them with 32 names of animals known for being sneaky. That generates 1,024 combinations. Having thought up 64 words I typed them into the generator and fired up Oolite. 256 names were dropped into my test commander's save file. I then C&Ped them into my script. Only 256 are outputted to the name array. This station only appears at about 25 systems per galaxy. So I am more or less guaranteed a unique name per station. IF there is a repetation then its not a major issue that somewhere in the 256 systems of G8 their is a system where the Hacker Outpost has the same name as one somewhere at a system in G1, as this won't be noticed. If you are feeling particularly OCD about it and you want to make sure there are no duplications, the list of 512 words in your script file is something you can proof read and if you spot a duplication just type in a hand written name instead.

Thinking up 64 words was quite fun and didn't take very long and gave me names like:- var hackerpool = ["Uncanny Cat", "Creeping Fox", "Cloaked Raven", "Illusionary Serpent", "Creeping Cat", "Glass Genius", "The Invisible Stoat", and so on].

As all the OXP is actually doing is procdurally generating from the words you give it. Shipbuilders can also use it to generate names for there ships which are unique to their style of ship if they wish to. If you type station type words in then it will generate names approprate to stations. But if you type ship type words in it will generate names approprate to ships.

I will include a general naming key for OXPers to use if they like. But the general key will generate (of necessarity) names that are somewhat generic as the name has to work with any type of station. Adding the general key to your station will give all your stations a unique name. But they will be in the same style as those of another OXP also using the same generak naming key. Ships are added by the role "trader" "pirate" etc. Stations however are added by the role "Station" or the unique role given by the OXP's writer. So the code in Random Ship Names can assing appropate names. Although as humans we know the style of a particular station, there is no way for the code to detect wheather a station is the home of a bunch of Mad Money Lending Monks, a Taxi Service, a wretched hive of scum and villany or a military base. This is why in naming the existing stations I've gone with the pool method and assigned a unique pool to each type of station.

The suggested method therefore will be the "home brew" pool method. The OXPs descriptions file contains all the word lists I've used. So other OXPers can poke around the names lists and custom build a template for their OXP using my word list or use their own custom lists. Random Station Names will do the donkey work of generating the names for your station. Leaving the other OXPer to do the fun bit of thinking up some words to name their station in a style they have chosen.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4999
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Random Station Names OXP

Post by Cholmondely »

LittleBear wrote: Wed Aug 05, 2020 7:08 pm
Random Station Names OXP – LittleBear & Milo (Version 0.02 – 5th August 2020)
Did you see this?
Disembodied wrote: Mon Mar 14, 2016 9:57 am
Nice! Would it be worthwhile giving the stations designations other than just "station"? E.g. something like

Human/humanoid station: Station
Feline: Starbase
Frog: Starport
Rodent: Orbital
Lobster: Anchorage
Lizard: High Harbour
Insect: Hive
Bird: Nest
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP

Post by LittleBear »

More random ship names that inspired me. I'd not played Oolite for a long time and that feature really blew me away. As I'd used procedual generation to create the adverts in Random Hits and I could see Random Ship names was doing the same thing. So when I had an hour or two to play Oolite I thought up some names for the generator. After about 6 month of on off activity I had a generator with something silly like 30,000 words and phrases that it combines together. Trouble was I couldn't generate names on the fly in the way ramdom ship names does as then all the station names would change everytime the player jumped. So I was a bit stumped until I thought of just doing the dice rolling in advance and saming the results in the text file. It does mean the array contains about 100,000 names (and there are only about 12,000 stations playing with single station adding OXP in). But as it's all text and Oolite only loads the name its actually uses it doesn't really matter in terms of game performance.

It'll probley take me another month or so playing an hour so a day and doing my dice rolls. But by just flying around rolling off names I've visited about 100 or so sytems in each galaxy. All seems to be working. Kiota and Extra Stations are a bit of a pain as they can add up to 4 stations each per systems. So they need (grr) 4 separate pools each so it can name the 1st station in a system with the 1st pool, 2nd in the second pool and so on. As they can pop up in any system and any galaxy it means I got about 65,000 odd to cover every station (otherwise all of these stations in the same system would have the same name. The styles alternate so where an oxp adds multimatle stations each one has a unique name in a different style.

When in 'cheat mode' it awards infinate fuel and galaxy drives. It also adds a handy rock hermit by the witchpoint with auto dock. So rolling off names is just. Make a jump. Auto dock with the hermit. C & P 256 names in array. Risee and Repaet. I can roll off about 2,048 with an hour or so just messing around on Oolite and jumping about a bit. The code is done, but I'm combining my playing Oolite ttime with rolling off names. So it'll probaley take me a few more weeks to finish it.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP (Development Thread)

Post by LittleBear »

Teaser below. Still to do are:-

Roll off names for the keys for other OXPers to use.
Add the Local List of Stations to the F4 screen.
Add an options menu to allow other OXPers to procedurally generate names in game to use in their own OXPs.
Add Galaxtic News updates.

Image

Image

Image
Last edited by LittleBear on Thu Feb 11, 2021 3:14 pm, edited 1 time in total.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4999
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Random Station Names OXP (Development Thread)

Post by Cholmondely »

Looks nice!

Only problem ... I can't find the Old Forest Sector in Ashoria! Is it somewhere else?

http://wiki.alioth.net/index.php/Lave_(Rough_Guide)
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP (Development Thread)

Post by LittleBear »

Corrected to Riverside Sector, Ashoria. Was the Old Forest Sector until they cut down all the trees to build the Bureau of Records, now known locally as the Riverside Sector :wink:
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
Cholmondely
Archivist
Archivist
Posts: 4999
Joined: Tue Jul 07, 2020 11:00 am
Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
Contact:

Re: Random Station Names OXP (Development Thread)

Post by Cholmondely »

LittleBear wrote: Thu Feb 11, 2021 5:17 pm
Corrected to Riverside Sector, Ashoria. Was the Old Forest Sector until they cut down all the trees to build the Bureau of Records, now known locally as the Riverside Sector :wink:
Ahah! They don't tell us much about the history of Lave over in Digebiti!

Did the trees look impressive?

Actually, does Ashoria look impressive? Do you reckon that it is worth visiting?
Comments wanted:
Missing OXPs? What do you think is missing?
Lore: The economics of ship building How many built for Aronar?
Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP (Development Thread)

Post by LittleBear »

It was quite a local issue. The trees of the Old Forest provided the perfect environment for raising high quality edible grubs. When the Planning Permission Application was lodged, there were strong objections from the Laveian Tree Grub Farmers Association as to the effect this project would have on their livelihoods. Lave being a Dictatorship however, the issue was quickly resolved. The High Director of Planning carefully considered their objections. And then had them all shot.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP (Development Thread)

Post by LittleBear »

The nature of the OXP is that I don't think V1 will contain bugs as it can't really break the game. But I'm bound to have made typos and spelling errors somewhere. It is possible that there might be two stations (but several galaxies apart) with the same name if the random number god was a bit unkind. So I'm pretty sure there will be a V2 to fix spelling errors or duplications. To turn a bug into a feature the OXP gives GNN news broadcasts from time to time. If you spot a mis spelling or double name and report it on the BB, I'll fix it for V2 and add a snoopers broadcast reporting the error being spotterd by you. Inital message below. There are three flavour broadcasts in V1. I'll add to these to reference bug squoshing on spelling / typos from V1 to 2.

Image
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP (Development Thread)

Post by LittleBear »

Night Shift with no call outs, so I finished off the Galactic Almanac Code. Spara’s In-System Distances OXP was really helpful in playtesting Random Station Names as it shows every object with a beacon in the local system. So I could quickly check that the names of all the stations in the system were correct from the F4 screen. To write Random Station Names I’ve been playing with every station adding OXP installed. Even before I added any names, things were pretty crowned on the In-System distance screen. So I had a poke around Spara’s code to see how he’d done it and put together a split screen version for Random Station Names.

The OXP only names the objects that exist in your game. If you have no OXPs installed then it will only name the Main Station and the Witchpoint Beacon as those are the only objects in your game. It detects and names only the OXPs you have installed. The names of the stations are the same for all players of the game. Taking out or putting in OXPs doesn’t change the names of the other. Naturally if you remove an OXP it won’t exist anymore in your game and so won’t be named. But taking an OXP out doesn’t change the names of the others.

Tionisla with every OXP installed has been a good test bed. Random Station Names does not change gameplay. Although it names every station, it will only display on the Almanac Screen the same information as is available through your Advanced Space Compass. Stations without beacons are not shown, nor are Rock Hermits (unless you have Rock Hermit Locator).

Notes: I haven’t changed the behaviour of other OXPs. As Super-hub adds a beacon to the station itself and the station’s buoy, both the Station and Buoy appear on the F4 Screen. I’ll do a manual filter for it so it doesn’t appear twice on the Almanac Page. The Graveyard is not named as it is a unique station. The Array is named as there are 8 of them in the game. One station from Extra Planets is currently shown as “undefined”. This is because I haven’t rolled off all the names into the array yet. Its written this way to stop Random Station Names breaking the game or other people’s OXPs. The worse it should be able to do is add undefined to the name of the station on the scanner if there is a bug in the OXP, which is mildly annoying but is easy to report and fix.

At the moment distances are the real in game distance in KM. As Oolite is very compressed it breaks emersion to see the distances in there real units. So I’m going to use the distance in KM from Lave Main Station to Lave’s sun as 1 AU. The Units will then be an Oolite AU’s as with Spara’s OXP.
Still to do is to add the second page showing the star and moon and planets.

Couple of Screenshots

Image

Image
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2866
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Re: Random Station Names OXP (Development Thread)

Post by LittleBear »

OXP Planets, Moons and Gas Giants are now also named, as are Stars. All naming options (Stars, Planets, Moons, Main Station, OXP Stations and WItchpoint Beacons) can be individually toggeled on or off under settings. Still not quite finished setting up the planet names. Moons are done.

Units can also be toggled between "Tauron Seconds" (how long in seconds it takes to get there at J speed), OU or KM.

Image
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Post Reply