Your metal fragment idea may work. I need to have a 'core-entity' ship anyhow. to trigger a delayed detonation.
This would only be taking it one layer further.
kind of like the timebomb AI...
I could have a string of bombs spawned and detonating on cue.
Arexack - do you mean "suggestEscort"? Will the mother know to accept escort requests if it doesn't have escort details defined for it in the shipdata? (The Wiki entry for setUpEscorts seems to suggest it requires name and number details from shipdata, so presumably it will do nothing on its own.)
And Giles, if you're around - the Q-mine thing? Or is it impossible?
On the Q-mine thing, you may have tried this but would an ejectitem instruction work? Thinking somthing like this:-
Put an entry in shipdata for "specialbomb".
likeship it to a cargo canister, but give it the model of the q-bomb. Then it will look like one. Also give it the timebombAI and it (should) blow up like a q-bomb. Define the entry as cargo (there is a way to do this as Griff made his battlebots scoopable like cargo when you put them to sleep). Have a look under the "help with an AI script" thread.
Now give your mothership 1 tone of cargo space and likley cargo of 1 tone. Specify under cargo carried, that the cargo carried is the "specialbomb". That (should) make it eject a bomb when you want it to.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.
Or maybe not.
suggestEscort is for the escorts I think.
I'll have to check the wiki....
hmm...
yes.
RequestEscort doesn't exist. How did I come up with it?
You could aslo try deployEscort.
This causes escorts to deploy in formation, perhaps around the ship using the method.
Escortingmethods are pretty under-explained.
edit: On your non-EQ_MINE/MISSILE type solution: maybe also the solution to my plasmaball exploding in launchtube problems.
Hmm - thinking about it, I'm not sure whether defining a new shipdata item to be just like the Q-mine and then assigning it to the mother as cargo will make any difference.
This is under "Methods" on the Wiki:
ejectItem: <shipdata.plist key>
// Creates a ship or other entity from shipdata.plist and ejects from
// the ship's aft hatch
If it's creating the entity from scratch, it wouldn't seem to matter whether or not the ship already has it as cargo. And I'm pretty sure I've already tried "ejectItem: qbomb" in the AI.
I'll try it again, and make absolutely sure of the aft eject position!
I'm assuming that ejectItem is a valid AI command - only ejectCargo is listed on the "howto AI" page. This AI stuff could do with some better explanation.
Most of the new stuff is guesswork.
The earlier methods are taken from Giles' notes.
"It's not a priority"
You are right about the ejectItem, it generates from scratch so cargo shouldn't matter.
But the EQ_*_MINE may be forbidden for NPC'ships to own.
Anyway. Just ejecting a Q-bomb does not work. It needs to be launched to exist or something. dunno.
So creating a simple object with weaponenergy, specialrole, Qbomb.dat and timebombAI and ejecting that might work.
Yep - it wasn't the eject position. It just won't eject a Q-mine.
Gonna do as you suggest and create a Q-bomb substitute. "I can't believe it's not a Q-bomb!"
Also, I'm kinda generally fed up with the AIs. I've set the mother back to scanning for "player" in whatever AI state it's in - and from testing, sometimes it finds you straight away, sometimes after a few seconds, and sometimes not at all! Gah!
OK, the substitute Q-bomb: if I like_ship it to the barrel, won't it then show up randomly due to the roles "cargopod" and "1t-cargopod", or possibly "CARGO_RANDOM"?
Presumably I can't give it the roles of the Q-mine, as that'll make it inherit the Q-mine's unwillingness to appear, so should I give it no roles at all? And should it be "CARGO_SOMETHING"?
*EDIT* Sorry, getting muddled. We've established it doesn't have to be cargo, so I'll just give it a random role (which I imagine will never be used) and give it a try...
Nope, it won't eject. My only thought is that maybe ejectItem only works in a script or something. Anyone know?
If I have to use ejectCargo (and thus have to make my substitute Q-mine cargo-y), how can I avoid affecting regular cargo in the game?
Here's what I have in shipdata at the moment, to be triggered by "ejectItem: qbomb-taranis" in the AI (exactly the same as the standard qbomb, except for the roles):
only the ships with specialcargo: qmines will be affected.
don't use role: cargopod
although exiting to have a trader disgorge a qmine inbetween his cargo,
Wily fellow! ;
It would affect the basic game quite a bit.
I'll put it in cargo_wrex in the next installment: cargopod with timebombAI.
Already had a boobytrap on the shelf... but this would be much more fun even!
Pretty sure your shipdata entry is fine. I did a similar thing with "The Nova Device" weapon in assassins, but I had the device spawned by the death_actions of the ship (which also set the sun to go nova). My "Bomb 21" just has become:explosion in its AI, so it gives the illusion that the detonation of the "Nova Device" has caused the local sun to go nova!
EDIT:-
To make my Mafia Drugs ships carry approprate cargo, I used:-
Hopefully, if you put your q-bomb's name and role as the cargo carried then eject cargo might work.
I think there must be some way of making the ship eject items as traders often eject cargo when under attack. Maybe have a look at one of the traderAIs?
The problem is getting it into the Ooniverse. If you can't do it with ejectitem or eject cargo in AI then you might be stuck.
OXPS : The Assassins Guild, Asteroid Storm, The Bank of the Black Monks, Random Hits, The Galactic Almanac, Renegade Pirates can be downloaded from the Elite Wiki here.