Page 1 of 3

randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 6:36 pm
by Commander McLane
Here's a little something I did just for my own amusement. But perhaps it can amuse other people as well. :D

randomshipnames.oxp does exactly what it says on the tin: assigning randomly generated names to the ships you meet in your Ooniverse. Currently it does so only for pirates and hunters. Trader names need a greater variety, I feel, and therefore I have first concentrated on the ships which have a clearly defined purpose.

Over the last weeks and months I have gotten rather used to the unique (and sometimes funny) names, so personally I can't imagine not having them anymore. That's why I thought I'd share this small OXP.

As it's pretty much a work in progress (I'm adding more names (or parts of names) whenever I come up with one) I don't want to put it on the Wiki yet, therefore the download link goes directly to the box:

http://www.box.com/s/2zav9tzrluuqqvqsmh9c

There was a thread on the board about half a year ago about random ship names, which inspired me to start this. As far as I can see noone else has done anything with it yet, so I feel free to release this OXP.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 7:01 pm
by Cody
Very nice, McLane... I've just been mauled by an Asp sporting the name Black Despair. I like this OXP... a lot!

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 7:04 pm
by Captain Beatnik
Nice idea! :) I´ll give it a try. Downloading.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 7:29 pm
by cim
Oh, very nice.

My Rescue Stations OXP has some random trader shipnames (which I hadn't considered giving to every trader that shows up, and if you're doing this it makes sense not to). "rescue_random_shipname" in descriptions.plist if you're interested.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 7:33 pm
by Thargoid
Several of my OXPs and ships already do this ( the Vortex and the Maelstrom in Vortex.oxp, the Hammerhead haulers in Aquatics.oxp and the Raptors in TCAT.oxp) - can you add them to the exclusion please as some can be spawned on generic roles?

Liners.oxp also uses this (and has a very large name array) but those are spawned via bigShips or its own populator so I guess your OXP won't affect those.

But if it's useful feel free to use the name arrays in those OXPs if you want additional sources of names.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 7:41 pm
by Commander McLane
Thargoid wrote:
Several of my OXPs and ships already do this ( the Vortex and the Maelstrom in Vortex.oxp, the Hammerhead haulers in Aquatics.oxp and the Raptors in TCAT.oxp) - can you add them to the exclusion please as some can be spawned on generic roles?
Sure. I'll look into it. Until now I have only made provisions for the OXPs I have installed (there are special provisions for assassins.oxp and vector.oxp).

How do you name your ships? randomshipnames does it by adding a colon followed by a random name to displayName. For me that's the best looking way to separate ship type and name. (Also, in my personal copy of BountyScanner I have long ago put the bounty in parenthesis instead of behind a colon. Looks way better to me.) randomshipnames excludes all displayNames which already have a colon in them (ship.displayName.indexOf(":") === -1) in order to avoid naming a ship twice.

Sample picture:
Image

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:00 pm
by Commander McLane
Thargoid wrote:
Several of my OXPs and ships already do this ( the Vortex and the Maelstrom in Vortex.oxp, the Hammerhead haulers in Aquatics.oxp and the Raptors in TCAT.oxp) - can you add them to the exclusion please as some can be spawned on generic roles?
I see that you went for separation by " - " in Vortex.oxp. I guess that's going to be similar in your other OXPs. I can easily exclude names with that string as well. That could mean, however, that unnamed Vortices (is that the plural you use as well?) would be subject to randomshipnames. Thus I can also exclude based on unique roles. What do you prefer?

It would probably be better to have a standard naming convention (either " - " or ": "), but I guess due to the anarchic structure of these boards it's going to be difficult to come up with (and keep and enforce) a standard.

Oh, and by the way: that's also a nice collection of names you've got there in Vortex.oxp. :D I am quite certain that I can get some more inspiration for random name ingredients from it. :wink:

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:07 pm
by Gimi
You really have to stop assuming nobody wants this stuff and keeping it all to yourself Commander McLane.

