Randomshipnames.oxp v 1.4 released

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

Moderators: winston, another_commander

User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

I’ll need to do a couple of tests. I’ll be back shortly.
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

Old Murgh wrote: Wed Jul 06, 2022 9:12 pm
No added RandomShipName given to my Scrub in space. Just plain Scrub.
Question: When/How are you spawning your "scrub" ships?
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Randomshipnames.oxp v 1.4 released

Post by Old Murgh »

phkb wrote: Wed Jul 06, 2022 10:30 pm
Question: When/How are you spawning your "scrub" ships?
It's a script action (checkForShips->addShipsAtPrecisely) in a planetinfo.plist, my chosen role appears next to the buoy as I eject from Lave.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

Old Murgh wrote: Wed Jul 06, 2022 10:37 pm
It's a script action (checkForShips->addShipsAtPrecisely) in a planetinfo.plist, my chosen role appears next to the buoy as I eject from Lave.
OK, change this:

Code: Select all

this.startUpComplete = function() {
To this

Code: Select all

this.startUp = function() {
And see how that goes.
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Randomshipnames.oxp v 1.4 released

Post by Old Murgh »

phkb wrote: Wed Jul 06, 2022 10:41 pm
OK, change this:

Code: Select all

this.startUpComplete = function() {
To this

Code: Select all

this.startUp = function() {
And see how that goes.
Tried twice, emptied cache. Alas, same result. No effect, no logged error.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

Old Murgh wrote: Wed Jul 06, 2022 10:50 pm
Tried twice, emptied cache. Alas, same result. No effect, no logged error.
Can you try spawning a ship via the console, after the game is started? eg

Code: Select all

worldScripts.scrubNamer._ships = system.addShipsToRoute("scrub", 2, 0.7, "sw");
That should create a couple of scrub ships on the sun-witchpoint route, and store a reference to them in your script. Then, after a second or two, run this command:

Code: Select all

var ships = worldScripts.scrubNamer._ships; for (var i = 0; i < ships.length; i++) log("testing", ships[i].primaryRole + " -- " + ships[i].displayName + " -- " + ships[i]);
And see what the output in the log shows.
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Randomshipnames.oxp v 1.4 released

Post by Old Murgh »

phkb wrote: Wed Jul 06, 2022 11:06 pm
Can you try spawning a ship via the console, after the game is started? eg

Code: Select all

worldScripts.scrubNamer._ships = system.addShipsToRoute("scrub", 2, 0.7, "sw");
That should create a couple of scrub ships on the sun-witchpoint route, and store a reference to them in your script. Then, after a second or two, run this command:

Code: Select all

var ships = worldScripts.scrubNamer._ships; for (var i = 0; i < ships.length; i++) log("testing", ships[i].primaryRole + " -- " + ships[i].displayName + " -- " + ships[i]);
And see what the output in the log shows.
Sorry, I don't have that set up.
My OSX console simply outputs logs. I suspect there is a way for me to use the terminal window (as a javascript console?, I imagine older OS supplied us with one) but I don't see how I get to it. Searching for available options now doesn't make it apparent for me . I'm too much of a novice! :(

Could I bother you to look at it if I made the files available?
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

Yep, send me a PM with a link if you like.
User avatar
montana05
---- E L I T E ----
---- E L I T E ----
Posts: 1166
Joined: Mon May 30, 2016 3:54 am
Location: lurking in The Devils Triangle (G1)

Re: Randomshipnames.oxp v 1.4 released

Post by montana05 »

If you want to be independent of random ship names you can simply build your own selection by either use arrays or the descriptions.plist. An example could be found in ADCK Imperial Trader OXP worldscript. Please note that you need to switch random ship names off as well (shipdata.plist),
Scars remind us where we've been. They don't have to dictate where we're going.
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Randomshipnames.oxp v 1.4 released

Post by Old Murgh »

phkb wrote: Wed Jul 06, 2022 11:43 pm
Yep, send me a PM with a link if you like.
t'is sent. Thank you.
montana05 wrote: Wed Jul 06, 2022 11:47 pm
If you want to be independent of random ship names you can simply build your own selection by either use arrays or the descriptions.plist. An example could be found in ADCK Imperial Trader OXP worldscript. Please note that you need to switch random ship names off as well (shipdata.plist),
That does sound smart, I'll look at that example, but it would have been so cool to figure a way to expand on RSN's role and name pool setup.
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

OK, I think I've spotted the problem.
In your planetInfo, your spawning code says this:

Code: Select all

"addShipsAtPrecisely: junk1 1 pwm 18015 66700 22486"
But, I assumed you would be spawning ships with primaryRole of "scrub". The code you have would make the primaryRole of the ship "junk1", not "scrub".

So, change this line of the script file from this:

Code: Select all

rsn.$externalNameEngine(this.name, "scrub", 1);
to this

Code: Select all

rsn.$externalNameEngine(this.name, "junk1", 1);
And see how that goes.
User avatar
Old Murgh
Wiki Wizard
Wiki Wizard
Posts: 640
Joined: Sat Dec 04, 2021 11:01 pm

Re: Randomshipnames.oxp v 1.4 released

Post by Old Murgh »

phkb wrote: Thu Jul 07, 2022 12:02 am
OK, I think I've spotted the problem.
In your planetInfo, your spawning code says this:

Code: Select all

"addShipsAtPrecisely: junk1 1 pwm 18015 66700 22486"
But, I assumed you would be spawning ships with primaryRole of "scrub". The code you have would make the primaryRole of the ship "junk1", not "scrub".

So, change this line of the script file from this:

Code: Select all

rsn.$externalNameEngine(this.name, "scrub", 1);
to this

Code: Select all

rsn.$externalNameEngine(this.name, "junk1", 1);
And see how that goes.
:D :D :D
––Or change the role in the planetinfo to "scrub" (it was just an irrelevant leftover from the Lave.oxp)

Image

Thank you . You javascriptgeniuses can do anything!
I was young, I was naïve. [EliteWiki] Jonny Cuba made me do it!
User avatar
phkb
Impressively Grand Sub-Admiral
Impressively Grand Sub-Admiral
Posts: 4830
Joined: Tue Jan 21, 2014 10:37 pm
Location: Writing more OXPs, because the world needs more OXPs.

Re: Randomshipnames.oxp v 1.4 released

Post by phkb »

Old Murgh wrote: Thu Jul 07, 2022 12:11 am
Thank you . You javascriptgeniuses can do anything!
Yay! Another happy customer!
User avatar
timer
---- E L I T E ----
---- E L I T E ----
Posts: 336
Joined: Sat Mar 17, 2012 8:26 pm
Location: Laenin spiv club
Contact:

Re: Randomshipnames.oxp v 1.4 released

Post by timer »

Fritz wrote: Tue Oct 27, 2015 10:29 pm
The bounty part should go into the part of the display with the legal status, e.g. "Fugitive, Bounty 98 Cr", but I don't know if this would be possible.
I tried to do it. Now ship names are not touched.
v2.0 uploaded, but now it requires Oolite 1.81
Any wishes and comments are welcome.
Image
Cobra MK III owner since 1994
Post Reply