Randomshipnames.oxp v 1.4 released

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

Moderators: winston, another_commander

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

Post by Cody »

Eh? What was that about random huts?
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
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.4 released

Post by Cody »

Would a kindly boffin care to tell me where, and how, to add this to Randomshipnames.oxp so as to include all the new primary roles (if it's possible, of course)?
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
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Randomshipnames.oxp v 1.4 released

Post by Diziet Sma »

Thanks for the reminder.. been meaning to get around to that myself.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Randomshipnames.oxp v 1.4 released

Post by Diziet Sma »

Having taken a look, I get the feeling the entire this.shipSpawned = function(ship) function may need a substantial re-write to utilise cim's suggested change. Best left to Commander McLane, I think.

In the meantime, I'd suggest going with the additions to the script, as posted by Commander McLane a few posts earlier. That's what I plan to do whilst waiting for the next release of RSN.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
User avatar
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Randomshipnames.oxp v 1.4 released

Post by Diziet Sma »

Cody wrote:
Would a kindly boffin care to tell me where, and how, to add this to Randomshipnames.oxp so as to include all the new primary roles (if it's possible, of course)?
A howto and patch, until Commander McLane has the chance to upgrade RSN, can be found here:
https://bb.oolite.space/viewtopic.php?p=221904#p221904
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
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.4 released

Post by Cody »

Thanks, Diz - I'll compare that to my hacked version. No doubt, it will be an improvement!
I thought that might be one for your 'tweaks' thread.
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
Diziet Sma
---- E L I T E ----
---- E L I T E ----
Posts: 6312
Joined: Mon Apr 06, 2009 12:20 pm
Location: Aboard the Pitviper S.E. "Blackwidow"

Re: Randomshipnames.oxp v 1.4 released

Post by Diziet Sma »

Cody wrote:
No doubt, it will be an improvement!
You should have seen the first attempt.. I had a brain-fart, and ended up with Vipers with Hunter names, and Rock Hermits getting saddled with Trader ship names, and couldn't work out what I was doing wrong.. eventually the penny dropped.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
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.4 released

Post by Cody »

Diziet Sma wrote:
You should have seen the first attempt..
<chortles> You should have seen my attempt to incorporate cim's code into the OXP - oh dear!
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
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Randomshipnames.oxp v 1.4 released

Post by spara »

I have a request for a future version. Would it be possible to attach external name engines to this oxp?

And here's the actual case I'm thinking. RandomHits uses it's own naming engine producing names that differ from RandomShipnames. For ambiance I want to occasionally see ships with RandomHits names. For now I've been assigning core roles to RandomHits ships to achieve that. The downside is that some of the RandomHits ships are quite tough and just for ambiance meeting a four laser Imperial Trader as a pirate might not be seen as fun. What I would really want to do is just name some of the ordinary ships with RandomHits names rather than RandomShipnames.

Here's a proposition. At startup I would like to report to RandomShipnames an external engine with a call like this:

Code: Select all

worldScripts.randomshipnames.externalNameEngine(this.name, role, probability)
The actual external name generator could have a standard public function to call to. Something like

Code: Select all

this.randomName(role)
Zireael
---- E L I T E ----
---- E L I T E ----
Posts: 1396
Joined: Tue Nov 09, 2010 1:44 pm

Re: Randomshipnames.oxp v 1.4 released

Post by Zireael »

That's a very good idea.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Randomshipnames.oxp v 1.5

Post by Norby »

Randomshipnames v1.5:
-converted to OXZ format and uploaded to the in-game manager,
-contain Dizzy's patch with the new ship roles,
-externalNameEngine is implemented. An example of usage:

Code: Select all

this.name="numberedcoriolis";

this.startUp = function() {
	var w = worldScripts.randomshipnames;
	if( w ) w.$externalNameEngine(this.name, "coriolis", 1);
}

this.$randomName = function(ship) {
	return(ship.displayName+": "+ship.entityPersonality);
}
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.5

Post by cim »

Norby wrote:
-contain Dizzy's patch with the new ship roles,
It might be worth adjusting this further, if you're maintaining the OXP, to make use of the data in [wiki]Role-categories.plist[/wiki] with Ship.roleIsInCategory(). That way it won't need updating (as much) if core adds any more roles, and it'll make those giant if() statements considerably shorter.
User avatar
Norby
---- E L I T E ----
---- E L I T E ----
Posts: 2577
Joined: Mon May 20, 2013 9:53 pm
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Contact:

Re: Randomshipnames.oxp v 1.5

Post by Norby »

Thanks cim for the tip, now I inserted this small future-proof fix into the same version (due to no downloads yet), but I do not want to make an overhaul like assigning different name styles to the subcategories or so.
User avatar
onno256
---- E L I T E ----
---- E L I T E ----
Posts: 286
Joined: Thu Aug 12, 2010 11:31 am
Location: The Netherlands

Re: Randomshipnames.oxp v 1.4 released

Post by onno256 »

Yep, this is what I was waiting for, keep up the good work!
Wheeling an' dealing while cruisin' the galaxies
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.5

Post by Cody »

Norby wrote:
... contain Dizzy's patch with the new ship roles
Can the trunk rock hermit roles be easily added (by a dumb pilot such as myself, that is)?

Edit to add: have you just done exactly that, Norby? <grins>
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!
Post Reply