Thank you very much, I like this.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:12 pm
by Commander McLane
Gimi wrote:
Thank you very much, I like this.
18 people like this, too. :D After only 90 minutes on the box.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:14 pm
by Smivs
Speaking as one of the 18, I like the sound of this. Yet to install and try, but I suspect I'll like it. :)

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:30 pm
by Thargoid
Commander McLane wrote:
I see that you went for separation by " - " in Vortex.oxp. I guess that's going to be similar in your other OXPs. I can easily exclude names with that string as well. That could mean, however, that unnamed Vortices (is that the plural you use as well?) would be subject to randomshipnames. Thus I can also exclude based on unique roles. What do you prefer?

It would probably be better to have a standard naming convention (either " - " or ": "), but I guess due to the anarchic structure of these boards it's going to be difficult to come up with (and keep and enforce) a standard.

Oh, and by the way: that's also a nice collection of names you've got there in Vortex.oxp. :D I am quite certain that I can get some more inspiration for random name ingredients from it. :wink:
It varies a bit from OXP to OXP, but generally that's the methodology. It's probably safest to exclude by the unique role. There shouldn't be any unnamed Vortices (yes that is the plural in English) in normal spawning gameplay (if my scripting is done right!), but they are quite rare anyway, or should be.

If you want to try and standardise I'm happy to go along as I update the OXPs which use this technique. I'm considering going through them over time anyway to use the name array method in Behemoth to make them more unique. When I do that I can also standardise things as well.

The best naming lists are in Vortex and Liners - as I said feel free to plunder them if you want.

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:52 pm
by Commander McLane
Thargoid wrote:
It varies a bit from OXP to OXP, but generally that's the methodology. It's probably safest to exclude by the unique role. There shouldn't be any unnamed Vortices (yes that is the plural in English) in normal spawning gameplay (if my scripting is done right!), but they are quite rare anyway, or should be.
Well, right the first one I spawned had no name. According to the script only one third of them get a name:

Code: Select all

	this.shipTitle = "Vortex";
	this.chooseName = Math.random();
	if(this.chooseName < 0.33)
	...
For now I have summarily excluded names with " - ". However, this isn't fail safe. Both scripts change displayName in the shipSpawned handler, yours in the ship script, mine in the world script. I have no idea which is executed first, or whether there is a custom order in the first place. It may be random. So I'll do the exclusion by unique role as well (I hope all your ships have one).

If we're aiming for a standard in ship naming, I'd vote for separation by ": ". Main reason: it's considerably shorter in print than " - ". And I share your concern about cluttering too much text next to the target box. My dream solution would be to allow for line breaks to be used in ship names. But the developers may not allow that, for fear of opening the flood gates for unbearably long display names. As we know, every scripting ability can be (and has been!) abused by OXPers. :wink:

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 8:59 pm
by Thargoid
Not quite - 1 in 3 get role-specific names. The other 2 in 3 get generic names (the ones in the big array at the bottom of the script - note the else which relates to the 1 in 3 test).

The only way to get one with no name is to use the unique role (and then only a 1 in 3 chance) which may be what you had? Yes all my ships have unique roles - I make a point of it for spawning/testing purposes, plus this kind of detection.

Anyway I'll tweak it next time I upgrade things to go with the : style (if I remember :oops: ).

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 9:08 pm
by SandJ
Commander McLane wrote:
I share your concern about cluttering too much text next to the target box. My dream solution would be to allow for line breaks to be used in ship names. But the developers may not allow that, for fear of opening the flood gates for unbearably long display names.
For reference:

Code: Select all

123456789.123456789.123456789.123456789.123456789.12345
TCHETYRNADTSATAIA GODOVSTCHINA OKTIABRSKOI REVOLIOUTSII - WWII Russian warship
NUESTRA SENORA DE LA PURA Y LIMPIA CONCEPCION           - a Spanish Galleon
FLIEGERKOSMONAUT Der DDR SIGMUND JAHN                   - an East German vessel
FLIGHT LIEUTENANT VASSILIADES, RAF                      - a Greek vessel
MAJOR GENERAL HERBERT A. DARGUE                         - US liberty ship
[/size]

Re: randomshipnames.oxp preview

Posted: Tue Jan 24, 2012 9:15 pm
by Commander McLane
Thargoid wrote:
The only way to get one with no name is to use the unique role (and then only a 1 in 3 chance) which may be what you had?
Yes, that's of course what I had, because I wanted to specifically spawn a Vortex. Stupid me - that'll teach me to only read the script very cursory. :oops: