Random Station Names OXP (Development Thread)

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

Moderators: another_commander, winston

Post Reply
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
Joined: Tue Apr 04, 2006 7:02 pm
Location: On a survey mission for GalCop. Ship: Cobra Corvette: Hidden Dragon Rated: Deadly.

Random Station Names OXP (Development Thread)

Post by LittleBear »

Random Station Names OXP – LittleBear & Milo (Version 0.02 – 5th August 2020)

This OXP is a pure flavour OXP which adds a unique name to each Main Station in the 8 Galaxies unless that station already has a unique name in a similar way to the way Random Ship Names give ships unique names. It has no effect on gameplay and does not write anything to your save file.
It will only name stations therefore (whether standard or OXP) if they would otherwise have a Standard Name appear on the ID Computer (EG: Dodecahedron Station). From Playtesting with all the Station OXPs installed, the only main Stations it does not add a name are the Torus Stations as the author has already given them names. As their name from the Torus Stations OXP is already "Torus Station: Virgin", Torus Station: Trade Hub" etc the Random Stations OXP detects this and doesn't at a name to these stations. The OXP is capable of adding a name to all the Standard Stations added by OXPs such as Extra Stations for Extra Planets, but the code to do this is not yet implemented as this is on the To Do list.

The final release will also name all OXP stations added to the system (again but only if they do not already have a unique name) but for this test version only the 2056 Main Stations in the game have a name added. With this OXP installed therefore Stations will appear on your scanner in the style:

Coriolis Station : Shadow of Infinity
Dodecahedron Station: Saint Jane the Belligerent
Icosahedron Station: The Eagle and Dove at Rest

And so On…

For the final version the names will be persistent (i.e. If the OXP names Lave Station Shadow of Infinity then it will be always called that). However for this test the name of each station will change every time you revisit the station after making a hyperspace jump. This is because if the code to implement the persistent names was implemented now, the Procedural Generator would be impossible to playtest as a Commander would need to visit every main station and OXP station in the 8 galaxies to check the OXP is working as intended. This would be a bit of an ask! Also Milo (who is the Brains behind the OXP) needs to work out the code to do this).

How much this will effect your immersion will depend on your play style. If, like me, you are doing the Computers / Furs run then it will be a little odd to see the names of the two stations you are bouncing between change every time you make a jump. Hopefully though seeing the millions of names the OXP generates will give you a chuckle and if you are doing a run like this, having the OXP in will really help me playtest it. If you are wandering around doing missions and rarely going to the same system, then you probably wouldn’t have noticed that the names were changing.

When finished the OXP will be released as an OXZ and available on the manager. However it needs to stay in OXP format so I can add to it and squash any bugs. Milo kindly released a 0.01 on the Expansion Manager. However if you have this installed please could you uninstall it through the manger?

This is because Oolite will not let you have an OXP and OXZ version of the same thing installed at once. Also I have added a lot to the Random Generator since 0.01 and there were typos and bugs in the first version.

To Install, click the download link and extract the file.

This will create a folder called Little Bear. Inside this folder will be the .oxp folder. Move the ,oxp folder to your Oolite Add Ons folder. I’m not sure if you still need to do this (been 10 years since I last played Oolite) but start Oolite and the first time you run after installing hold down the shift key.

There are two types of bug you might encounter. One is where a station name seems odd (although this is a Universe were Edible Poets and Deadly Goats are common). The other is a genuine bug. If you see a station name come up as something like:-

The Deadly Poet of [named_stations_random_name_generater_template_type_2_subtemplate_type_3_name_style4_ending] then I have mistyped a key. Could you report that with the name of the key that is appearing as that’ll make it a lot easier more me to track the blighter down?

After the download link I have posted the notes from the descriptions file. These are my working notes (so apologies for all the spelling howlers). As a player you don’t need to read it and due to the random generation it doesn’t contain spoilers, but it sets out what each of the various naming templates does. If, like me, you have an unhealthy interest in procedural generation then it may be interesting. If you are looking to add some procedural generation to your own OXP, then it may help you to look through how the code works. These notes are also in the OXP’s description file.

In this post I've put the notes in a code tag. If you want to read them without having to scroll across, if you click Select All and drop them into Word or other text editor you can read them a bit easier.

Edit: The Download Link I orginally but in this post was temporary and has now expired, but you can grab the test version 0.02 from the Expansion Pack Manager under Ambiance.

Little Bear.

Code: Select all


// Random Stations Namee - Description File Alpha Test Release 0.02 - 05/08/20
// By Milo & Little Bear.

// The Main Code is Listed after the Particular Call Lists for Named OXP Stations.

// If a particular type of Station is linked to a call list then it will be named using its own call list rather than the standard one.
// If other OXPers would like to add a personalised naming system for their stations, post it or PM me it and I'll add it here.
// If you like you can add similar code and a script command to your own OXP (feel free to crib the Black Monks example), but remember to rename your keys. All the keys in this OXP start with named_stations.
// As long as you rename your keys to start with something else then it'll be fine.
// If you are looking for some random generation code to copy for your own OXP, template 5 is probabley the best one to copy. I've put notes in the OXP to help anyone who wants to use this as an example.
// As you can see with template five, although you have to put the donkey work in of making your words / phrases lists, once you've done that you can generated millions of very different seeming names or text,
// (eg if you want to spice up a ship OXP by giving unique comms messages to your ships rather than the standard Oolite ones) you can do this with a few lines of code (as long as your word tables are decent).
// I had a lot of funs seeing the names the OXP generates in playtesting, so although this is a pure flavour OXP and has no effect on gameplay hopefully it'll give a bit more depth to the game.

// The Main Code of the OXP Random Generator follows after the particular Station naming keys.
//Templete Type 1

//This Template generates protective sounding names eg Ark of Hope and poetic names eg Shadow of Infinity. 
//This template has enough variety to generate 1,024 different names but will only be used to name about 100 of the 2056 stations in the game. 
//As the idea of this OXP is to create massive variety but without the faff of hand writing a name for all the thousands of stations, most words typed in will never be used. 
//But by doing it this way I as the author have no idea what station names I'll encounter either and it leaves plenty of unused names that can be used to name OXP stations.
//Templete Type 2

// For this template I have added more nesting as the theam of the 2nd naming style is stations named after people. Each sub-template of of Type 2 names about 25 stations across the 8 galaxies. 
// But to generate a good mix of name styles the way each does so is different.

// The first sub-template names about 10 stations in a very plain style such as Jameson's Base, Griff's Point and so on. 
// It also names about 20 stations in a slightly more poetic style such as Bell's Gambit, Griff's Lost Love, Aegidian's Cunning and so on.   

// The Second sub-template is a 16 x 16 grid (so generates 256 possible combinations) but is only used to name about 25 Stations. 
// This generates more poetic names such as Doyle's Fist of Iron, Milo's Mind of Magnificance and so on.
// Both the first two sub-templates draw on the list of 180 surnames, but only actually name 50 stations between them. 
// Most surnames will be unused, but as lists of surnames are very quick to do (and I had lots of lists of names from Random Hits to base them on with a C&P and then check they work as station names) 
// this is nested to increase the variety further.

// The third sub-template names after Kings, Queens and other nobility. As 25 stations all called "Queen [female name] would get a bit old, this subtemplate is divided into 5 subtemplates to mix up the naming structure a lot.
// Due to the subdivision of the third template into 5 slightly different formats and calling a list of 96 female names and the 180 gender-neutral surnames a lot of variety
// is achived as each sub-template only names about 5 stations throughout the eight charts.

// The first subdivision of the third sub-template names 5 stations in the Style Female Title, Female Name and a 50% chance of a number: eg: Queen Elizabeth, Lady Emma the Second etc.
// The second subivsion of the third sub-template alternates the style to name 5 stations in the format The Queen Elizabth, The Duchess Tracey with a 50% chance of adding a roman numeral
// eg The Lady Helen II. Due to there being currently 7 titles and 93 names (651 combinations) and this template only names 5 stations they will all be unique.
// The third subbivsion of the third sub-template flips the style and calls the name of the current system. It names about 5 stations in the 8 galaxies from the title list but then calls
// the system name, which means each is unique. Eg: The Queen of Lave.
// The fourth subdivision of the third sub-template goes back to the style of the first sub-template but flips the naming style again. It also names 5 Stations but as the List of Names is reused each will be unique.
// This generates names such as Camp Jameson, Griff Landing, Selezen Base.
// The Fifth & Final subdivision of the third sub-template uses male royal titles in the same style as the female ones but includes all the varietions used for female versions and re-uses the gender-neutral list of surnames
// (IE: if the dice land on the name after royality template the OXP is twice as likley to chose a female name as a male name to reflect the naval tradition of giving ships female names).
// Although the fifth subdivision only names about 5 stations it uses the same nesting as the female titles so generates the same varients in structure eg: The King Griff, Duke Milo 
// (with the same 50% chance of adding a number after the name) and also a system call generating eg: The Baron of Lave.

// The fourth (and final) sub-template also names about 25 stations in total, but is broken down into 5 subdivisions as before, so each sub-division only names about 5 stations each.

// For the forth template all the gender neutral surnames and the female first names are called by using a all names list. For this template male, female and neutral names all work. 
// So there there are 372 names on the call list (180 netral, 96 female and 96 male).
// The first subdvision of the fourth template only names about 5 stations and uses two naming styles so each sytle only names a couple of stations. The first style uses a poetic
// first word and then alternates with a name or the system name as an ending. This is a simple copy & paste from earlier templates but generates very different names such as:
// Echo of Lave, Vision of Sarah, Griff's Contemplation, John's Reflection and so on.
// The second subdivision of the fourth template only names about 5 stations and is really a C&P of the Famous People name templates but rather than picking from the gender neutral names it picks only male first names. 
// So this generates names such as: Richard's Outpost, John's Bay, Merlin's Cove, Andrew's Last Stand, Robert's Regret, Peter's Heart of Charity.
// The third subdivision of the fourth template only names about 5 stations and is excatly the same as the second subdivison but uses female names instead of male names.
// The fourth subdivision of the fourth template also only names about 5 stations, but as it uses a custom list of 10 introduction phases and then calls the OXP list of 320 place names it generates 3,200 combinations. 
// These are all in the style of an emotion for a place eg: Remembrance of Earth, Nostalgia for Mars, Musing on London and so on
// The fith (and final) subdivision of the fourth template also only names about 5 stations. It is similar to the fourth subdivision but uses a different 10 phase introduction list and this time calls all the names list
// (male, female & gender nuetral) and so genertes 3,700 combinations. These are in the style of: Waiting for Jane, Poetry of McDonnald, Love of Richard.

// CODE FOR TEMPLATE 2 & ALL SUB-DIVISIONS OF TEMPLATE TWO NOW FOLLOWS....

//Templete Type 3

// The style of the Template is to name stations after famous Real Life places (with a few references to Famous Oolite Planets thrown in). The OXP contains a list of (currently 180) names for real world Countries, Cities,
// Planets, Moons and Stars. (Thank you Google and bless you Copy and Paste!)

// As real place names tend to make good names for ships (HMS Shiefield, USS America in RL) a large list is used to give good variety. To further spice things up the Template is divided into ten different naming styles.
// The whole of template 3 names about 100 stations galaxy wide, but as it is divided into 10 main types (and most types also have alternate phrasing) each naming template names about 3-5 stations.

// Sub-Style 1 names stations after places in a plain style. There are two varients of the wording so each names about 5 stations. The first style has a 25% chance of adding the word New, 25% Chance of Adding the word Old and 
// a 50% chance of adding nothing before the place name. This generates names such as Saturn Orbital, New America Base, Old London Port and so on.
// The second subdivison of sub-style1 flips the naming style to generate names such as Port Boston, Camp India, Outpost York and so on.

// Sub-Style 2 reuses the Royal Titles, but as the word substitution is different very different names are produced. The first sub-style calls the list of male & female royal titles and adds a place name.
// EG: Queen of Mars, Duke of Manchester.
// The second varient of sub-style adds a positive descriptive word from a 16 name grid to describe the royal person. EG: The Good Prince of Wales, The Last Lord of France.

// Sub-Style 3 is a bit of a curve ball in the list as it does not use place names. It names 10 stations in the galaxly by adding some quirky royal titles: 
// EG: Queen Diane the Unready, Baron Milo the Poor, Prince Martin the Lost. 
// There are three variation in the sub-style one calling all titles and the gender neutral names, one calling only female titles and female names and one calling only male titles and male names. 
// Each variation has a diffent 16 grid look up table of insulting ending titles. Due to the name and title nesting each name will be unique and as each varient only names about 3 stations with a 
// look up table of 16 options, each should also have a unique fault.

// Sub-Style 4 returns to the theam of naming after Place Names but this time in a military / protective / poetic style. A similar method is used to the previous template by sub-dividing and using different
// 16 grid descriptive words for each sub-division.
// The first varient names in a protective style and also calls the posibility of the word New or Old being added before a place name EG: Spirit of America, Defender of New Paris. 
// The second variet simply flips the naming style of the first into America's Spirit, New Paris's Defender.
// The third varient names in a poetic / military style EG: America in Eclipse, Paris at Rest, etc.
// As each varient calls the names list all will be unique and as each varient names about 3 or 4 stations from a unique Grid of 16 stations will also have unique descriptive phases.

// Sub-Style 5 names stations after Place Names but in a more Military style. The sub-template names about 10 stations. The calling of the names list ensures that each will be unique, but as 10 stations are named using
// a custom 32 grid of descriptive words, each will have a unique descriptive word or phase.
// The Sub-Style has two varients (so each names about 5 stations) and this flips the name structure. The call of the names list guarntees a unique name, but as each varient names 5 stations and calls from a list
// of 32 descriptive words and phases each station should also have a unique description.
// Sub-Style 5 generates names such as Blade of America, Last Stand of New York, Castle of Mars and also flips the name structure to America's Blade, New York's Last Stand, Mars Castle etc.

