ShipName Randomizer [Public Testing] 21/6/05
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
ShipName Randomizer [Public Testing] 21/6/05
Ship Name Randomizer Version 1 *Merroc*
Ship Name Randomizer Version 1 *Commander Jamieson*
By OML and CyberMe
This command gives you the chance to quickly name you ships individualy through two totaly random words and phrases.
There are many combinations that return good names while others are just dont fit together its up to you to find ones that suit the ship.
Fleets of ships can now look different to each other. Flagships can have powerful names.
*THIS COMMAND REQUIRES A TRADING SYSTEM EXTENTSION*
To use go into the ship command console and select a command slot. Select the shipname randomizer.
The new name will appear at the bottom of the command console menu for easy viewing.
**************************************************
I am going to design a little ship command to create randomized ship names from a pool of phrases. For example:
Burning - Spacefly
Black - Sabre
Bright - Fire
e.t.c
The thing is that I need help thinking of words. The more the better. In the example there are descriptive words: Burning, Black and Bright. The next words are objective: Spacefly, Sabre and Fire.
I have just started this project today and am finding myself getting... slow.
Any help would be welcome.
Thanks.
Ship Name Randomizer Version 1 *Commander Jamieson*
By OML and CyberMe
This command gives you the chance to quickly name you ships individualy through two totaly random words and phrases.
There are many combinations that return good names while others are just dont fit together its up to you to find ones that suit the ship.
Fleets of ships can now look different to each other. Flagships can have powerful names.
*THIS COMMAND REQUIRES A TRADING SYSTEM EXTENTSION*
To use go into the ship command console and select a command slot. Select the shipname randomizer.
The new name will appear at the bottom of the command console menu for easy viewing.
**************************************************
I am going to design a little ship command to create randomized ship names from a pool of phrases. For example:
Burning - Spacefly
Black - Sabre
Bright - Fire
e.t.c
The thing is that I need help thinking of words. The more the better. In the example there are descriptive words: Burning, Black and Bright. The next words are objective: Spacefly, Sabre and Fire.
I have just started this project today and am finding myself getting... slow.
Any help would be welcome.
Thanks.
Last edited by Xenon_Slayer on Sat, 25. Feb 06, 14:51, edited 3 times in total.
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 109
- Joined: Tue, 14. Sep 04, 08:07
Descriptive:
red, yellow, blue, white, orange, green, purple...Color
hot, cold, warm, simmering, sirring, freezing, frozen, melting, vaporizing...Temperature
tired, relaxed, slothful, neat, orderly, tense, energetic...Moods
slow, fast, speedy, clunker, swift, soaring, gliding....Moving
depressed, angry, hurt, lonely...ok, enough about me
happy, sad, lovely, caring, wishful, nieve, ignorant, sincere...State of Mind
whispering, shouting, vocal, quite, loud, spitting....Vocal
crazy, insane, paranoid, scitzo, freak, freaky, freaker...State of Mind
long, short, erect, not erect, limp, flacid...xenon or khaak
transverse, coronal, sagital, axial...alignment
A thesaurus can be found online...I think that kind of stuff is still available and I am certain can easily be bought on E-Bay <- PLUG
Objective:
dragon, wraith, ghoul, goblin, imp, dervish, devil...Mideival
warrior, elf, dwarf, halfling, human, enchantor...read some books man.
sword, broadsword, bow, arrow, axe, cleaver, cleavage...Mideival
car, truck, tank, hummer, van, ship, morgage....Ways to spend money.
pirate, teladi, xenon, argon, boron, split....Races
carrier, destroyer, fighter, cruiser, courier, scout, freighter...ships
arm, leg, head, neck, elbow?, menubrium....body parts
Gossiper, Freighter, Captain, Cheater, Choir Boy....people
I dont know....but you could name them The Flaming Teladi or The Wide Split or even The Ugly Khaak...make up your mind.
EDIT: You are welcome.
red, yellow, blue, white, orange, green, purple...Color
hot, cold, warm, simmering, sirring, freezing, frozen, melting, vaporizing...Temperature
tired, relaxed, slothful, neat, orderly, tense, energetic...Moods
slow, fast, speedy, clunker, swift, soaring, gliding....Moving
depressed, angry, hurt, lonely...ok, enough about me
happy, sad, lovely, caring, wishful, nieve, ignorant, sincere...State of Mind
whispering, shouting, vocal, quite, loud, spitting....Vocal
crazy, insane, paranoid, scitzo, freak, freaky, freaker...State of Mind
long, short, erect, not erect, limp, flacid...xenon or khaak
transverse, coronal, sagital, axial...alignment
A thesaurus can be found online...I think that kind of stuff is still available and I am certain can easily be bought on E-Bay <- PLUG
Objective:
dragon, wraith, ghoul, goblin, imp, dervish, devil...Mideival
warrior, elf, dwarf, halfling, human, enchantor...read some books man.
sword, broadsword, bow, arrow, axe, cleaver, cleavage...Mideival
car, truck, tank, hummer, van, ship, morgage....Ways to spend money.
pirate, teladi, xenon, argon, boron, split....Races
carrier, destroyer, fighter, cruiser, courier, scout, freighter...ships
arm, leg, head, neck, elbow?, menubrium....body parts
Gossiper, Freighter, Captain, Cheater, Choir Boy....people
I dont know....but you could name them The Flaming Teladi or The Wide Split or even The Ugly Khaak...make up your mind.
EDIT: You are welcome.
Last edited by CyberMe on Wed, 15. Jun 05, 03:47, edited 1 time in total.
Where is my mind?
-
- Posts: 111
- Joined: Mon, 7. Mar 05, 07:13
-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
It is a command in the Ship Command Slot. So far it is working. These are the techical details.
The main script just puts two phrases together.
Phrases
Now I just need to add more phrases in each phrase pool.
This will not affect the name of ships in shipyards.
The main script just puts two phrases together.
Code: Select all
001 @ $Phrase1 = [THIS] -> call script 'plugin.Random.Shipname.Phrases1' :
002 @ $Phrase2 = [THIS] -> call script 'plugin.Random.Shipname.Phrases2' :
003 $Name = sprintf: fmt='%s %s', $Phrase1, $Phrase2, null, null, null
004 [THIS] -> set name to $Name
005 return null
Code: Select all
Start:
002 $Count = random value from 0 to 1000 - 1
003 $Count2 = 0
004 if $Count == $Count2
005 $Phrase = [PLAYERSHIP] -> get pilot name
006 $Phrase = sprintf: fmt='%ss', $Phrase, null, null, null, null
007 end
008 inc $Count2 =
009 if $Count == $Count2
010 $Phrase = 'Alpha'
011 end
012 inc $Count2 =
013 if $Count == $Count2
014 $Phrase = 'Beta'
015 end
016 inc $Count2 =
017 if $Count == $Count2
018 $Phrase = 'Blue'
019 end
E.T.C
if $Phrase == null
126 goto label Start
127 end
128 return $Phrase
This will not affect the name of ships in shipyards.
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 109
- Joined: Tue, 14. Sep 04, 08:07
You might save some space by making you "pool" of phrases an ARRAY. by setting the alocation size to the size of the array/pool you can just scroll through the array and randomly select something. Like this:
DescriptiveArray1 = array alloc: size = Whatevernumber
insert "string/work" into array DescriptiveArray1 at index 0
etc
This could be a very long list. at index can go into the thousands. Then you could call up your array by:
Index1 = size of array: DescriptiveArray1
RandomNum = get random number 0 to Index1
RandomDescriptive = DescriptiveArray1[RandomNum]
This will save you from all the if statements and just let you pull random whatevers from your array. You might want to write your ArrayGenerator in a separate script so that you can add to or take away from the list really easily and then you can call it with the random number generated and return the word.
Another array will be needed for the Objective words, same as above. And again...putting these huge lists in their own script DescrArrayGen and ObjectArrayGen would save some clutter from GetRandomName.Main
RandomNum = get random number 0 to whatevernumber
RandomNameD = [THIS] call script DescArrayGen; RandomNum
RandomNum = get random number 0 to whatevernumber
RandomNameO = [THIS] call script ObjectArrayGen; RandomNum
RandNameComplete = RandomNameD + " " + RandomNameO
Just my thoughts.
DescriptiveArray1 = array alloc: size = Whatevernumber
insert "string/work" into array DescriptiveArray1 at index 0
etc
This could be a very long list. at index can go into the thousands. Then you could call up your array by:
Index1 = size of array: DescriptiveArray1
RandomNum = get random number 0 to Index1
RandomDescriptive = DescriptiveArray1[RandomNum]
This will save you from all the if statements and just let you pull random whatevers from your array. You might want to write your ArrayGenerator in a separate script so that you can add to or take away from the list really easily and then you can call it with the random number generated and return the word.
Another array will be needed for the Objective words, same as above. And again...putting these huge lists in their own script DescrArrayGen and ObjectArrayGen would save some clutter from GetRandomName.Main
RandomNum = get random number 0 to whatevernumber
RandomNameD = [THIS] call script DescArrayGen; RandomNum
RandomNum = get random number 0 to whatevernumber
RandomNameO = [THIS] call script ObjectArrayGen; RandomNum
RandNameComplete = RandomNameD + " " + RandomNameO
Just my thoughts.
Where is my mind?
-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
That helps a lot. I did think of using Arrays first but I thought Ifs would be easyer. I will modify it later.
The array should be called like an setup script so it is always updated. The array would be stored as a global variable.
Cheers for that.
The array should be called like an setup script so it is always updated. The array would be stored as a global variable.
Cheers for that.
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 3008
- Joined: Wed, 6. Nov 02, 20:31
-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
I have set the arrays as global variables but there is a problem:
The $Phrase1 and $Phrase2 are returning Null all the time so it goes round in a loop. I have made a mistake in either setting or getting the arrays as global variables.
Code: Select all
001 $Phrase1Array = get global variable: name='Random.Phrase1'
002 $Phrase2Array = get global variable: name='Random.Phrase2'
003 while $Phrase1 == null
004 $Random = random value from 0 to 300 - 1
005 $Phrase1 = $Phrase1Array[$Random]
006 @ = wait 10 ms
007 end
008 while $Phrase2 == null
009 $Random = random value from 0 to 300 - 1
010 $Phrase2 = $Phrase2Array[$Random]
011 @ = wait 10 ms
012 end
013 $Name = sprintf: fmt='%s %s', $Phrase1, $Phrase2, null, null, null
014 [THIS] -> set name to $Name
015 return null
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 3461
- Joined: Fri, 4. Feb 05, 13:44
No.Phrase1 = size of array Phrase1.Array
Cnt = random value between 0 to No.Phrase1 -1
Phrase1 = Phrase1.Array [Cnt]
= wait 100 ms
waits should be at least 100ms (smaller doesnt work .. )
next if you're going for a random number loze the "while" part ..there's no need for it if youre going for a random number ..
Cnt = random value between 0 to No.Phrase1 -1
Phrase1 = Phrase1.Array [Cnt]
= wait 100 ms
waits should be at least 100ms (smaller doesnt work .. )
next if you're going for a random number loze the "while" part ..there's no need for it if youre going for a random number ..

