Randomshipnames.oxp v 1.4 released

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

Moderators: winston, another_commander

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.3 released

Post by Commander McLane »

cim wrote:
In 1.77, the rock hermit positions are consistent for about 90 days and then move. In 1.79 they're permanently consistent (but different to any 1.77 position). This to within the limits of reading a floating-point number anyway: you might want to allow +/- a metre or two.
That's good to know. The effect of wandering rock hermits won't really matter. The new positions will just be added to the list (with new names). And the list is cleared for every galactic jump anyway, so there's no permanent clutter. And yes, the positions are compared with an accuracy of a metre. Actually, given the hermits' size, it could be +/- 100 metres.
cim wrote:
Provided none of the rock hermit names are from a list that gets entries removed over time, you could theoretically write your own RNG function (i.e. instead of Math.random()) for use when generating rock hermit names, and seed it with some combination of the hermit's position and the system ID. Probably more effort than it's worth, though!
Definitely too much effort. Especially as the names do come from depleting lists (the male and female names both get removed from their lists after use, in order to ensure variety).
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

cim wrote:
In 1.79 they're permanently consistent...
<wonders if he could visit every rock hermit in an octant>
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.3 released

Post by Commander McLane »

Cody wrote:
cim wrote:
In 1.79 they're permanently consistent...
<wonders if he could visit every rock hermit in an octant>
Given enough time, sure. There's usually one or two hermits per system (some have none, some have more), that'd make roundabout 500 visits. And you could also visit every main station along the way for the same price. :mrgreen:
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

I ain't worried about main stations - I've probably already visited most, if not all, of them. But rock hermits are different - I like rock hermits for several reasons, and there's always at least one in every system - and now their delightfully wacky names will persist.
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
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Randomshipnames.oxp v 1.3 released

Post by Tricky »

Commander McLane wrote:
cim wrote:
Provided none of the rock hermit names are from a list that gets entries removed over time, you could theoretically write your own RNG function (i.e. instead of Math.random()) for use when generating rock hermit names, and seed it with some combination of the hermit's position and the system ID. Probably more effort than it's worth, though!
Definitely too much effort. Especially as the names do come from depleting lists (the male and female names both get removed from their lists after use, in order to ensure variety).

Code: Select all

/* Same random number for each system. */
randf = system.scrambledPseudoRandomNumber(salt);
Change salt (increase it) for each new name in the system.
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.3 released

Post by Commander McLane »

Tricky wrote:
Commander McLane wrote:
cim wrote:
Provided none of the rock hermit names are from a list that gets entries removed over time, you could theoretically write your own RNG function (i.e. instead of Math.random()) for use when generating rock hermit names, and seed it with some combination of the hermit's position and the system ID. Probably more effort than it's worth, though!
Definitely too much effort. Especially as the names do come from depleting lists (the male and female names both get removed from their lists after use, in order to ensure variety).

Code: Select all

/* Same random number for each system. */
randf = system.scrambledPseudoRandomNumber(salt);
Change salt (increase it) for each new name in the system.
I typed the wrong answer. The problem isn't actually the effort (because scrambledPseudoRandomNumber does indeed provide a reliably unchanging number), but the condition before that. Each name that is used once gets stricken from the list. Thus, "Aaron's Solitary Rock" would become "Abbot's Solitary Rock" when you re-enter the system. Not persistent. Storing and retrieving the names is the only way to ensure persistence.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Randomshipnames.oxp v 1.3 released

Post by Tricky »

Commander McLane wrote:
I typed the wrong answer. The problem isn't actually the effort (because scrambledPseudoRandomNumber does indeed provide a reliably unchanging number), but the condition before that. Each name that is used once gets stricken from the list. Thus, "Aaron's Solitary Rock" would become "Abbot's Solitary Rock" when you re-enter the system. Not persistent. Storing and retrieving the names is the only way to ensure persistence.
Ah! Appologies. I made the mistake of assuming the list was reset on entering a system, ie from this.shipWillExitWitchspace().

Never really done an analysis of the code for Random Shipnames. Just taken a cursory look at the bit that selects the name.

Remember kids, never assume anything as you will make an ass out of you and me. :oops:
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16081
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

Tricky wrote:
Remember kids, never assume anything as you will make an ass out of you and me.
Remember kids, never trust a man with too many fingers!
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: 1248
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 »