// Sub-Style 6 is really a Copy & Paste of Sub-Styles 4 and 5, but with the name substituted for the name of the local star. This template names about 10 stations in total. 
// The use of the local star's name guarntees a unique name, but the sub-style also re-uses the 4 varients from Styles 4 and 5. So each varient only names a couple of stations.
// The custom call lists from Sub-Styles 4 and 5 are also recalled so each of the 2-3 stations each varient names have 16 to 32 description selections so each station will also have a unique description.
// This template is included to increase the liklehood that there will be at least 10 systems out there where some stations are named after the local star.

// Sub-Style 7 is theamed to name stations after military leaders / heros. It names about 10 stations in total. It calls both a custom list of ranks and both the gender neutral names list and the places names list.
// The first varient is very simple and just calls a military rank and a name: Eg: The General Griff, The Field Marshal Jameson and so on. Due to the nesting there are about 1,400 combinations (but are all quite similar)
// so this template names about 5 stations in the 8 galaxies in this simple style.    
// The second varient is also very simple and calls a military rank, a name and a place of Origen. Eg: General Giff of Mars, Field Marshal Jameson of Manchester. Due to the nesting there are a 450,000 combinations 
// (but also are all quite similar) so this template also only names about 5 stations.
// Military Ranks and Names are used to generate more complex and poetic names in later templates. This template is included so that there are also about 10 stations named in this simple style.

// Sub-Style 8 is very similar to Sub-Style 7 and uses the same structure but this time names after Religious Leaders in this simple style. This is for the same reason as for sub-style 7 and it likewise names 10 stations
// in a simple style.
// The Sub-Style includes the lists for male and female religious titles which are called here and in further templates.
// As with Sub-Style 7 the first varient is very simple and just calls a title and place of Origen. Eg: The Abott of Mars, The Bishop of Texas etc.
// The Second varient is the same but always calls the local star name. EG: The Pontiff of Lave.
// Of the 13 titles on this call list 5 contain further nestings to the two templates will 40% of the time include a sub-name Eg: Holy Mother of Mars, Blessed Child of Texas etc.
// Due to the nesting each varient has 2,500 combinations but as they are all quite similar only 5 stations are named with each varient.

// Sub-Style 9 does the same thing with Judical & Govenment Titles and names 10 stations in a similar plain style.
// The first varient names 5 stations by calling a Judical / Govement Title and adding a place of oragin. EG: The Judge of Mars, The Magistrate of Texas, The Ruler of Africa.
// As with Sub-Style 8, the second varient is the same but always calls the local star name. EG: The Marshal of Lave.

// Sub-Style 10 rounds off the template by naming 10 stations with custom lists of low level to mid-level military and naval ranks combined with the surnames list and a posative or neutral flavour.
// Although the template only has 1 format as the names are combined with 16 ranks, the template generates 2,900 possible names with 16 flavoured descriptions so 46,000 combinations are possible.
// As this sub-style only names 10 stations a lot of variety is generated and each station named will be unique.
// This sub-style generates very varied names such as: Ensign Griff's Victory, Private Milo's Monument, Corpral Jameson's Reflection.

// CODE FOR TEMPLATE 3 & ALL SUB-DIVISIONS OF TEMPLATE THREE NOW FOLLOWS....
//Template Type 4

// The theam for this template is to use the Titles Call Lists to generate both poetic, heroic and somewhat less complementary titles.
// The Template is divided into 4 Subtemplates (So each names about 25 Stations across the 8 galaxies) but as each uses custom word lists a large variety is achived.

// The 1st Varient of template 4 firstly calls the list of the OXP's 50 Titles and combines this with the names list (generating 24,000 combinations) and then combines this with a list of 64 custom words (1.5 million)
// This generates poetic sounding names such as: Empress in Waiting, Queen of Shadows, Duke of the East Wind and so on.

// The 2nd Varient combines the Female Titles (Royal & Religious) with a custom list of 64 descriptive words and so generates about 62,000 combinations.
// As each of the varients uses a custom list each version produces different types of names. This one generates heroic and rather insulting ones such as: Sister Siobhan in Combat, Saint Jane the Beligerant etc 

// The 3rd Varient does the same thing as the 2nd but this time using the Male Titles (Royal & Religious) and male first names, generating the same combinations as Varient 2 but with different word lists.
// As with varient 2, this uses a custom list generating a mix of heroic and insulting names such as: Brother Clive the Magical, Lord Digby the Abbriviated.

// The Fouth (and final) combines all the custom lists for Male & Female Royal and Religious Titles. It combines these with the ist of gender neutral names to give 24,000 combinations but with a different titles list to v1.
// As with varients 1 to 3, this varient also combines the names with a unique 64 word list to generate names such as: Duke Hickson the Undressed, Princess Walch the Sinner.

// Thus, although template 4 names 100 stations as it draws on a list of 256 unique descriptions and combines these with the titles list and names list, all stations named by template 4 will have unquie names. 

// CODE FOR TEMPLATE 4 & ALL SUB-DIVISIONS OF TEMPLATE FOUR NOW FOLLOWS....
// Template Type 5

// The theam for this template is Animals and Mythical Beasts.
// The OXP contains list of 64 dangerous / mythical beasts, 64 ordinary animals and 25 prey animals.
// The template is divided into 10 styles, so each only names about 10 stations.
// As Large Call lists are used however each style generates thousands of possible varients.
// Poets, Arts Graduates and Goats can also appear on these lists since, as Commanders will be aware from their travels, these can be Deadly, Harmless or even Edible.

// The 1st Style is very simple as it just calls a name from a custom list of 8 descriptive words and combines this with the 64 dangerous animals (512 combinations) and then calls the local star.
// This style names stations in the style: The Deadly Poet of Lave. The Fell Hydra of Lave, The Terrible Lion of Lave. (or whichever system you happen to be in).

// The 2nd Style is also very simple as it just calles one of the 64 fierce / Mythical beasts and combines it with the OXP's list of 14 generic station ending descriptions (896 uninque combinations).
// This style names stations in the style: Tiger's Point. Medusa's Orbiter, Wolf's Claim and so on.

// The 3rd Style is equally simple as it just calls The List of Fiece Animals and combines it with a custom list of 8 Words and the OXP's list of places (92,000 unique combinations).
// This style names stations in the style: The Remarkable Hawk of Rome, The Famous Demon of Mars, The Wooden Hound of Texas and so on.

// The 4th Style uses two 8 x 8 tables of heraldic words and combines these with the list of fierce animinals (4,000 combinations)
// This style names stations in the style: Sable Banner of the Raptor, Azure Cross of the Panther, Crimson Moon of the Dragon.