-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
That while is because the array has loads of nulls in it. The array is 300 entrys long and only the first few are phrases. Its just so you dont have to append the array bigger each time. Is there an other way so it grows each time a new entry is added into the main group of phrases?
Back to the main problem: The array is returning nulls, no matter what the number is. I must have stored it wrong.
Back to the main problem: The array is returning nulls, no matter what the number is. I must have stored it wrong.
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 3461
- Joined: Fri, 4. Feb 05, 13:44
thats what I showed you .. never never never ever have 'nulls' in an array .. also you have a check if Phrasex= null .. but what if it is after getting Phrasex and it returns null .. than your script returns the null ..
like I did .. "No.Phrase1 = size off array Phrase1.Array"
will give you the size off the array .. so no matter iff the array is 5 or 500 .. than "Cnt" is a random value between 0 (the first entry off the array) to "no.Phrase1 -1" (the last entry of the array)
so it will always pick a correct number .. now with this number you can extract the "phrase"..
like I did .. "No.Phrase1 = size off array Phrase1.Array"
will give you the size off the array .. so no matter iff the array is 5 or 500 .. than "Cnt" is a random value between 0 (the first entry off the array) to "no.Phrase1 -1" (the last entry of the array)
so it will always pick a correct number .. now with this number you can extract the "phrase"..

