Random Station Names OXP (Development Thread)

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

Moderators: winston, another_commander

User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
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 »

@ phkb Ahh I see. Although I had 79 pools, thanks to the magic of search and replace all now named this. rather than var.

The updated F7 Screen now works fine with this change to my script.

@ Cholmondely and montana05
Thanks for the flowers, but most of the work for this OXP was done between April and August 2020. Due to the outbreak of Deadly Disease in the Sol System all Jury Trials were suspended until September 2020. So I had a bit of a hole in RL work. In September HMCS came up with the idea of sealing jurors in Resident Evil sytle Pods and irradiating all papers given to them with UV light for two days (I kid you not). So RL work levels went back to normal in September 2020, hence why its taking me a while to finish it. :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
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
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 »

Update
• Asteroids named.
• Star Jellies get gender appropriate names.
• Advanced Space Compass shows the names and locations of OXP planets and Moons as well as stations.
• Information about the type of object also displayed. The type of star is also shown on the ASC, consistent with the types assigned by Distant Suns if installed.
• Smallest and largest Stars in the game are classed as Dwarfs, Giants and Super Giants. If Distant Suns is installed the colour is also classified (Red Dwarf, Blue Giant etc).

Approaching a Solar Station with ASC locked onto the sstation.

Image

Passing through an asteroid field whilst approaching a Moon. ASC locked onto the moon, showing name, orbital position and type.
ID Computer locked onto an Asteroid. Name and orbital position number shown.

Image

Alice can be dangerous if provoked. ASC locked onto the main planet.

Image

Going Shopping. ID computer locked ontio the Store. ASC locked onto the local Class M Star Sanguinem Herenae.

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
Griff
Oolite 2 Art Director
Oolite 2 Art Director
Posts: 2479
Joined: Fri Jul 14, 2006 12:29 pm
Location: Probably hugging his Air Fryer

Re: Random Station Names OXP (Development Thread)

Post by Griff »

very very awesome work LittleBear, it's really great to see you back and up to your elbows in a massive OXP making session!
That solar station screenshot is amazing as well, the solar flares give it a really cool effect!
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
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 »

Thanks Griff. My work on this has been very on and off. But finally got the looping code running as I wanted to. So nearly ready for a release. The looping just means that the OXP can deal with unexpected situations. It will name an infinite number of stations, planets and moons, but after a certain number the loop will repeat however. This is set very high as for stations such as Black Monks which normally add one station to about 15 to 20 systems per galaxy, the limit is 256 before looping. For stations such as SIRIF, which are more common at about 50 per galaxy, the limit is 2,048. For very common stations like Kiota and Extra Stations for extra planets, the limit is 10,240. As each station type has its own pool of names, the OXP will name about 250,000 stations before looping. For moons and planets it will name 40,000 before looping.

Normally, no Black Monk Station would appear at Lave as it does not meet the criteria for government or tech level. But if I summon a hoard of 60 Monk Stations for playtesting….

Image

... all are named. The names are peristant and the same for all players of the game.

Image

Image

Still need to do the same thing for planets and moons. Currently it will name up to 10 moons and 10 planets per system, but I'll set it to loop in case there are systems with very large numbers of planets and moons.

Also complete my playtest of vistiting all the systems of G1. Currently explored 205. Hand name the rest of the famous planets in G2. Roll off name arrays for OXP usable script keys.
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
hiran
Theorethicist
Posts: 2329
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Random Station Names OXP (Development Thread)

Post by hiran »

LittleBear wrote: Wed Jul 07, 2021 4:50 pm
Thanks Griff. My work on this has been very on and off. But finally got the looping code running as I wanted to. So nearly ready for a release. The looping just means that the OXP can deal with unexpected situations. It will name an infinite number of stations, planets and moons, but after a certain number the loop will repeat however. This is set very high as for stations such as Black Monks which normally add one station to about 15 to 20 systems per galaxy, the limit is 256 before looping. For stations such as SIRIF, which are more common at about 50 per galaxy, the limit is 2,048. For very common stations like Kiota and Extra Stations for extra planets, the limit is 10,240. As each station type has its own pool of names, the OXP will name about 250,000 stations before looping. For moons and planets it will name 40,000 before looping.
Out of curiosity: When are the random station names created?

I take it that when I visit some station it has a name, and when I come back it would have the same name?
Can I assume that it has the same name when I stop oolite, then later start it and load my savegame?
May I also assume that the random station name is the same across different computers even if they do not share savegames at all?

All this would imply random station names runs on the big bang when Ooniverse starts to exist with always the same randseed?
Sunshine - Moonlight - Good Times - Oolite
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
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 stays consitant and does not save anything to your save file as the OXP works by reading the systemID of the system you are currently in. This is the same for all players and on all versions of the game. In code only the system you are actually in at the moment exists. When you load the game or make a hyperspace jump the OXP checks to see what stations, planets, moons and asteroids are present in your personal game. It then names them using the name in that object's array in the OXP's script file correstponding to the system number you are at.

