Randomshipnames.oxp v 1.4 released

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

Moderators: another_commander, winston

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

Eric Walch wrote:
Commander McLane wrote:
Not having UPS-courier myself: are they goodies or badies? Being slave hunters, I guess they'd get the aggressive names, correct?
I think their addition is rather rare. They mimic being normal pirates.
Looking into shipdata, are we talking about ups-slavecobra? Or other ships as well?
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16060
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Cody »

This OXP invents some great names for rock hermits - but just occasionly, apostrophes clash in the F8 screen title.
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
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

El Viejo wrote:
This OXP invents some great names for rock hermits - but just occasionly, apostrophes clash in the F8 screen title.
Thanks for the report. Will have to look into that.
User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Rorschachhamster »

Does a ship with a custom role get a name, as well? Does one ship without a name force this onto all in the same shipdata.plist?
Because I'm a little confused - my Traction Engines used to have names... but now they don't have anymore... :?
Could there be a script_info variant where you could force this to happen? Like:

Code: Select all

"script_info" =         {
    "randomshipnames" = yes;
};
:D
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

Rorschachhamster wrote:
Does a ship with a custom role get a name, as well?
That depends on the custom role, and also on which function it has.

For instance, pirates need to be identified as pirates by the randomshipnames-script, or else they would get too peaceful names. Usually they're clearly identifiable as pirates by having "pirate" as their primary role. If you have a ship with a custom role that essentially acts like a pirate, you have two options: change its primary role to "pirate" immediately after spawning or tell me the primary role, and I include it into the randomshipnames-script.

"Peaceful ships" are handled differently, because they consist not only of traders, but many other of the generic roles fall under this category as well. To identify them, the randomshipnames-script uses the property Image isPirateVictim. Anything that is viewed as a potential victim by pirates gets a "peaceful" random name. The generic "trader" and "sunskim-trader" roles fall into this category. Custom roles do not fall into this category by default. This also means that pirates generally ignore ships with custom roles. If you want your ship to become a potential pirate victim, here's how to do it: create a file named "pirate-victim-roles.plist" in your Config folder, and write your custom role into that file. The syntax (in OpenStep) is

Code: Select all

(
    "my_custom_role_1",
    "my_custom_role_2"
)
As a by-product, this will also cause the randomshipnames-script to put your ship into the "peaceful ships" category and name it accordingly.

Rorschachhamster wrote:
Could there be a script_info variant where you could force this to happen? Like:

Code: Select all

"script_info" =         {
    "randomshipnames" = yes;
};
:D
Incidentally, yes, this variant already exists. But because the name has to be different, depending on what category your ship is in, instead of "yes" the value has to be one of the following: "trader", "pirate", "hunter", "police" or "military". So this is the other thing you can do.
User avatar
Rorschachhamster
---- E L I T E ----
---- E L I T E ----
Posts: 274
Joined: Sun Aug 05, 2012 11:46 pm
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Rorschachhamster »

Thanks for the prompt answer...
So, it was just the false role in pirate-victim-roles.plist... :wink:
I probably changed that without changing the plist...
But good to know, anyhow... :D
User avatar
BuggyBY
Dangerous
Dangerous
Posts: 108
Joined: Thu Feb 09, 2012 9:03 am

Re: Randomshipnames.oxp v 1.2 released

Post by BuggyBY »

The pirates spawned at the witchpoint by Taxi Galactica don't get any names assigned at present. Their role seems to be called "taxi_pirate".
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

Thanks for the notification.
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Randomshipnames.oxp v 1.2 released

Post by Svengali »

Would it be possible to allow usage by other OXPs?

E.g. A script needs a random ship name and calls a function in your OXP, which returns a name then?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

Svengali wrote:
Would it be possible to allow usage by other OXPs?

E.g. A script needs a random ship name and calls a function in your OXP, which returns a name then?
Yes, that's absolutely possible. The easiest way would be to call one of the main functions:
  1. worldScripts.randomshipnames.$randomTraderName(ship)
    for peaceful ships: traders, miners, shuttles, liners, sunskimmers, etc.; ship is the ship object in question, thus if called from a ship script it would usually be this.ship
  2. worldScripts.randomshipnames.$randomHunterName(ship)
    for hunters and escorts, generally for aggressive-but-not-necessarily-malevolent ships
  3. worldScripts.randomshipnames.$randomPirateName(ship)
    for pirates and other aggressive and malevolent ships
  4. worldScripts.randomshipnames.$randomRockhermitName(ship)
    as the name suggests, for Rock Hermits, also for other stations
  5. worldScripts.randomshipnames.$randomPoliceName(ship)
    number-and-letter designations for police and navy
These will always return a randomly created name, chosen from one of several naming schemes (except for Rock Hermits and Police, which have only one scheme each).

You can also access the single schemes, if you're interested in names of a specific kind only. They're calculated in the functions that begin with $typeFoo. Note that most of these need one or more parameters. These are:
  • affiliation: usually either "aggressive" or "peaceful"; there are some special cases ("pirate", "medical", "bulkHauler", and "rockhermit"), which work with specific schemes only
  • ship: always the ship object
  • range: a distance in light years; for returning a random system name within that range as part of the ship name ("Sweet Tree Grub of Lave"); it's a parameter, because for instance escorts would be expected to be found farther away from their home system than hunters; I've generally kept the parameter close to the 7LY range in order to return planet names that are recognizable for the player
User avatar
Svengali
Commander
Commander
Posts: 2370
Joined: Sat Oct 20, 2007 2:52 pm

Re: Randomshipnames.oxp v 1.2 released

Post by Svengali »

Thanks CMcL.

Let me specify the request a bit more. I was looking for a way to generate the name without a entity floating around, e.g. for missionscreen texts. The idea was to include it as option in the new CCL_PhraseGenerator, but I guess it would also be usable for story telling OXPs if it doesn't need the 'ship' parameter. Maybe it could be optional?
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

Svengali wrote:
Let me specify the request a bit more. I was looking for a way to generate the name without a entity floating around, e.g. for missionscreen texts. The idea was to include it as option in the new CCL_PhraseGenerator, but I guess it would also be usable for story telling OXPs if it doesn't need the 'ship' parameter. Maybe it could be optional?
That's a little tricky, because the parameter is used for branching the naming mechanism in a couple of places, mainly in the innermost function calls. It's for instance the best way to distinguish police from military, thereby giving both a slightly different designation. It's also vital for identifying escorts, and in a couple of other places.

However, you can get away with passing any ship as a parameter, and will still get a sufficiently randomized name. So you can for instance use the player ship as a generic parameter in those cases where no actual ship gets named. Some of the branches will then of course never be used, but that should be hardly noticeable.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: Randomshipnames.oxp v 1.2 released

Post by Commander McLane »

Incidentally, I have also uploaded version 1.3 of the OXP. It contains more names, more naming schemes, catches more ships, and squashes some bugs. Details in the readMe.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16060
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

Some of these names crack me up - I've just had Sander's Obsidian Jungle of the Libertine bless me in the name of A'lo!
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!
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1244
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

Re: Randomshipnames.oxp v 1.3 released

Post by UK_Eliter »

Yes, there are some great names in there. The names in Arexack's wonderful Cargo_wrecks_teaser OXP - the names for the contents of scooped cargo pods - are great too!
Post Reply