Exactly. Some of the expansions available from the manager are just OXPs converted to OXZ by adding a manifest. As a result there are redundancies and subtle and not so subtle misbehavior.Fritz wrote:Randomshipnames does contain code that checks for earlier versions, but perhaps it was an OXP and not an OXZ at the time, and the code has somehow survived.
Randomshipnames.oxp v 1.4 released
Moderators: winston, another_commander
Re: Randomshipnames.oxp v 1.4 released
- Cody
- 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
I've seen a few names repeating lately, which is something I've never seen before - linked?spara wrote:As a result there are redundancies and subtle and not so subtle misbehavior.
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!
And any survivors, their debts I will certainly pay. There's always a way!
- DredgerMan
- Deadly
- Posts: 253
- Joined: Fri Oct 21, 2011 9:01 am
- Location: Some buggy planet at the edge of the known universe
Re: Randomshipnames.oxp v 1.4 released
Uhhhmmmmm,
Oopsie?
I'm afraid I trashed Cody's Machine.
It was a Gecko (red not green) and I let it fire the first volley, truely I did. And it said that i would be in trouble if I wasted his time.
So I didn't. It wasn't much of a fight so I am certain that Cody wasn't piloting it himself. But still.
Sorry, Cody.
Oopsie?
I'm afraid I trashed Cody's Machine.
It was a Gecko (red not green) and I let it fire the first volley, truely I did. And it said that i would be in trouble if I wasted his time.
So I didn't. It wasn't much of a fight so I am certain that Cody wasn't piloting it himself. But still.
Sorry, Cody.
Flying The Sizzlin' Suzie VI, a trusty and venerable Boa Class Cruiser in Oolite 1.84 on
under Windows 6.1.7601 Service Pack 1 64-bit
with a Geforce GT610 videocard
under Windows 6.1.7601 Service Pack 1 64-bit
with a Geforce GT610 videocard
- Cody
- 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
There's a ship out there named Cody's Machine, and it was a bit soft? <chortles> A Soft Machine? Out-Bloody-Rageous!DredgerMan wrote:I'm afraid I trashed Cody's Machine.
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!
And any survivors, their debts I will certainly pay. There's always a way!
-
- ---- E L I T E ----
- Posts: 675
- Joined: Sat Aug 09, 2014 4:16 pm
Re: Randomshipnames.oxp v 1.4 released
Might've been "Kodi's Machine" -- you know spelling ... ... Or did they bring in names from the forums, maybe?! Copyright infringement!Cody wrote:There's a ship out there named Cody's Machine, and it was a bit soft? <chortles> A Soft Machine? Out-Bloody-Rageous!DredgerMan wrote:I'm afraid I trashed Cody's Machine.
- Cody
- 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
Yeah, there are a few. I'm still searching for Disembodied's secret base. It's out there somewhere, and one fine day, I'll find it.Commander_X wrote:Or did they bring in names from the forums, maybe?!
Then there's McLane's Personalities OXP - that had a bunch of forum veterans included, along with their ships of choice.
As an aside, I got a dodgy email this morning, saying Cody had asked them to send me the financial details, etc - a trifle disconcerting!
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!
And any survivors, their debts I will certainly pay. There's always a way!
- Diziet Sma
- ---- 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
Aye.. he was working on an updated version of it, when he vanished.. <sigh>Cody wrote:Then there's McLane's Personalities OXP - that had a bunch of forum veterans included, along with their ships of choice.
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
Re: Randomshipnames.oxp possibilities
I've read myself a bit stupid throughout this thread and the corresponding posts in Tinkerer's workshop, so eh.. could someone in the know tell me in no uncertain terms if it is possible to include in an OXP an addendum to this engine, introducing a new role to include, and a new pool of names for this new role to choose from?
Or is this only possible by editing the Randomshipnames.oxp proper?
Or isn't it actually possible?
Or is this only possible by editing the Randomshipnames.oxp proper?
Or isn't it actually possible?
I was young, I was naïve. Jonny Cuba made me do it!
- Cholmondely
- Archivist
- Posts: 5364
- Joined: Tue Jul 07, 2020 11:00 am
- Location: The Delightful Domains of His Most Britannic Majesty (industrial? agricultural? mainly anything?)
- Contact:
Re: Randomshipnames.oxp v 1.4 released
Behemoth.oxp names each of the various Behemoths it contains. And I think that GenerationShip.oxp does too. No randomness though.
Comments wanted:
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
•Missing OXPs? What do you think is missing?
•Lore: The economics of ship building How many built for Aronar?
•Lore: The Space Traders Flight Training Manual: Cowell & MgRath Do you agree with Redspear?
Re: Randomshipnames.oxp v 1.4 released
I'm pretty sure that Behemoth does it the hard way, with many shipdataentries, not using the RSN. I suppose I could do that –no limit to how many like_ship clones I could put in, but I imagine the risk of that awkward moment when two ships with the same name meet is greater then.Cholmondely wrote: ↑Tue Jul 05, 2022 10:36 pmBehemoth.oxp names each of the various Behemoths it contains. And I think that GenerationShip.oxp does too. No randomness though.
I was young, I was naïve. Jonny Cuba made me do it!
- phkb
- 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
It looks like, to add your own naming routines, based on the primaryRole of a ship, you would need to do this:
Code: Select all
this.name = "MyWorldScriptName";
this.startUpComplete = function() {
var rsn = worldScripts.randomshipnames;
if (rsn) {
rsn.$externalNameEngine(this.name, "special_ship_primary_role", 1);
// the "1" in the function all above is the probability that the routine will be called. 1 means always.
}
}
this.$randomName = function(ship) {
var shipName = "";
// do stuff to come up with a name
//
return shipName;
}
Re: Randomshipnames.oxp v 1.4 released
Great stuff, thank you!phkb wrote: ↑Tue Jul 05, 2022 10:59 pmIt looks like, to add your own naming routines, based on the primaryRole of a ship, you would need to do this:Code: Select all
this.name = "MyWorldScriptName"; this.startUpComplete = function() { var rsn = worldScripts.randomshipnames; if (rsn) { rsn.$externalNameEngine(this.name, "special_ship_primary_role", 1); // the "1" in the function all above is the probability that the routine will be called. 1 means always. } } this.$randomName = function(ship) { var shipName = ""; // do stuff to come up with a name // return shipName; }
Looking forward to try.
I was young, I was naïve. Jonny Cuba made me do it!
Re: Randomshipnames hacking
So I had a go, but being oblivious, this was the only way I could see it work.
Code: Select all
this.name = "scrubNamer";
this.author = "phkb";
this.copyright = "";
this.description = "Add Scrub role and names to randomShipNames";
this.version = "1.0";
/*
This copy/paste code from phkb tries to piggyback on randomShipNames, to add scrub as role and provide pool of scrub names to choose from
*/
this.name = "scrubNamer";
this.startUpComplete = function() {
var rsn = worldScripts.randomshipnames;
if (rsn) {
rsn.$externalNameEngine(this.name, "scrub", 1);
// the "1" in the function all above is the probability that the routine will be called. 1 means always.
}
}
this.$randomName = function(ship) {
var shipName = "Clan Kirvesniemi: The Sissu", "Clan Jaaskelainen: The Lintu", "Clan Myllyla: The Iso Kaarme", "Clan Kokkonen: Vanha Rouva", "Clan Saarinen: The Lisko", "Clan Pohjola: Iso Kala", "Clan Saijonmaa: Area Peto";
// do stuff to come up with a name
//
return shipName;
}
Code: Select all
[script.javaScript.exception.noVariableName]: ***** JavaScript exception (scrubNamer.js.anon-script): SyntaxError: missing variable name
Is my error obvious?
I was young, I was naïve. Jonny Cuba made me do it!
- phkb
- 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
It’s what you’re trying to do with shipName. You’ve mixing data types.
Try this:
Try this:
Code: Select all
var shipName = [“name1”, “name2”, etc etc];
return shipName[Math.floor(Math.random() * shipName.length)];
Re: Randomshipnames.oxp v 1.4 released
Not doing it.phkb wrote: ↑Wed Jul 06, 2022 8:48 pmIt’s what you’re trying to do with shipName. You’ve mixing data types.
Try this:Code: Select all
var shipName = [“name1”, “name2”, etc etc]; return shipName[Math.floor(Math.random() * shipName.length)];
No added RandomShipName given to my Scrub in space. Just plain Scrub.
Code: Select all
/*
This copy/paste code from phkb tries to piggyback on randomShipNames, to add scrub as role and provide pool of scrub names to choose from
*/
this.name = "scrubNamer";
this.startUpComplete = function() {
var rsn = worldScripts.randomshipnames;
if (rsn) {
rsn.$externalNameEngine(this.name, "scrub", 1);
// the "1" in the function all above is the probability that the routine will be called. 1 means always.
}
}
this.$randomName = function(ship) {
var shipName = ["Clan Kirvesniemi: The Sissu", "Clan Jaaskelainen: The Lintu", "Clan Myllyla: The Iso Kaarme", "Clan Kokkonen: Vanha Rouva", "Clan Saarinen: The Lisko", "Clan Pohjola: Iso Kala", "Clan Saijonmaa: Area Peto"];
// do stuff to come up with a name
//
return shipName[Math.floor(Math.random() * shipName.length)];
}
There's no error message in the log. scrubNamer 1.0 is listed in the list of loaded scripts. Are there any other clues I should look for?
I was young, I was naïve. Jonny Cuba made me do it!