Page 6 of 12

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 6:13 pm
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?

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 8:46 pm
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 8:58 pm
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!

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 9:03 pm
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 9:05 pm
by Cody
Commander McLane wrote:
Hunters are not launched by the populator...
Are they not... I do wonder why?

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 9:14 pm
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Jul 08, 2013 10:04 pm
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!

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Sep 02, 2013 9:41 pm
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Mon Sep 02, 2013 9:45 pm
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!

Re: Randomshipnames.oxp v 1.3 released

Posted: Tue Sep 03, 2013 7:24 am
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.)

Re: Randomshipnames.oxp v 1.3 released

Posted: Tue Sep 03, 2013 12:03 pm
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Tue Sep 03, 2013 12:08 pm
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>

Re: Randomshipnames.oxp v 1.3 released

Posted: Tue Sep 03, 2013 1:15 pm
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.

Re: Randomshipnames.oxp v 1.3 released

Posted: Tue Sep 03, 2013 1:17 pm
by Cody
Commander McLane wrote:
Thus, as of now, I have persistent rock hermit naming implemented.
Great!

Re: Randomshipnames.oxp v 1.3 released

Posted: Tue Sep 03, 2013 5:17 pm
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!