I don't know, would you really want to be a "Demoralizer of Little Girls" ?
I thought I was being a "Teaser of Thargoids". I hope he's got a sense of humour.
(My own favourite was "Solace of Scaredy Cats" which I thought could be appropriate for a "personal base".)
He has, although next time I might take a leaf out of aforesaid Iain M Banks book(s) and give them really daft names to go with it
I don't think the ship's name is stored, only it's MAC number. I might have to change that in the next version of the script, just for record-keeping purposes. Although of course that won't help existing Vortex pilots.
Thargoid, I've grabbed your script for naming the NPC Vortexes, and started working it into a name-gen for the Anacondas. Apart from changing the name - in a flash of creativity I thought "anaconda_names.js" - is there anything I need to do to avoid confusing my poor computer? (I ask this from the perspective of a person who can't tell the difference between a local variable and global variable and so on.)
Thargoid, I've grabbed your script for naming the NPC Vortexes, and started working it into a name-gen for the Anacondas. Apart from changing the name - in a flash of creativity I thought "anaconda_names.js" - is there anything I need to do to avoid confusing my poor computer? (I ask this from the perspective of a person who can't tell the difference between a local variable and global variable and so on.)
As long as the this.name line (the first line) of the script is changed as well as the filename (for simplicity have them both as anaconda_names.js for example) then things should be fine.
It works based on the role by which the shipis spawned, so in the case of the Vortex it is trader/sunskim trader (the first pair of cases, lines 12-23), pirate (lines 24-34), hunter (lines 35-46), police (lines 47-57) and the specific "NPC_vortex" (lines 58-62). So these will probably need to be tweaked to match the roles list of the Anaconda (for example I don't think they are spawned as hunters or police).
Oh and of course change the names involved to something more appropriate, and swap the Vortex references to Anaconda. All of the variables are just inside that script, but of course you need to assign the script to the Anaconda in the shipdata.plist entry for the ship.
Whatever you do, I hope you two release it as a naming OXP - it would be beautiful...
It can't be an OXP proper - just drop in and it works - because folks would need to edit their shipdata files to attach the script to the ships. Which brings me to my first problem, I've done that to attach Griffed-up fancy explosions to all my ships. But as I expected, this:-
results in ships with fancy names, but un-fancy explosions. No doubt in the opposite order, it would cause un-named ships. I'm not even bothering to check that - I have no doubt.
Another query: how do I test which sort of ship is calling this script? I don't won't a Neolite Anaconda being named "Ramon's Delight" or a Ramon Anaconda being called "Simon's Delight".
I'm going to try to build a ships names OXP, based on Vortex's script. I'm about to download the Vortex OXP. Who knows, random ship name generation might become a core part of Oolite 2.0.
Whatever you do, I hope you two release it as a naming OXP - it would be beautiful...
It can't be an OXP proper - just drop in and it works - because folks would need to edit their shipdata files to attach the script to the ships. Which brings me to my first problem, I've done that to attach Griffed-up fancy explosions to all my ships. But as I expected, this:-
results in ships with fancy names, but un-fancy explosions. No doubt in the opposite order, it would cause un-named ships. I'm not even bothering to check that - I have no doubt.
Another query: how do I test which sort of ship is calling this script? I don't won't a Neolite Anaconda being named "Ramon's Delight" or a Ramon Anaconda being called "Simon's Delight".
It can, in two separate ways.
Either use a shipdata-override.plist file to add the script line to the other OXP, or have the script add the name automagically when the player target locks onto it (before then how would the player know whether the ship has a name or not? )
Whatever you do, I hope you two release it as a naming OXP - it would be beautiful...
It can't be an OXP proper - just drop in and it works - because folks would need to edit their shipdata files to attach the script to the ships.
Either use a shipdata-override.plist file to add the script line to the other OXP, or have the script add the name automagically when the player target locks onto it (before then how would the player know whether the ship has a name or not? )
For me the latter option would work nicely.
For you it would. You know where to put the semi-colons. I'll go with the first option. Anyway, so that's sorted - yes, we can add a script to ships without editing the original shipdata. Cool.
Now, what about my question: how to attach two scripts to a ship?
Now, what about my question: how to attach two scripts to a ship?
No way to add two scripts - only monkeypatches are possible to change it on the fly, but it is dangerous and will add unnecessary incompatabilities/clashes.
A better way is to use a copy with changed names (entity, AI and script) and will avoid trouble.