Page 5 of 12

Re: Randomshipnames.oxp v 1.2 released

Posted: Sun Jul 08, 2012 3:56 pm
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?

Re: Randomshipnames.oxp v 1.2 released

Posted: Wed Jan 02, 2013 12:25 am
by Cody
This OXP invents some great names for rock hermits - but just occasionly, apostrophes clash in the F8 screen title.

Re: Randomshipnames.oxp v 1.2 released

Posted: Wed Jan 02, 2013 1:53 pm
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.

Re: Randomshipnames.oxp v 1.2 released

Posted: Wed Mar 20, 2013 12:32 pm
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

Re: Randomshipnames.oxp v 1.2 released

Posted: Wed Mar 20, 2013 1:15 pm
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.

Re: Randomshipnames.oxp v 1.2 released

Posted: Wed Mar 20, 2013 1:49 pm
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

Re: Randomshipnames.oxp v 1.2 released

Posted: Sat Apr 20, 2013 9:06 am
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".

Re: Randomshipnames.oxp v 1.2 released

Posted: Sun Apr 21, 2013 1:41 pm
by Commander McLane
Thanks for the notification.

Re: Randomshipnames.oxp v 1.2 released

Posted: Sun Apr 21, 2013 3:11 pm
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?

Re: Randomshipnames.oxp v 1.2 released

Posted: Sun Apr 21, 2013 6:26 pm
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

Re: Randomshipnames.oxp v 1.2 released

Posted: Sun Apr 21, 2013 9:13 pm
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?

Re: Randomshipnames.oxp v 1.2 released

Posted: Mon Apr 22, 2013 12:06 am
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.

Re: Randomshipnames.oxp v 1.2 released

Posted: Mon Apr 22, 2013 12:10 am
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Sun May 12, 2013 8:46 pm
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!

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon May 13, 2013 10:23 pm
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!