Page 2 of 13
Posted: Thu Oct 08, 2009 1:39 pm
by Cmdr Wyvern
A tip to the wise, Learner.
Since we're talking an AI representation of your ingame commander - a "lost twin", as it were - then here's some things to know about AI pilots and q-bombs.
1) The AIs don't actually load q-mines in their stores.
2) If an AI is set to load a certain missile type, then it's stores will be loaded completely with missiles of the set type.
Now here's where things get interesting.
If an AI is carrying an e-bomb, it will get deployed as a q-bomb.
An AI can be made to deploy a q-bomb as a death-action.
In either case, the AI ship can only do it once. Also, AIs tend to be too dumb to run from their own q-bomb blast.
Weird, huh? That's the way Oolite's AI engine runs.
Posted: Thu Oct 08, 2009 3:22 pm
by Thargoid
It depends a little on how far people want to run with this, as pairing up an AI and a JS script can open up a whole world of opportunities (and one or two of them might even be good ones). But it also quickly can become rather complex and convoluted when AI's and scripts start talking with one another.
But with a little practice it can be done, and the results can be quite impressive.
Posted: Thu Oct 08, 2009 4:01 pm
by Eric Walch
Cmdr Wyvern wrote:If an AI is carrying an e-bomb, it will get deployed as a q-bomb.
An AI can be made to deploy a q-bomb as a death-action.
In either case, the AI ship can only do it once. Also, AIs tend to be too dumb to run from their own q-bomb blast.
Weird, huh? That's the way Oolite's AI engine runs.
Ships are actually well prepared to not be killed in their own q-bomb blast. The q-bomb for NPC ships has the name energy-bomb for some reason that is unknown to me. When you look in shipdata, this is also one of the roles of the q-bomb. AI can't drop this mine by direct command, but it is part of the performFlee action. That command checks if it has a bomb on board, if it has injectors and if it has fuel left. Only when all three match it has a small chance to drop the bomb and fly away on injectors. And he certainly will escape the blast.
What you are referring to are ships that turn themselves into bombs by using the code of the q-bomb itself. That is just buggy AI as the mechanism to drop true q-bombs by npc was already added with 1.65.
Try random hits. There the boms are correctly defined. Or try pursuing a supercobra. That one can even deploy 2 q-bombs. And to frighten the player is also carries 4 decoys so the player never knows what to do. I normally break of when I see one, keep an eye on it to see how it explodes and when it seemed to be a decoy I again go for the supercobra. (For this behaviour you need at least version 1.3 of this oxp)
Posted: Thu Oct 08, 2009 5:03 pm
by Cmdr Wyvern
Eric Walch wrote:Cmdr Wyvern wrote:If an AI is carrying an e-bomb, it will get deployed as a q-bomb.
An AI can be made to deploy a q-bomb as a death-action.
In either case, the AI ship can only do it once. Also, AIs tend to be too dumb to run from their own q-bomb blast.
Weird, huh? That's the way Oolite's AI engine runs.
Ships are actually well prepared to not be killed in their own q-bomb blast. The q-bomb for NPC ships has the name energy-bomb for some reason that is unknown to me. When you look in shipdata, this is also one of the roles of the q-bomb. AI can't drop this mine by direct command, but it is part of the performFlee action. That command checks if it has a bomb on board, if it has injectors and if it has fuel left. Only when all three match it has a small chance to drop the bomb and fly away on injectors. And he certainly will escape the blast.
Ok, I've seen that happen, but so far successfully only once. Other pirates have dropped the lethal blue, but wound up blowing away their friends and/or themselves with it.
What you are referring to are ships that turn themselves into bombs by using the code of the q-bomb itself. That is just buggy AI as the mechanism to drop true q-bombs by npc was already added with 1.65.
Try random hits. There the boms are correctly defined. Or try pursuing a supercobra. That one can even deploy 2 q-bombs. And to frighten the player is also carries 4 decoys so the player never knows what to do. I normally break of when I see one, keep an eye on it to see how it explodes and when it seemed to be a decoy I again go for the supercobra. (For this behaviour you need at least version 1.3 of this oxp)
It was RH and Renegades that I was referring to in this instance. The targets there tend to leave behind a ticking terror as a parting gift when killed. Never seen them launch one any other time, so I was guessing the bomb was deployed as a scripted death-action.
Posted: Thu Oct 08, 2009 11:18 pm
by LittleBear
RH victims can also drop a q-mine when they flee as well as when they die. Its a random chance though whether a paricular victim is carrying a mine and even if they have a mine, they won't drop it whilst alive unless the ship also has injectors fitted (also a random chance) and fuel to use them. The native code takes care of this as even if a ship has a mine, set with has_energy_bomb in shipdata, it won't use it unless in performFlee. If they know they are about to die and have no pod, they may try to take you with them even if they don't have injectors.
(Done by a random chance of poding, droping a mine or just plain dying when death actions are run). They also always flee if the player (or another NPC) drops a mine. This may not do them any good though if they happen to be out of fuel or their ship doesn't have injectors. They may also try to jump out if a mine is deployed near them (Done with AI and random reactions on spotting a mine with a scanForShipWithAnyRole). Renegades ain't as smart as I wrote that one a long time ago and they only can drop a mine when they die.
Posted: Thu Oct 08, 2009 11:23 pm
by Commander Learner
What about the Flying Dutchman? One of the 'bad luck' in the script is to drop Q-Bomb, and it's very frustrating when you're tailing him and suddenly you just see him explode and you die.
Posted: Fri Oct 09, 2009 9:23 am
by Commander McLane
Commander Learner wrote:What about the Flying Dutchman? One of the 'bad luck' in the script is to drop Q-Bomb, and it's very frustrating when you're tailing him and suddenly you just see him explode and you die.
You don't see him explode. He stays unharmed by anything. You can't kill a ghost, after all.
And for yourself: If you see him dropping a q-bomb: Turn around and RUN!
Posted: Fri Oct 09, 2009 1:36 pm
by Cmdr Wyvern
Commander McLane wrote:
And for yourself: If you see him dropping a q-bomb: Turn around and RUN!
That's damn good advice to follow if you see anything dropping a q-bomb.
Worry about the change of underwear later, when the azure death is far behind you.
Posted: Fri Oct 09, 2009 1:42 pm
by Commander McLane
Cmdr Wyvern wrote:Commander McLane wrote:
And for yourself: If you see him dropping a q-bomb: Turn around and RUN!
That's damn good advice to follow if you see anything dropping a q-bomb.
Worry about the change of underwear later, when the azure death is far behind you.
Posted: Fri Oct 09, 2009 1:53 pm
by Commander McLane
Added two items to the list in the first post:
* the cargo you are most likely to carry (if any),
and
h. victory exclamations (when you killed your opponent),
More characters are welcome!
Posted: Fri Oct 09, 2009 2:34 pm
by DaddyHoggy
Did you get my PM?
As you know (if you got said PM) neither of your new requirements apply do me!
Posted: Fri Oct 09, 2009 2:39 pm
by Commander McLane
Got it. (Downloading right now. A
Generation Ship got a little in the way—no wonder, considering its size.
)
Posted: Mon Oct 12, 2009 10:39 am
by Commander McLane
Quick question: Quite some people mentioned EQ_MILITARY_MISSILE as the missiles of choice for their characters. Where do I get them? Which OXP are they from?
Posted: Mon Oct 12, 2009 10:42 am
by Wolfwood
Commander McLane wrote:Quick question: Quite some people mentioned EQ_MILITARY_MISSILE as the missiles of choice for their characters. Where do I get them? Which OXP are they from?
Same as Navy, I presume.
..
Posted: Mon Oct 12, 2009 10:43 am
by Lestradae
It seems to stem from the milmissile oxp, which no longer seems to be available on the wiki - or did I get one from Oosat?