// The 5th Style calls the list of fiece animals (but this time only the real animals - Lions, Tigers, Bears etc with a slim chance of a few of the mythical beasts who's names work in this template).
// It then calls the OXPs list of 25 weak animals (creating 800 possible starting combinations) and then combines this with a custom list of 16 peaceful / poetic ending styles (13,000 combinations)
// This Style therefore generates names with two distinc styles:
// Peaceful such as: The Eagle and Dove at Rest, The Hound and Kitten at Play, The Lion and Calf at Peace and so on.
// Poetic: The Dragon and Rabbit in Superposition, The Serpent and Mouse of Eternity and so on.

// The 6th Style takes the list of fiece animals out for a final spin, but this time uses nesting to produce some very poetric names (EG if a season is called as a descriptive word then it may be any one of the four).
// Firstly the template calls a descriptive word from a custom list of 16 words and combines this with the OXPs list of 32 real (non mythical) fiece animals (512 combinations) and then cobines this with a further
// ending phase which is further sub-nested, generating a total of 8,192 combinations. For good measure the list calls a chance of adding the name of the local star or a name from the OXP's list of place names.
// This style generates names such as: The Flaming Lion in Winter, The Silent Tiger facing North and a chance of: The Fossilised Wolf of Lave / The Clairvoyant Hydra of Pluto and so on.

// The 7th Style uses the OXP's list of 64 normal animals (ie ones that are real but not thought of particularly as preditors or prey - although some of them are, but they fit this style better)
// This Style plays with nations and cultures holding particular animals important (American Eagles, Welsh Dragons, New Zealand's Kewi Bird, British Bulldogs etc in RL). It always therefore names after the local star.
// The template calls a custom list of 16 descriptive words and combines it with the oxp's list of 64 normal animals (generating 1,024 possible opening descriptions) and then adds the name of the local star.
// This style generates names such as: The Worshipful Gibbon of Lave, The Immortal Monkey of Lave, The Regal Badger of Lave and so on.

// The 8th Style also uses the OXP's list of normal animals but this time calls the names list and a custom table of 16 descriptive words to create (hopefully) humorous names.
// The OXP generates a possible 280,000 combinations in the style of: Sarah's Troublesome Elephant, David's Horned Stoat, Griff's Electronic Armadillo and so on.

// The 9th Style is essentally the same as the 2nd style in that it uses animal names to name stations in a simple style, but this time using the list of normal animals rather than the fierce ones.
// This style names stations in the style: Monkey's Orbiter, Elephant Point and so on.

// The 10th style names stations after the tombs of famous or notable animals. All animal types are called and the descriptions from the previous templates are also called giving a lot of variety.
// This style names stations in the style: Tomb of the Remarkable Stoat, Lament of the Sentient Tiger, Resting Place of the Inflatable Badger and so on.

// CODE FOR TEMPLATE 5 & ALL SUB-DIVISIONS OF TEMPLATE FIVE NOW FOLLOWS....
//**************************************************************

// Template Type 6

// THATS ALL FOLKS (for the moment - templates to be continued...)
Last edited by LittleBear on Tue Feb 02, 2021 1:54 am, edited 3 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: 16055
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Random Station Names OXP

Post by Cody »

Thankee!
I’m not sure if you still need to do this [ ] but start Oolite and the first time you run after installing hold down the shift key.
You don't. Only needed after tinkering under the bonnet.



Well of Heaven, eh?
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
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2121
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Random Station Names OXP

Post by ffutures »

Does this work with the alternative main station types added by some OXPs e.g. Torus Stations?
User avatar
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 466
Joined: Mon Sep 17, 2018 5:01 pm

Re: Random Station Names OXP

Post by Milo »

All (and only) main stations will be renamed (including station types from OXPs). Version 0.0.2 is now available through the in-game manager.
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2121
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Random Station Names OXP

Post by ffutures »

Thanks, I'll give it a try.
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2121
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Random Station Names OXP

Post by ffutures »

OK, first thought - I just took a look in the aft view as I left a station and realised that the name was different from when I'd arrived, approximately 20 minutes in game time. I think that this is just a little on the silly side... Could it be kept the same at least until the ship jumps out?
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
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 »

I just made the trip to the nearby tech 15 system to buy myself an Asp and tool up with some of the (new to me) high tech weapons and defensive equipment. I cheated a bit by making a personal custom version of Gasgostinho's stunning Black Asp with a green stripe Asp model and tweaking it a bit to be an Asp Explorer with a 10 ton hold as I always facied flying an Asp but don't want to completley rule out a bit of scooping, tading or passenger runs. The Torus at Cessxe remains named "Torus Station : Trade Center". I think milo's code is working as intended as that station does already have a unique name as its oxp added custom endings to the name. (Edit: I just noticed though if I save at the Torus and then reload a name from Random Station Names is added, whilst I am docked, but as soon as I launch it go back to its own OXP's name of Torus Station : Trade Center). It could be named by the OXP if the author wishes by Milo adding a line of code to include the Torus. One of the templates in the OXP is commerce theamed to generates names such as Herold of Free Enterprise, Merchant Prince of [name of place] etc, which would be names fitting the impressive (new to me at least) station model for the Torus. So if the author would like, that line could be added to name the Torus Stations in the Buisness / Trading Theamed Style. But to avoid treading on any other OXP writer's toes, this OXP won't name another OXP station if that author has already given it a name. OXP stations can be added to the White List though if the author would like and then the OXP will give them a name either from the total list of templates or a particular template if that template fits the style of the other OXP'ers model better. Send me a PM or post here if you would like your station added to the white list. I'll take requests for styles if people wish as these can also be used for the random generator as well. A style for my Black Monks Stations is included as an example, although there is no code added to name the Black Monk stations yet.

Edit. On the name changing really quickly, I hadn't hit that one myself in playtesting but anything that gives Oolite's dice a re-roll will cause a name to change. This is always done on a jump, but saving and loading will also do it. Oolite or another OXP calling a reroll might also do it (not sure). In Random Hits, this is avoided by Erics code locking down the adverts for 1 hour of game time. After that they will change to simulate other bounty hunters taking jobs and new ones being posted. However for this Alpha no names from procedural generation are locked down to make it eaiser to playtest the generator.

The realeased version will lock all the names to the first set of dice rolls the OXP makes and all stations it names will keep the same name (unless you add or remove an OXP which adds stations, which will cause a re-roll but then names will stay the same until you change your station oxp configuration). But for the Alpah version, it's really got to stay rerolling pretty often as otherwise its a nightmare for me or any other Commanders with the Alpha installed to give the random name generater a shake down. :roll:
Last edited by LittleBear on Thu Aug 06, 2020 6:30 pm, edited 6 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
Milo
---- E L I T E ----
---- E L I T E ----
Posts: 466
Joined: Mon Sep 17, 2018 5:01 pm

Re: Random Station Names OXP

Post by Milo »

If you didn't save/reload at the station as LittleBear mentioned, then I would not expect the name to change. The rename is only triggered on game load and when jumping into a system.
Last edited by Milo on Thu Aug 06, 2020 9:18 pm, edited 1 time in total.
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2121
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Random Station Names OXP

Post by ffutures »