Commander McLane: sorry if this has been posted before, but the playerProxyEntity that gets generated upon eject gets a randomshipname, via your oxp, and it's not the name the player himself/herself gave the ship. Thought you ought to know.
Duggan
---- E L I T E ----
---- E L I T E ----
Posts: 496
Joined: Sat Dec 31, 2011 2:58 pm

Re: Randomshipnames.oxp v 1.3 released

Post by Duggan »

I note Henry Every and Blackbeard along with Calico Jack, Henry Morgan quiet regularly in varying forms along with a certain fictional Pirate, However I feel that to make up the numbers in future , there is this.

http://en.wikipedia.org/wiki/List_of_pi ... .80.931730

I do miss William Kydd and Black Bart in my travels amongst others :D

I digress of course (nothing new there then), I simply thought the list might be useful for any future edition of this excellent Expansion Pack.
Flying Python Class Cruiser, Chapter & Verse IV
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.3 released

Post by Commander McLane »

Duggan wrote:
I note Henry Every and Blackbeard along with Calico Jack, Henry Morgan quiet regularly in varying forms along with a certain fictional Pirate, However I feel that to make up the numbers in future , there is this.

http://en.wikipedia.org/wiki/List_of_pi ... .80.931730

I do miss William Kydd and Black Bart in my travels amongst others :D

I digress of course (nothing new there then), I simply thought the list might be useful for any future edition of this excellent Expansion Pack.
It certainly is, and I used it for extracting names. However, I find it necessary that the names I choose are easily recognizable as historical pirates, and some on the list are too little-known to fit the bill.

When compiling the pirate name list, I used a very simple (and of course very imperfect) litmus test for the notoriety of each person on that Wikipedia list: if I knew them instantly as a historical pirate, I assumed that the average Oolite player would probably know them as well, and they went on my list. William Kydd and Black Bart fell through that—admittedly simple—sieve. That's why they're not in.
User avatar
JazHaz
---- E L I T E ----
---- E L I T E ----
Posts: 2991
Joined: Tue Sep 22, 2009 11:07 am
Location: Enfield, Middlesex
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by JazHaz »

UK_Eliter wrote:
Commander McLane: sorry if this has been posted before, but the playerProxyEntity that gets generated upon eject gets a randomshipname, via your oxp, and it's not the name the player himself/herself gave the ship. Thought you ought to know.
In case you missed it McLane?
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.3 released

Post by Commander McLane »

UK_Eliter wrote:
Commander McLane: sorry if this has been posted before, but the playerProxyEntity that gets generated upon eject gets a randomshipname, via your oxp, and it's not the name the player himself/herself gave the ship. Thought you ought to know.
Thanks for the report. This hasn't been posted before.

Under which circumstances did you notice this? Once the player has ejected, hey can't do anything anymore, and the name of the proxy entity doesn't get displayed. There isn't even a way to display it in-game that I'm aware of. So the fact that the proxy entity gets a random name should be of no consequence.

If this is different for you (probably in conjunction with a certain OXP or certain OXPs), then please elaborate.

EDIT: @JazHaz: no, I was just answering. :wink:
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1248
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 »

Commander McLane wrote:
UK_Eliter wrote:
Commander McLane: sorry if this has been posted before, but the playerProxyEntity that gets generated upon eject gets a randomshipname, via your oxp, and it's not the name the player himself/herself gave the ship. Thought you ought to know.
Thanks for the report. This hasn't been posted before.

Under which circumstances did you notice this? Once the player has ejected, hey can't do anything anymore, and the name of the proxy entity doesn't get displayed. There isn't even a way to display it in-game that I'm aware of. So the fact that the proxy entity gets a random name should be of no consequence.

If this is different for you (probably in conjunction with a certain OXP or certain OXPs), then please elaborate.
Dear McLane

I ejected near the system witchpoint, then relaunched from the main station where my pod ended up, and then went back to the system witchpoint with my new ship (that new ship being identical in fittings to the old one, i.e. I didn't buy a new ship). And there was my old ship, with a new name!
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Randomshipnames.oxp v 1.3 released

Post by cim »

Hmm. That's feels like a core bug: the escape sequence adds several hours if not days onto your clock - no way should your old ship still be around after that.
Post Reply