-
- Posts: 3461
- Joined: Fri, 4. Feb 05, 13:44
this is what you should do if you 'really' want to use it like this ..
Code: Select all
001 $Phrase1Array = get global variable: name='Random.Phrase1'
002 $Phrase2Array = get global variable: name='Random.Phrase2'
003 while $Phrase1 == null
004 Get.Phrase.1
$Random = random value from 0 to 300 - 1
005 $Phrase1 = $Phrase1Array[$Random]
006 skip if not $Phrase1 == null
go to label Get.Phrase.1
@ = wait 100 ms
007 end
-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
It seems to be working. I did think about what you were saying but it wasnt that. I just named the global variables wrong in different scripts. Total Oops on my part. Thanks anyway.
It is now working with an array, not ifs and ends. Now I just need to add a load more phrases and it should be ready for testing.
It is now working with an array, not ifs and ends. Now I just need to add a load more phrases and it should be ready for testing.
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 3461
- Joined: Fri, 4. Feb 05, 13:44
-
- EGOSOFT
- Posts: 13123
- Joined: Sat, 9. Nov 02, 11:45
Before relese I am hoping to translate most of the language to German too. If someone wants to help with single word translation (People not using internet based translators) can you please PM me and I will give you a list of phrases. Thanks.
Come watch me on Twitch where I occasionally play several of the X games
-
- Posts: 14163
- Joined: Sun, 16. May 04, 13:01
Found this through a link, and wanted to make a suggestion, so sorry if this is resurrecting an old thread.
Its a good idea, but can you think of doing a purely functional name script.
I tend to name all my factory ships like this :
AM Dolphin SPP Sell E
Where AM is the sector its based in (Antigony Memorial)
Dophin is the ship type
SPP is the station abreviation
Sell or Buy is the function performed by the ship
E is the product abreviation.
That way, when one is killed or needs to be fixed, I know where it came from and what it was doing, when I go to tell it to resume work, or need to replace it if its been killed.
So after setting its work function and base, it would be really useful to have a ship rename option that renames the ship according to the above automatically. If you change the function, you just rename the ship with one button press, instead of typing it.
That would be a great help.
I also put an identifyer on the front to identify my fleet name, instead of Argon or other race name, so if you could type that in as a variable on script execution it would be neat to. Which would make it .....
DOWNUNDER AM Dolphin SPP Sell E
Its a good idea, but can you think of doing a purely functional name script.
I tend to name all my factory ships like this :
AM Dolphin SPP Sell E
Where AM is the sector its based in (Antigony Memorial)
Dophin is the ship type
SPP is the station abreviation
Sell or Buy is the function performed by the ship
E is the product abreviation.
That way, when one is killed or needs to be fixed, I know where it came from and what it was doing, when I go to tell it to resume work, or need to replace it if its been killed.
So after setting its work function and base, it would be really useful to have a ship rename option that renames the ship according to the above automatically. If you change the function, you just rename the ship with one button press, instead of typing it.
That would be a great help.

I also put an identifyer on the front to identify my fleet name, instead of Argon or other race name, so if you could type that in as a variable on script execution it would be neat to. Which would make it .....
DOWNUNDER AM Dolphin SPP Sell E