Lave for example is System 7. So if a black monk station (as an example) was present at Lave, then for all players of the game it will be named with the name from position 7 in the array for Black Monk Stations (monkpool in the script). If a second black monk station was present at Lave then it is named with the name from position 8 in the array. And so on. Because the system ID is the same each time you vist a particular system, any stations present always have the same name both for you and for all players. Naturally if you do not have a particular OXP installed then that particular station, moon or planet it would have added doesn't exist in your game and so isn;t named. If you later install it then it would be. If you remove it then it will go back to not existing and so wouldn't be named in your game.

The code to do it is faily straightforward. On start up it counts the number of each type of object the OXP names and then assignes them names based on their position in the array. Omce it has does that the code goes to sleep until you make another jump or load a new game as the code only needs to do anything when the system is being populated. So under this.Ship.Spawned the code checks like this:-

Code: Select all

// Name Black Monk Stations.
if(ship.hasRole("blackmonk_monastery"))  {
missionVariables.random_station_names_local_monk_count ++;
if (missionVariables.random_station_names_local_monk_count ===1) ship.displayName = ship.displayName+": "+monkpool[system.ID&255]; // Name the Station.
if (missionVariables.random_station_names_local_monk_count ===1) ship.beaconLabel = "Monastery: "+monkpool[system.ID&255]; // Add Station Name to the ASC display.
// As the first station is named by its system ID, we want the next to be named by the next name in the array. So take off 1 from System ID so the next name is always SystemID+ number of extra stations.
var monkGrid = Math.floor(system.ID-1+missionVariables.random_station_names_local_monk_count);
if (missionVariables.random_station_names_local_monk_count > 1 )ship.displayName = ship.displayName+": "+monkpool[monkGrid&255];// If more than one is unexpectedly present name from the next name in the pool.
if (missionVariables.random_station_names_local_monk_count > 1) ship.beaconLabel = "Monastery: "+monkpool[monkGrid&255]; // Add Station Name to the ASC display.
}

The OXP is just adding text to the display names of the stations / stars / moons / planets / gas giants which Oolite is loading anyway on start up to populate the system you are in based on your personal install of OXPs. For example if you have the Lave OXP installed, it will add a moon and a SIRIF station to Lave. For all players the name at position 7 in the SIRIF array is "Status Quo". If your game adds a SIRIF at Lave then it will always be called "Status Quo". No names need to be saved as the adding is done on start up and is consitant due to the systemID for any system always being consitant.

Once the OXP has done it's count on loading or jumping, the temporay counting variable isn't needed anymore and I tidy up by deleting them all.

The arrays for the diffent types of Object are stored in the script file like this:-

Code: Select all


this.monkpool = ["Clerical Mace", "Tome of Debt", "Debtor's Rosary", "Joy of Debt" "and so on with how ever many names you want to put in the pool"]

