Join us at the Oolite Anniversary Party -- London, 7th July 2024, 1pm
More details in this thread.

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
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
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 pulled out of Estiri main and spotted a Cobra III named Fortune Favours The Brave II launching from the Zieman Habitat. I was feeling benevolent, so let him be and hyperspaced on out to Celaqula. I did my business, and returned to Estiri - to find a Cobra I named Fortune Favours The Brave II patrolling the spacelane. An unlikely dice-roll, eh?
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 »

Quite unlikely, indeed, especially with the numeral "II" appearing in both cases. However, "unlikely" is not "impossible".

"Fortune Favours The Brave" is a standalone phrase. Those are deleted from the list once they're used, in order to minimize the chance of encountering the same name twice. However, "Fortune Favours The Brave" is one of the (many) standalone phrases that appears in more than one list, namely on the lists of both peaceful and aggressive standalone phrases. If the Cobra III was a trader, it would have used the peaceful variant, and if the Cobra 1 was a hunter, it would have used the aggressive variant. Both would then have been stricken from their respective lists, so you wouldn't have encountered the same name again in that particular game.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

Thanks, McLane... I wasn't too sure how the naming mechanism worked.

You know... my contrabandista's gut instinct told me they were both hunters. Wrong again!
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 »

Hunters are not launched by the populator, so a script would have to be doing it.

The populator does launch scavengers (if there's loot in range), but those would take peaceful names as well.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

Commander McLane wrote:
Hunters are not launched by the populator...
Are they not... I do wonder why?
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
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 »

Cody wrote:
Commander McLane wrote:
Hunters are not launched by the populator...
Does it not... I do wonder why?
No particular reason. In-system launching of hunters to replace losses, at least by the main station, is on the list of things for the 1.79 populator to do.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
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-system launching of hunters to replace losses, at least by the main station, is on the list of things for the 1.79 populator to do.
So in future, whenever I snuff a bounty-hunter, the main station will launch a replacement? Sweet!
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
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 »

Commander McLane wrote:
Out of curiosity: are there other OXPs that require naming continuity of certain ships across startUp events?
Not an OXP: the 1.79 "save at secondary station" feature would find this useful for Rock Hermits. Even in 1.77 giving hermits a consistent name based on system and approximate coordinates might be nice.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
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:
Even in 1.77 giving hermits a consistent name based on system and approximate coordinates might be nice.
<nods> It'd be very nice!
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 »

cim wrote:
Commander McLane wrote:
Out of curiosity: are there other OXPs that require naming continuity of certain ships across startUp events?
Not an OXP: the 1.79 "save at secondary station" feature would find this useful for Rock Hermits. Even in 1.77 giving hermits a consistent name based on system and approximate coordinates might be nice.
That's a good idea. :D

Question: are the populator-created rock hermits always spawn in the exact same location, or is there some variation in their coordinates? Loading the same save-game three times and investigating the rock hermit coordinates indicates that they're indeed at the exact same places, but I want to be sure.

EDIT: Further question: are rock hermits and their positions consistent throughout the game? Will the player encounter the rock hermits at the same places each time they jump into the system? (In that case it would make sense to preserve the names even when leaving the system, at least until leaving the galaxy.)
User avatar
Mad Dan Eccles
Deadly
Deadly
Posts: 196
Joined: Tue Sep 07, 2004 8:54 pm
Location: The Greatest City in the Ooniverse
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Mad Dan Eccles »

Commander McLane wrote:
EDIT: Further question: are rock hermits and their positions consistent throughout the game? Will the player encounter the rock hermits at the same places each time they jump into the system? (In that case it would make sense to preserve the names even when leaving the system, at least until leaving the galaxy.)
Not in my experience... dammit.
Master of Mayhem

"The name's derived from Object Oriented eLite so you could say "Oh! Oh! Leet!", but that might sound too much like g33k sex."
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

Commander McLane wrote:
Will the player encounter the rock hermits at the same places each time they jump into the system?
That does happen - but I think they only persist for a limited time. <looks around for a boffin>
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 »

To answer my own question: yes, rock hermits seem to be consistent when passing through the same system several times (and actually, that's a prerequisite for making them points of saving and loading).

Thus, as of now, I have persistent rock hermit naming implemented. :D Whenever a rock hermit is first named, its name and position are stored in an array, which is saved as a mission variable when the game gets saved. Whenever the player returns to the system (or indeed reloads the game), the rock hermit names are retrieved from the list. Only if no stored name is found, a new name is given. Names persist as long as the player doesn't leave the galaxy.

Only (and unavoidable) caveat: if the player doesn't save, the names will not be persistent after reloading. This is also true if a newly discovered rock hermit gets named, and then the player dies before saving. In this case the name will not persist. As long as saving cannot be enforced by script (which wouldn't be a good idea in the first place), there's nothing I can do about that.

I want to do a little further testing before I release the rock-hermits-with-persistent-names version, but it's looking pretty good already.
User avatar
Cody
Sharp Shooter Spam Assassin
Sharp Shooter Spam Assassin
Posts: 16071
Joined: Sat Jul 04, 2009 9:31 pm
Location: The Lizard's Claw
Contact:

Re: Randomshipnames.oxp v 1.3 released

Post by Cody »

Commander McLane wrote:
Thus, as of now, I have persistent rock hermit naming implemented.
Great!
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
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 »

Commander McLane wrote:
To answer my own question: yes, rock hermits seem to be consistent when passing through the same system several times (and actually, that's a prerequisite for making them points of saving and loading).
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.
Commander McLane wrote:
there's nothing I can do about that.
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!
Post Reply