I saved, don't think I reloaded. I'll check again.
User avatar
ffutures
---- E L I T E ----
---- E L I T E ----
Posts: 2121
Joined: Wed Dec 04, 2013 12:34 pm
Location: London, UK
Contact:

Re: Random Station Names OXP

Post by ffutures »

OK, it didn't do it again, so really not sure what happened then.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
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 »

Guys,

I have been working on this idea on and off and I now have a way to keep the names persitant. Basically I built a random name generator in descriptions with 20 main templates and a lot of nesting and then wrote a simple script to, each time I docked, dump 256 randomly generated names into my save file. It then only takes 5 minutes to C & P these into an array. I know this method works to give each station a unique name which stays the same as Eric used it when he converted Random Hits to Java script. I really ought to be able to work out how he did it but I'm just stuck. I think it would only take three lines of script to implement the OXP and complete it. What I'd need though is 1) command to read the 8 arrays for Galaxy 1 to 8 main stations; 2) Code to read the array for black monk stations; 3) Code to read the 48 arrays used to name any OXP stations (such as those from Extra Stations for Extra Planets).

I know Erics Code works to give all the space bars unique names (when it runs out of names as there are on 32 names in the array it loops back to the first name, but it means 1 array gives every station a persitant name). I have enough arrays so it doesn't run out and every station gets a unique and persistant name.

In random hits Eric has added as an array:-


// setup some general arrays.
this.spaceBars = ["The Blue Parrot", "The Fox and Hound", "Jon Snorrad's Pub", "Lobbie's Can-Can Lounge", "The Old Spacer", "The Skull and Bones", "The Golden Gargle Blaster", "The Smoke Dragon Lounge", "The Grounded Spacer", "The Finders Keepers Bar", "The Wanted Dead or Alive", "The Marooned Spacer", "The Flying Dutchman", "The Red Pincers", "The Crash and Burn", "Joe's Bar and Grill", "The Bell and Braben", "The Carnal Pleasures Bar", "The Red Light", "The Eject Handle", "The Spacers' Hangout", "The Bearded Parrot", "The Last Wishes", "The Fat Feline", "The Furry Humanoid", "The Slimy Frog", "The Horny Lobster Hotel", "The Pink Slug", "The Colonial's Rest", "The Terminus Hotel", "The Viper and Whistle", "The Habitat Bar", "The Twisted Torus Hotel", "The Blue Lagrange", "O'Neill's Repose", "Giles's Grotto", "The Black Moon", "The Raxxla Ritz Hotel", "The Loving Feline", "The Worlds End", "Seedy Bar"];


I know this works, but I can't work out the command to read the array and asigne the names in the array.

I have a simple script running at the moment to save names to my Save File. So just by playing for an hour I had 8 sets of 256 names in my save file which I then copied and pasted into an array. So where I currently am is I have in a script an array of 256 names per Galaxy to name every main station in the game and a separate array to name all the blank monks stations. Since every time I play the game I end up with 256 names in my save file every time I dock, it would be simple to fill in 48 arrays (giving a bank of 12,000 names) to name all the OXP stations.

The code in the arrays is in code tags below. Could someone help me with the commands to read the arrays?

Code: Select all