Some names I hand wrote and some are generated procedurally in the same way Random Ship Names does. However I have to roll off my names in advance so the stay the same, where as Random Ship Names can do its dice rolls on the fly (as you want the names of ships to change but you don't want the names of stations to change). The OXP contains code to generate the names. So to whip up a batch of 256 names for a station you would like to name, you set the word lists in the Descriptions file like this:-

Code: Select all

"named_stations_custom_template" =
	(
	"[named_stations_list_of_people_names] [named_stations_ending_list1],
	);
The descriptions file is just a massive list of words lists you can combine.

When you fire up Oolite it will drop 256 names into your latest log like this:-

Code: Select all


The Galactic Almanac OXP has generated the following array: "Port Bleriot", "Dornier Bay", "Lankester Spaceport", "and so on with 256 names"

Copy that into your script file and give it an unique name:-

Code: Select all

this myspecialnameslist = ["Port Bleriot", "Dornier Bay", "Lankester Spaceport", "and so on with 256 names"]
In the same way as you would with Random Ship Names, tell the OXP you want your station to be named by adding a script line in your shipdata entry.

Code: Select all

"script_info" =         {
    "randomstationnames" = "myspecialnameslist";
};
If you don't want to roll off your own names then you can set the sctipt info to plain / poetic / military etc and your station will be given a persitant name in the style you selected in the same way Random Ship Names does if you specify a particular style the OXP contains.

For V1 of the OXP I have pre-rolled 80 pools of names which are assigned to the existing stations currently released, to give the OXP backward comptability. Each of the existing stations therefore has its own style of names. The OXP also looks at the type of system you are in, so stations in Anarchies have more aggressive names, Fedual systems often have names referencing Castles, Commie systems have worlds named after famous soviet leaders and their stations have a commie theam (and so on with the differnt types of inhabitants, govenments and the description of the system given on the F7 screen). Again this is consitant for all players as the OXP is reading the planetinfor for the system which is the same for all players. If another OXP changes a system, then the code reads the changes made by the other OXP. So if someone released an OXP which changed Lave to a commie system, the stations and worlds would be named approprately and would be the same for all players with that OXP installed.

For Stars, planets, gas giants or moons released after the OXP is released then it will name the object with whatever name the author gave it in planetinfo when adding the object. If no name was specified (so it would otherwise appear as Undefined) then Random Station Names will assine it a persitant name automatically from its own pools of 40,000 names for planets and moons and 2,048 for Stars (as they can only be one star per system). Main Planets are named by the name of the system. So Lave will be named Lave I (Capital Planet). If another OXP changes the name of Lave to My Special Name, the it will be named "My Special Name I (Capital Planet)".

For Stations, if you don't tell Random Station Names to name your station then the OXP will assume that you do not wish it to be named as you are giving it your own name or it is a unique station. If you want Random Station Names to name it, then just add the key in shipdata for the style you want your station to be named in and the OXP will assign it a persitant name fom the style you chose either from a custom list in your OXP (if you told it to use your custom list in script info) or if you specify it or a style list from Random Station Names, then a persistant name will be assigned to all your stations in the style you chose in script info.
Last edited by LittleBear on Thu Jul 08, 2021 6:26 pm, edited 5 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
hiran
Theorethicist
Posts: 2329
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Random Station Names OXP (Development Thread)

Post by hiran »

LittleBear wrote: Thu Jul 08, 2021 1:08 pm
It stays consitant and does not save anything to your save file as the OXP works by reading the systemID of the system you are currently in. This is the same for all players and on all versions of the game. In code only the system you are actually in at the moment exists. When you load the game or make a hyperspace jump the OXP checks to see what stations, planets, moons and asteroids are present in your personal game. It then names them using the name in that object's array in the OXP's script file correstponding to the system number you are at.

Lave for example is System 7. So if a black monk station (as an example) was present at Lave, then for all players of the game it will be named with the name from position 7 in the array for Black Monk Stations (monkpool in the script). If a second black monk station was present at Lave then it is named with the name from position 8 in the array. And so on. Because the system ID is the same each time you vist a particular system, any stations present always have the same name both for you and for all players. Naturally if you do not have a particular OXP installed then that particular station, moon or planet it would have added doesn't exist in your game and so isn;t named. If you later install it then it would be. If you remove it then it will go back to not existing and so wouldn't be named in your game.
[...]
Thank you. That is indeed the answer I was looking for.

The background is that I am still trying to explore a way to connect players. So far I intend to create a station pub where players can meet and chat to each other. This is where players get to know new contacts. Once they exchange their addresses, they will be able to also contact each other when not in the same station, via direct addressing. Real functionality still to be discussed. But as you can see, the name of the station would likely end up in the name of the chat room, and this is where I would need consistently named stations across Oolite installations.
Sunshine - Moonlight - Good Times - Oolite
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
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 »

BTW. Partly just for fun and partly as it was very helpful for me to be able to quickly see the seed number of the system I was in, the numbers of the Witchpoint Beacons do actually show the seed number being used by that system. Oolite starts counting from 0, so Galaxy 1 is actually 0, 2 is 1 and so on. All witchpoint beacons are coded with two letters (which do not mean anythig), but the numbers are the Galaxy (incredmented by one so Galaxy 1 shows on screen as 1 rather than 0, 2 as 2 rather than 1 etc) and Planet number for the system. So if you are at Lave, the Witchpoint Beacon is named "ZF1-007" (Galaxy 1 System Number 007). As there are 8 Galaxies and 256 systems in each galaxy, the galaxy ID and system ID combined gives a unique four number seed number for each system in the game. So by combining the galaxy and planet number I have a 4 number seed number for each system which is different for every system in the game, but stays the same and is the same for all players. It's that number of 0007 (for Lave) that the OXP uses as its seed number for assigning names. So the names are different at each system, but the same for all players.
Last edited by LittleBear on Fri Jul 09, 2021 3:32 pm, 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: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Random Station Names OXP (Development Thread)

Post by Cody »

LittleBear wrote: Fri Jul 09, 2021 3:12 pm
... the numbers of the Witchpoint Beacons do actually show the seed number being used by that system.
A nice touch!
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
Nite Owl
---- E L I T E ----
---- E L I T E ----
Posts: 538
Joined: Sat Jan 20, 2018 4:08 pm
Location: In The Dark

Re: Random Station Names OXP (Development Thread)

Post by Nite Owl »

This OXZ has outgrown its name. "Random Station Names" hardly covers the very impressive scope that this comprehensive work now covers. Admittedly the depth of it has left me at a bit of a loss as to what an alternate name might be. The only thing that pops into my head is the rather unimaginative "Random Names for Everything that is not a Ship". An Acronym thereof perhaps - "RNET!S" (in JavaScript - < ! = is not >).

OXZ names are completely at the discretion of their creators but this one could possibly benefit from something a bit more descriptive with regards to what it has become. Other Forumites will hopefully have better suggestions.
Humor is the second most subjective thing on the planet

Brevity is the soul of wit and vulgarity is wit's downfall

Good Night and Good Luck - Read You Soon
User avatar
Cholmondely
Archivist
Archivist
Posts: 5273
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 »

Nite Owl wrote: Fri Jul 09, 2021 6:55 pm
This OXZ has outgrown its name. "Random Station Names" hardly covers the very impressive scope that this comprehensive work now covers. Admittedly the depth of it has left me at a bit of a loss as to what an alternate name might be. The only thing that pops into my head is the rather unimaginative "Random Names for Everything that is not a Ship". An Acronym thereof perhaps - "RNET!S" (in JavaScript - < ! = is not >).

OXZ names are completely at the discretion of their creators but this one could possibly benefit from something a bit more descriptive with regards to what it has become. Other Forumites will hopefully have better suggestions.
How about "Random Names" - and incorporate random ships.oxp?

Or "The Namer"?

Or incorporating it as part of Oolite v.1.92 with its own dedicated F7F7 page?

Beg: Any chance of incorporating imperial miles & ancient Venetian cavezzi as units of measurement? (1 cavezzo = 6 piedi = 2.08641 French metres)
Question: What is the background to your screens? Its not XenonUI or the old background that came with older versions of BGS.
Last edited by Cholmondely on Fri May 13, 2022 7:47 am, edited 1 time in total.
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: 2876
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 »

For release I was just going to call it "The Galactic Almanac" as that is what it does.

Other units are easy to add.

Oolite always gives the number in meters, so its just one line in script to covert that to any units eg:-

if (missionVariables.random_station_names_units == "Kilometres") var unitBase = 1000;

So I just need to know how many meters there are in your units to add that as a line.

Screen on my Screen Shot is the BSG F4 Screen background, which if you have BSG set as your chosen screen for the Almanac is used as the Almanac background screen.
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: 5273
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: Fri Jul 09, 2021 7:44 pm
For release I was just going to call it "The Galactic Almanac" as that is what it does.

Other units are easy to add.

Oolite always gives the number in meters, so its just one line in script to covert that to any units eg:-

if (missionVariables.random_station_names_units == "Kilometres") var unitBase = 1000;

So I just need to know how many meters there are in your units to add that as a line.

Screen on my Screen Shot is the BSG F4 Screen background, which if you have BSG set as your chosen screen for the Almanac is used as the Almanac background screen.
So it's the new BGS rather than the old?
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
hiran
Theorethicist
Posts: 2329
Joined: Fri Mar 26, 2021 1:39 pm
Location: a parallel world I created for myself. Some call it a singularity...

Re: Random Station Names OXP (Development Thread)

Post by hiran »

LittleBear wrote: Fri Jul 09, 2021 3:12 pm
BTW. Partly just for fun and partly as it was very helpful for me to be able to quickly see the seed number of the system I was in, the numbers of the Witchpoint Beacons do actually show the seed number being used by that system. Oolite starts counting from 0, so Galaxy 1 is actually 0, 2 is 1 and so on. All witchpoint beacons are coded with two letters (which do not mean anythig), but the numbers are the Galaxy (incredmented by one so Galaxy 1 shows on screen as 1 rather than 0, 2 as 2 rather than 1 etc) and Planet number for the system. So if you are at Lave, the Witchpoint Beacon is named "ZF1-007" (Galaxy 1 System Number 007). As there are 8 Galaxies and 256 systems in each galaxy, the galaxy ID and system ID combined gives a unique four number seed number for each system in the game. So by combining the galaxy and planet number I have a 4 number seed number for each system which is different for every system in the game, but stays the same and is the same for all players. It's that number of 0007 (for Lave) that the OXP uses as its seed number for assigning names. So the names are different at each system, but the same for all players.
Good approach, and nicely explained! :-)
Sunshine - Moonlight - Good Times - Oolite
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2876
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 »

@ Cholmondely
Beg: Any chance of incorporating miles & cavezzi as units of measurement? (1 cavezzo = 6 piedi = 2.08641 French metres)
Miles and Cavezzi implemented as user selectable units. You can chose from Kilometers, Miles, Cavezzi, OU and Torans.

Have I got the conversion right for Cavezzi? Set at 1 game meter = 2.08641 Cevezzi.

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.
Post Reply