I'm working on a revised AI based on pirateAI.plist. In shipdata.plist I have the correct custom ai_type set, but whenever I come across these ships in space, their AI is pirateAI.plist, not my custom AI. Is that becuse they switch to other AIs like enteringPirateAI.plist, and then forget to return to the custom AI?
Second question is is there a way to refine attack modes? I'm thinking along the lines of:
One the first one, once AI is switched (with a switchAIto) - pirate AI contains a few of these, yeah Oolite forgets the Custom AI and the ship becomes a trader in terms of behaviour (or wherever the AI was switched to).
Not sure about the setdestination within target bit. However, a switch to missileAI would work (although the ship could be ECMed!). If therefore you did a set state to CRASH, then define crash by copying in missileAI, but taking out the ECM=, that should do it.
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.
Thanks for the tips guys. I ended up renaming the AI and clearing the cache, and it now does its thing. Can't get the tactics quite right yet, but it's getting there. Got rid of all the switchAIto stuff, so it remembers who it is.
I found some randomisation stuff in the hardMissileAI, which I'll try to incorporate so it doesn't get too predictable.
Couple of keywords I don't understand. Frustrated, and performTumble. Does anyone use these, and for what?
Constrictor didn't have it's own AI, it used pirateAI. Which is why it was so dissapointing to kill. Not sure about the Courier.
Not sure about "frustrated", but performtumble tells the ship just to wait where it is rolling left and right until a condition is met.
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.
Somewhere in the docs (we have got to reorganize that stuff; might have been a man page or AI comment) it says that FRUSTRATED happens when the AI has been trying to scoop something for more than 10 seconds.