{
// Arrays to name all Main Stations in Galaxys 1 to 8  - Each Array has 256 Names and so Station has a Unique Name Read from 8 Arrays below. (8 x 256 = 2,048 Names)

this.galaxy1mainstations = [ "Hand of Glory", "War Cry of Fortuna", "Petrified Cockatrice", "Indefatigable Warrior", "Nimbus of Ice", "Manifestation of Light", "Swordsman of Anhur", "Celestial Grail", "Republic Day IX", "The Good Dame", "The Frozen Sage ", "Marchioness Gemma ", "Rise of the Moon", "Logic of Nobility", "Symbiotic Dreams", "Light of Old Capella", "Balance of Power", "Heavenly Approval", "Mercury at Peace", "Venus Commune", "Greenwood's Memorial", "Bastion of Consciousness", "Beacon of Free Trade", "Contemplations on China", "Phantasm of Hope", "Path of Ruin", "Saint Derik the Strong", "Devious Plan", "Displacement Tactic", "Primeval Moonlight", "Count of Poetry", "The Honour of Spiculus","Mourning Gamma Cephei", "Aspect of Empathy", "Crimson Cloak", "The Inspirational Hound", "Above Smouldering Valhalla", "Echo of the Eagle Nebula", "Blessing of Swansea", "Paradoxical Labyrinth", "Hypnotic Poet", "Incongruous Paraphernalia", "Andromeda Collective", "Ambiguous Activity", "The Obsidian Order", "The Fascinating Feline", "Maine of the Unicorn", "The Timeless Sphinx", "Bastion of Conscience", "The Edible Arts Graduate ", "Gnostic Ascension", "Unforeseen Engagement", "Champion's Logic", "Romero Cove", "The Remarkable Hawk", "Blazing Guardian", "Communes with Elephants", "Shrine of Yutu II", "Controlling Factor", "The General Wavell", "The Fascinating Manticore", "Regulating Factor", "The Hydra in Transition", "Gatekeeper of Ymir","Peaceful Outlook", "Pillars of Creation", "Illusionary Darkness", "Sarcastic Electron", "The Wise Magnate", "Heavenly Shard", "Walks with Panthers", "The Colonel Wegener", "The Smouldering Eye", "Eye of Fortitude", "Hypnotic Serpent", "Dome of Time", "Roost of the Falcon", "Eagle's Nest", "The Lynx in Accession", "Radiant Retribution", "The Duchess of Leeds", "Burning Storm ", "MInd of Radiance", "Elaine's Cove", "Metamorphosed Time", " Dakota's Spirit", "Rainbow of Fire", "The Deadly Poet", "Nimbus of Light", "Zodiacal Light ", "Pale Captain of Proteus", "Spire of Peace", "Day of Absolution", "The Generous Count ", "Poet's Terminus", "The Veiled Lady","Lost Civilisation ", "Queen of Shadows", "Duchess Sylvia the Altered", "Princess Clare VII", "Shield of Peace", "Gemini Rising", "Reliability in Doubt", "Cardinal of Power", "Daughter of Eagles", "Risk of Ambush", "Metamorphosed Tachyon", "The Kennedy Space Centre", "Kelly's Honeymoonl", "Firstborn of Proxima Centauri", "Shades of Morality", "The Soulless Butler", "Amber Star of Nuwa", "Silent Midnight", "The Deadly Astrologer", "Incandescent Aurora", "Fuglesang's Mind of Fortitude", "Sympathy for the Devil", "Platypus Terminus", "Twisted Mind", "Bastion of Justice", "Lone Goat", "Emperor of Dust", "Testy Travelling Companion", "Argent Moon", "Empress Usha the Seventh", "Tyler's Courage", "Political Intervention","Shield of Equitable Trade", "Coils of the Cobra", "New Okazaki Brokerage", "Admiral Paterson of Indonesia", "Lama Space Port", "Contemplation of Time", "Kindness of Strangers", "Timeless Gate", "Sunrise over Arcadia", "Delta Minoris Reborn ", "Eternal Sceptic", "Reflecting on Scotland", "Sable Ocean", "Dragonfly Orbiter", "The Immortal Feline", "Night Tiger", "Sable Circle", "Mort's Regret", "Church of Antares", "Dark Moon Falling", "Guardian of Might", "The Cultured Jester", "Babylon Six", "Dawn of War", "Dark Side of Camilla", "Castle of the Edible Host", "Greenberg's Pride", "Bronze Cross of the Wolverine", "Quantum of Eden", "Supernatural Entity", "The Scorpion in Shadow", "Canis Major Revered","Sanctuary of Purity", "He Who Fights Monsters", "Shadow of Laser Light", "Paradise Reborn", "Ark of Purity", "Clidna Ascending in Virgo", "Shaman of Cthulhu", "Silver Star of Mazu", "Ring of Oblivion", "King of Preroria", "Furious Purpose", "The Fascinating Medusa", "Utopia Reclaimed", "Corporate Subterfuge", "Cunning Plan", "Hidden Funds", "Winter Rain", "The Deposed of Earth", "The Rings of Jupiter", "Empirical Intellect", "The Alex Ryder", "Transfigured Night", "Werewolf's Orbiter", "Veil of Mercury", "Citadel of the Elders", "Fairfax's Daring Escape", "The Honourable Battalion", "Shrouded Giant", "Pondering the Proton", "Celestial Echo of Titan", "The Dreaming Bear", "Earl of Poetry","Disappointing Error of Judgement", "King Isaac II", "Shadow of Doubt", "Mysterious Tranquillity", "Mercenary's Theory", "Watchful Eye of the Krait", "Chariot of the Genii", "The Thoughtful Queen Anne", "Troublesome Opinion", "Sublime Seclusion", "Clarke's Oasis of Exultation", "Charlemayne's Regret", "Elliptical Time", "Diplomatic Policy", "The Honoured Dead", "Vision of Cambridge", "Tapestry of Fate", "Breath of Peace", "Chandra's Point", "Tranquil Vistas", "Eternal Romantic", "Pride of Loki", "Messenger of Conscience", "Bastion of Life", "Empress Sally the Mad", "Awkward Moment", "King Bond the Special", "Isis Rising in Pisces", "The Countess of Pluto", "Heroic Minstrel", "Undying Hope", "Hypnotic Monk","Andromeda Omega Harbour", "Vasilevsky's Legend", "Echo of John Christopher", "Temporal Monument", "Image of the Risen Sun", "Cherub of Mist", "Reformed Saviour", "Spectral Ember", "Reconfigured Reason", "The Drew Wagar", "Castle of Time", "Fractured Sanity", "The Noble Giant", "Divine Recognition", "Viscount of Salisbury", "Politics of War", "Ravenous Spirit", "Master of Honour", "Unseen Poet", "Nostalgia for Infinity", "Peculiar Explanation", "Eye of the Condor", "Heart of Clarity", "The Red Baron", "Honouring Vega", "The Invisible Scholar", "Fire and Ice", "Summer Rain", "Occam's Razor", "Garrison of Hope", "Queen of Zaonce", "Fortress of Honest Enterprise", ]

this.galaxy2mainstations= [ "The Truce of Tokyo", "Chromatic Starlight", "Shadow of Empathy", "Ark of Joy", "Baron Yadin ", "The Duchess of Mars", "Unforeseen Consequences", "Baroness Monica", "The South Wind", "Rhea in Eclipse", "The Jens Ayton", "The Chimes of Demeter", "The Serene Banker", "Princess of Eternity", "Shadow of Tau Ceti", "Proud Standard of Actatea", "Stalking Tiger", "Faint Echo of Catherine", "The Commodore Livingstone", "Heavenly Light", "Disciple of Commerce", "The Fall of Abarrach", "Hypothetical Situation", "The Electronic Monk", "Last Flight of Swigert", "Queen Asher the Sane", "Altered Paragon", "Intrepid Soul Respected", "The  Wolf Facing West", "The Mutated Tailor", "The Giles Williams", "Spectral Star","Persistence of Odysseus", "Shattered Time", "Scintillating Hind", "Keeper of Chivalry", "Antarctica in Shadow", "Supremely Confident", "Wandering Star", "The Christian Pinder", "Cherub of the Dawn", "Congenital Optimist", "King of the Mind", "Wise Fortune", "Sharrock''s Memorial", "Enter the Dragon", "Absolution Gap", "Nature of Honour", "Aurora Rising", "Blue Skies Over Mars", "Celestial Dawn", "Spectral Knight", "Accompaniment of Shadows", "Dilation Sleep", "Logic of Negotiation", "Turquoise Days", "Storm of Consciousness", "Persistence of Odysseus", "Phantom of Truth", "Sorrow of Phi Orionis", "The Viscountess of Venus," "Wing of Horus", "Kiss of the Constrictor", "Eternal Freedom","The Sacred Skunk", "Warrior''s Philosophy", "Remembrance of Aries", "The Levitating Pope", "New London Central", "Paradise Reborn", "Rainbow of Dreams", "Centurion of Haiti", "Rama Remembered", "Bowman''s Last Stand", "Beyond Limbo''s Light", "Rowlling's Landing", "Princess Fuglesang the Dubious", "Subtle Strategy", "Diamond Dogs", "Saint Lalla the Bewildered", "Divine Mantle of Setebos", "Maryland Citadel", "Watchful Angel", "Fantastic Idea", "Impartial Diplomat", "Splendour of Tethys", "Expected Casualties", "Ashes of the Horned Buffalo", "Starlight on Still Waters", "Dark Matter", "Leonis Reflected in Ice", "Undying Hope", "Sagittarius in Superposition", "Duchess Johnson the Unready", "The Bold Guardian of Saiph", "Eden Reborn","Lullaby of Clarity", "Regrettable Transgression", "Hidden Dragon", "Crouching Tiger", "Dark Light", "King Larry the Elongated", "The Duchess Sarah", "Ode to the Rosetta Probe", "Fermi Paradox Resolved", "The Wise Merchant", "Enigma of Pallene", "Infernal Wrath", "Empress Antoinette the Tenth", "Eternal Rider", "Objective Reality", "Gatekeeper of Jupiter", "Voyager XIII", "Metaphysical Wrath", "Nature of Perfection", "Shimmering Obelisk", "The Rodent Triumphant", "Probability Wave","Rod of Fortitude", "Inappropriate Use of Force", "Jameson Star Base", "Hypothetical Cat", "Prismatic Starlight", "Fortress of Sentience", "Mystifying Photon", "Iridescent Avatar", "Rules of Courtship", "Concealed Funds","The Risen Army", "Commodore Polard of Chelestra", "The Righteous King of Cairo", "Eternal Reminiscence", "Alone in the Night", "Breath of Empathy", "Shoulder of Orionl", "The President of Lave", "Pillar of Justice", "Road of Iron", "Birth Stone of Taurus", "What Lies Beneath", "The Cardinal of Tennessee", "Timeless Star", "Considering Almaz", "Resurrection of Dust", "The Watchful Balrog", "Instructive History", "Cherub of Autumn", "Matriarch Ajanta the Insane", "Neptune Commemorated", "Enlightened Thought", "Time in Eclipse", "Rider of Phobos", "Grimoire of Loki", "Whisper of Pollux", "Democratic Circus", "Ring of Sentience", "Saint Pullman the Addicted", "Flight of Icarus", "Delusion of Freedom", "Come Into My Parlour","Cat''s Cradle" , "Bastille Day IV", "Impartial Executive", "Vision of Erwin Schrodinger", "The Flawless Pearl", "Dawn of the Poet", "The Wealth of Hyperion", "Pride of Yorkshire", "Duke Raj the Miserable", "Scorpio One Hub", "The Sound of Drums", "Chasm City", "Laika's Sacrifice", "Saint Lemaitre the Unconvincing", "Mystical Romantic", "Temporal Innovations", "Schrodinger's Cat", "Hidden Order", "Songs of Belfast", "Lord of Larkana", "Howl of Cerberus", "The William Gibson", "Cloak of Night", "Einstein's Fallacy", "The First Viscount of Argentina", "Miraculous Nostalgia", "Pondering  Kilper", "Savage Garden", "Robots and Electric Goats", "Mother of Dragons", "Poetic Silence", "Albedo of Order","Baba Yaga's Hut", "Siegfried's Bassoon", "Deliverance Arc", "Unquenchable Spirit of Ares", "Savage Feline''s Regret", "Second Star to the Right", "The Edgar Allan Poe", "Mysterious Legion", "Naked Arbitrator", "Ascension of Loki", "Dark Rainbow", "Voice of Morning", "River of Reality", "Dishonourable Behaviour", "And Hell Followed", "Bastion of Trade", "Baron Cochrane the Weightless", "Earl Bagramyan the Uncivilized", "Lament of the Unusual Toad", "Unquenchable Flame of Eros", "Fires of Despair", "Call of Cthulhu", " Georgia''s Best Hope", "Garneau''s Bravery", "Zodiacal Bastion of Mulan", "Undeclared Assets", "Honourable Daemon", "Enduring Rune of Dionysus", "Prodigal Son", "Breath of Delight", "Silent Raven", "Reasonably Calm","Fallen Rider of Llmare", "Enigmatic Visionary", "Delphine's Choice", "Size Isn't Everything", "The Unseen Sphere of Niskus", "The Generous King of Riedquat", "Manifestation of Endurance", "Dominion of Enterprise", "Prismatic Conscience", "Garden of Uszaa", "Time of Neptune", "Brother Arnold the Edible", "Intervention of Ogma", "Emissary of Shadow", "Vison of Enlightenment", "Servalan's Conceit", "Manifestation of Purity", "Paradox of Venus", "Ecstasy of Battle", "The Arcane City of Nemty", "Merchant's Bay", "Time and Tide", "Ocean of Storms", "The Flying Dutchman", "Poetic Justice of Altair", "Immortal Bridge", "Paradox of Bravery", "Hides with Weasels", "Metaphysical Accident", "Priest of Rebellion", "Wizard and Glass", "Betelgeuse in Reflection", ]

(... and so on with this.galaxy3mainstations=, this.galaxy4mainstations=, this.galaxy5mainstations=, this.galaxy6mainstations=, this.galaxy7mainstations=, this.galaxy8mainstations=. I haven't C&Ped the names for these arrays as it makes the post too big, but they are all done."

// Array to name all the Black Monks Stations in Galaxys 1 to 8 (256 Names is more than is needed)

this.blackmonksnamestations = [ "Gospel of Debt", "Nave of Piety", "Chant of Banking", "Saviour of the Blessed", "Song of the Miser", "Shepherd of the Bankrupt", "Mace of Negative Equity", "Saint of the Poor", "Bishop of Debt", "Prayer of Virtue", "Robe of Compound Interest", "Disciple of Suffering", "Servant of Debt", "Hall of the Poor", "Shepherd of the Poor", "City of the Overdrawn", "Disciple of Pain", "Hall of the Meek", "Hammer of the Bankrupt", "Messiah of Suffering", "Mace of Banking", "Stocks of Gold", "City of the Righteous", "Lord of Servitude", "Bishop of Lamentation", "Temple of Lamentation", "Missionary of the Poor", "Saviour of the Righteous", "Prayer of the Bankrupt", "Tome of Economics", "Lash of the Miser", "Cleric of Pain","Disciple of the Overdrawn", "Temple of Economics", "Path of Virtue", "Gospel of Credit", "Hall of Currency", "Hall of Piety", "Hammer of Poverty", "Hall of Compound Interest", "Lord of Debt", "Saint of Borrowing", "Hall of Virtue", "Prayer of Debt", "Home of the Bankrupt", "Nave of Pain", "Bankrupt and Happy", "Nave of Debt", "Stocks of Repentance", "Servant of Negative Equity", "Stocks of the Crusader", "Lash of Negative Equity", "Tabard of the Meek", "Bishop of Pain", "Gospel of Atonement", "Missionary of Pain", "Prayer of Servitude", "Well of Debt", "Servant of Piety", "Shepherd of the Overdrawn", "Tabard of Atonement", "Song of the Meek", "Prayer to the Overdrawn", "Hammer of Retribution","Prayer of Currency", "Hall of the Bankrupt", "Tome of Virtue", "Song of Gold", "Bishop of Poverty", "Tabard of the Miser", "Scythe of the Bankrupt", "Lady of Overdrafts", "Nave of the Blessed", "Messiah of Economics", "Prayer of Credit", "Gospel of Virtue", "Song of Lamentation", "Revelation of Negative Equity", "Vestments of the Righteous", "Disciple of Virtue", "Missionary of Credit", "Gospel of Virtue", "City of Mammon", "Song of Currency", "Song of Gold", "Tome of the Destitute", "Scythe of Capitalism", "Chapel of Atonement", "Shepherd of Virtue", "Saviour of Currency", "Messiah of Capitalism", "Vestments of Poverty", "Mace of Borrowing", "Chant of the Bankrupt", "Robe of Piety", "Gospel of the Righteous","Saint of Pain", "Lash of Banking", "Tabard of Credit", "Gospel of Virtue", "Song of Compound Interest", "Revelation of Negative Equity", "Shepherd of Banking", "Nave of Repentance", "Saviour of the Overdrawn", "Church of Currency", "House of the Miser", "Revelation of Mammon", "Lady of Mammon", "Sword of Debt", "Maid of Money", "Church of Credit", "City of Retribution", "Temple of Mammon", "Temple of the Bankrupt", "Lord of the Overdrawn", "Tabard of Atonement", "Chant of the Overdrawn", "Lord of the Bankrupt", "Hammer of Negative Equity", "Stocks of Capitalism", "Song of Mammon", "Chant of the Poor", "Servant of Borrowing", "Saint of Gold", "Chant of Capitalism", "Gospel of Debt", "Robe of Banking","Revelation of Capitalism", "Hammer of the Crusader", "Brother of Currency", "Mace of the Poor", "Church of Suffering", "Sister of the Destitute", "Road of the Debt", "Missionary of the Crusader", "Tabard of Repentance", "Shepherd of Pain", "Lord of Loans", "Stocks of Piety", "Robe of the Bankrupt", "Citadel of Debt", "House of Retribution", "Lord of the Wanderer", "Disciple of the Miser", "Halls of Currency", "Nave of Iron", "Temple of Piety", "Saint of Repentance", "Servant of Equity", "Stocks of the Crusader", "Lash of Suffering", "Chapel of Capitalism", "House of the Miser", "Servant of Lamentation", "Hall of Banking", "Bishop of Virtue", "Chant of Retribution", "Temple of Compound Interest", "Tabard of the Crusader","Robe of Gold", "Missionary of Poverty", "Song of Debt", "Saviour of Repentance", "Chant of Virtue", "Saint of Iron", "Vestments of Credit", "Chapel of Gold", "Robe of Loans", "House of Iron", "Temple of Credit", "Hall of Gold", "Chant of Currency", "Tome of Repentance", "Scythe of Silver", "Chapel of Credit", "Stocks of Iron", "Gospel of the Blessed", "Chapel of the Blessed", "Hall of Retribution", "Song of Banking", "Hall of Virtue", "Tabard of Lamentation", "Messiah of the Wanderer", "Missionary of the Meek", "Revelation of Repentance", "Nave of the Meek", "Bishop of Virtue", "Tome of Debt", "Book of Piety", "Tome of Borrowing", "Messiah of Servitude","Gospel of Mammon", "Bishop of Suffering", "Disciple of Compound Interest", "Shepherd of the Meekt", "Saint of Borrowing", "Sister of Currency", "Cleric of Economics", "Nave of Pain", "Tabard of Capitalism", "Missionary of Debt", "Chant of Economics", "Vestments of Equity", "Tabard of Atonement", "Cry of the Meek", "Missionary of the Wanderer", "Church of Virtue", "Scythe of Atonement", "Brother of Borrowing", "Church of Repentance", "Saviour of the Overdrawn", "House of Capitalism", "Tabard of Mammon", "Priest of the Poor", "Disciple of Piety", "Hammer of Atonement", "Cleric of Debt", "Gospel of Currency", "Book of Debt", "Nave of Credit", "Howl of the Bankrupt", "Lady of Debt", "Vestments of Gold","Saint of Borrowing", "Disciple of the Crusader", "Hall of Piety", "Hammer of Atonement", "Cleric of Retribution", "Chant of Virtue", "City of Mammon", "City of Credit", "Stocks of Steel", "Disciple of Iron", "Tabard of Servitude", "Vestments of the Poor", "Chant of Pain", "City of Currency", "Song of Mammon", "Hymn of Currency", "Tome of Lamentation", "Mace of Iron", "Servant of Pain", "Path of the Miser", "Way of the Poor", "Bishop of Debt", "Hymn of Virtue", "Robe of Credits", "Disciple of Suffering", "Revelation of Repentance", "Robe of Economics", "Hammer of the Blessed", "Prayer of Pain", "Robe of the Poor", "Cleric of Banking", "Chapel of the Wanderer",]

// 48 Arrays of 256 names to name all the OXP stations in the game.
//If the player has no station OXPs installed then these arrays are not read or used.
//Playing with all the current (October 2020) Station OXPs installed there are about 8,000 OXP stations in all 8 Galaxies.
//48 Arrays of 265 names gives suffient names to name 12,288 OXP stations with unique names.
//If in the future more OXP stations are added the OXP will loop back to the first array after allocatiing 12,288 names.
//Any duplication will not be noticable therefore. As it only takes 10 minutes for me to produce a new 256 name array and C&P them in I may add a few more than 48.

// ARRAYS ENTERED UP TO HERE.
// TO DO - RUN OLITE 8 times to generate 48 arrays and C&P in.

this.nameoxpstations1= [ ]



this.nameoxpstations2= [ ]
this.nameoxpstations3= [ ]
this.nameoxpstations4= [ ]




//(always replace  '&apos with ')
	
}

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.
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6547
Joined: Wed Feb 28, 2007 7:54 am

Re: Random Station Names OXP

Post by another_commander »

Have a look at this, I hope it covers what you need and there is an example of usage there too:
http://wiki.alioth.net/index.php/Oolite ... nVariables
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
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 »

Thanks. But still pretty stuck. One question though - Is there any limit on the number of entries I can put in an array? ATM the names for the main stations are stored as one array per galaxy, but it would be easier if I just had 3 arrays, One for Main Stations, One for Black Monks and One for the OXP stations as then I won't need to test for the Galaxy and I'll (hopefully) only need 3 commands. Can I just have 3 arrays first ontaining 2048 for the Main Stations, second containing 256 for Black Monks and the third containing 12,048 for the the OXP stations?
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.
cag
Deadly
Deadly
Posts: 197
Joined: Fri Mar 17, 2017 1:49 am

Re: Random Station Names OXP

Post by cag »

How about a dictionary (aka mapping) of 'galaxy' stations

Code: Select all

this.$mainStations = {
    0: [ "Hand of Glory", "War Cry of Fortuna", "Petrified Cockatrice", ...],
    1: [ "The Truce of Tokyo", "Chromatic Starlight", "Shadow of Empathy", ...],
   ...
    7: [ ...]
}
to set array for current 'galaxy'

Code: Select all

this.$mainStations[galaxyNumber] = [ "Hand of Glory", "War Cry of Fortuna", "Petrified Cockatrice", ...];
or in a loop when generating

Code: Select all

for(let id=0; id<256; id++) {
    this.$mainStations[galaxyNumber][id] = this._myNameGenerator();
}
[galaxyNumber is a global variable, available everywhere]

to access array for current 'galaxy' and system

Code: Select all

station = this.$mainStations[galaxyNumber][system.ID]
maximum of 4,294,967,295 items in an array, so that's no problem :)

As for the missionVariables, it will greatly increase the size of a saved game, but storage is cheap. You'll be repeating many words, so saving a list of words and encoding the array may help - I'd have to see a set of data to determine if its worth it.

NB: accessing missionVariables is quite slow, so you'd want to keep that to a minimum, only in startUp, playerWillSaveGame and playerEnteredNewGalaxy, if possible.
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.
User avatar
LittleBear
---- E L I T E ----
---- E L I T E ----
Posts: 2862
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 »

Thanks very much. That loop idea looks good. Been looking at Erics Code and I think I now understand how he did it. I think I will need to use Erics Code to name the OXP stations as I'll need to count them up in some way to assigne the same name to the same OXP stations. But I think I can see how to use your loop code to do the main stations. Good news on no array limit. Only take a minute to C&P them together and it'll be so much easier to only have to work with three arrays.

My Jury goes out tomorrow, so I'll have a go at the Main Station Code on Wednesday whilst they are out. :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.
Post Reply