To quote the docs (my emphasis in italics): "Deals with missiles by searching a missile heading for itself or one of its escorts. When found it uses ECM if available, flees if no ECM available. It marks the launcher as offender if targeting a police. Returns: "FLEEING" or nothing."
So, why, in all the AIs that I have studied, is this invariably followed by "setStateTo: FLEE"? This seems wrong, as it does not allow for the possibility of using ECM and NOT fleeing, and it is also redundant because if there is no ECM then the ship flees THEN sets state to "FLEE", IYSWIM.
Are the docs wrong, or is there a better explanation available. In the meantime I shall experiment with removing the "setStateTo: FLEE" in my code . . . .
fightOrFleeMissile
Moderators: winston, another_commander
Re: fightOrFleeMissile
What if the NPC ship ECMed, but the ECM-resistant hardhead missile didn't die?
Because from what I've seen, the NPC ships don't seem to consider they need to ECM again and/or flee like mad.
Because from what I've seen, the NPC ships don't seem to consider they need to ECM again and/or flee like mad.
Re: fightOrFleeMissile
Well for my purposes the ship would just have to consider itself unlucky - I've been there enough times and I have no sympathy whatever Then I return to my second point: ie. the ECM works, but the ship flees anyway.Switeck wrote:What if the NPC ship ECMed, but the ECM-resistant hardhead missile didn't die?
Because from what I've seen, the NPC ships don't seem to consider they need to ECM again and/or flee like mad.
I'm still experimenting to see if there is an observable effect in practice.
OXPs: Furball 1.8, Factions 1.12
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: fightOrFleeMissile
The FLEEING message is a bit of nonsense, there you are right. The only reason for this message I can think of, is that this was the original situation when hardheads were not introduced in Oolite.m4r35n357 wrote:......Returns: "FLEEING" or nothing."....
Are the docs wrong, or is there a better explanation available. In the meantime I shall experiment with removing the "setStateTo: FLEE" in my code . . . .
With hardheads it is better to always flee to be on the sure side and I don't know of any AI that effectively uses the FLEEING message. All existing AI jumps to a fleeing state no matter of the result. What is missing in the docu, is that the target is switched to the missile by this command. So, with ECM being effective, the AI will soon get a TARGET_LOST message, while with a hardhead, the code still will continue to flee.
The current traderInterceptAI even repeats its ECM action every 10 seconds if there is a hardhead pursuing him that refuses to pop.
Last edited by Eric Walch on Tue Jun 28, 2011 8:56 pm, edited 1 time in total.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: fightOrFleeMissile
Thanks Eric, that makes things easy for me - I'll just let the ship take it's chances Fleeing is not as good for the spectacle!Eric Walch wrote:The FLEEING message is a bit of nonsense, there you are right. The only thing is that this was the original situation when hardheads were not introduced in Oolite.
With hardheads it is better to always flee to be on the sure side. What is missing in the docu, is that the target is switched to the missile by this command. So, with ECM being effective, the AI will soon get a TARGET_LOST message, while with a hardhead, the code still will continue to flee.
OXPs: Furball 1.8, Factions 1.12
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: fightOrFleeMissile
What is also missing is that the ship always goes into a
So a more logical thing would be to only go to the flee state if you get the FLEEING message, because when you receive that message, you know your ship has no ECM. At least when you want to take your chances when ecm was available.
performFlee
mode by this command alone when there is no ecm available.So a more logical thing would be to only go to the flee state if you get the FLEEING message, because when you receive that message, you know your ship has no ECM. At least when you want to take your chances when ecm was available.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: fightOrFleeMissile
Hmm, food for thought, digesting . . . thanks.Eric Walch wrote:What is also missing is that the ship always goes into aperformFlee
mode by this command alone when there is no ecm available.
So a more logical thing would be to only go to the flee state if you get the FLEEING message, because when you receive that message, you know your ship has no ECM. At least when you want to take your chances when ecm was available.
OXPs: Furball 1.8, Factions 1.12
Re: fightOrFleeMissile
Right thanks, got it, I'll test this idea and compare it with my more brutal approach & see how they dance!Eric Walch wrote:What is also missing is that the ship always goes into aperformFlee
mode by this command alone when there is no ecm available.
So a more logical thing would be to only go to the flee state if you get the FLEEING message, because when you receive that message, you know your ship has no ECM. At least when you want to take your chances when ecm was available.
OXPs: Furball 1.8, Factions 1.12
Re: fightOrFleeMissile
Early indications (not statistically significant) are that removing the "flee always" improves general fightiness, and that allowing ill-equipped ships to flee does not spoil the fireworks . . . continuing to monitor.
This might be worth adding to the default scripts maybe?
This might be worth adding to the default scripts maybe?
OXPs: Furball 1.8, Factions 1.12