escorting problems again
Posted: Tue Mar 20, 2007 8:13 am
I think handling escorts is an issue that has popped up here frequently. Now I have my share with it and am asking for help.
Here's my problem: In Anarchies.oxp there are "Hacker Outposts", gangs of hackers living on modified asteroids (and Killer Wolf made an awesome model for that!). Now the idea is that the outposts should be located in an asteroid field (easy to do), but some of the surrounding asteroids are modified as well. They are "Sentinel Asteroids", asteroids with two ballturrets mounted on them which will be a nasty surprise for anybody who should attack the outpost.
To make them by putting two ballturrets (borrowed from gwxstations.oxp) on an ordinary asteroid (borrowed from the game) was easy. But to make them work gives me a headache!
I'll explain:
- If I set the sentinel asteroids up as escorts they appear without fault, but in this typical escort-like wing-formation behind the outpost, which means most of them are way too far away from the outpost to be of any use as a defense (the ballturrets only fire when their target is in a range of approx. 5000 m).
- Also everything set up as escort by default automaticly gets escortAI (that's an issue already discussed on the boards, IIRC). And worse: they immediatly set their AI to route1patrolAI and enter the FLY_TO_WITCHPOINT-state, which means they don't recognize the outpost as their mother.
- However they of course don't get very far, as their maximum_speed is 0. And they somehow seem to remember that they were escorts (and I have no idea whatsoever why they remember that, because there is no exitAI-method used in route1patrolAI), because when I attack the Outpost or one of them, they all set to interceptAI and start to attack me. That at least is some good news.
- But that works only if they are set up as escorts, which is the bad news.
- If I add or spawn them in any other way I can't get them to behave like escorts. I gave them an AI that first lets them offer their services to the outpost. But their suggestEscort-calls to the outpost (the technical stuff: scanForNearestShipWithRole: hacker_outpost, TARGET_FOUND = suggestEscort, ESCORTING = performEscort) remain unanswered (they continually send out the suggestEscort-message, but never get the ESCORTING-message), so they never actually start escorting. That means they don't respond at all to anything that happens to the outpost.
- I even made them start escorting without an offer before (scanForNearestShipWithRole: hacker_outpost, setTargetToFoundTarget, performEscort). No effect, they don't do.
- I thought, perhaps it may not be possible to escort a station, so I modified the outpost, giving it the role "carrier" instead of "station". No effect.
- I also tried to have the escort asteroids respond by other ways, like ACCEPT_DISTRESS_CALL or OFFENCE_COMMITTED. Nothing so far, they remain passive and peaceful.
- To make things worse, they don't even recognize themselves as a group. So if I attack any of them directly, that one sets its state to ATTACK_SHIP and fires at me. But all the others (and of course the outpost) stay completely unimpressed.
So for now I don't really know what to do and where to go. Specific questions I have are:
- Are there perhaps some more methods for mother-escort-communication that are not documented in the wiki? Something like callForEscort or requestEscort on the mother's side? Or at least an agreeToSuggestEscort? Because it seems there is only suggestEscort on the escort's side, and we can't script anything in the mother's AI to make her react to that suggestion.
- Can I do anything to make a couple of entities that have been spawned with "addShipsWithinRadius: sentinel_asteroid 8 wpm X Y Z 4000" into a group? Something like "scanForShipWithRole: sentinel_asteroid, TARGET_FOUND = setUpGroup"? So that they would respond to groupAttackTarget? For now they behave like single entities without any group-feeling.
Any help or hints will be very much appreciated!!!
Here's my problem: In Anarchies.oxp there are "Hacker Outposts", gangs of hackers living on modified asteroids (and Killer Wolf made an awesome model for that!). Now the idea is that the outposts should be located in an asteroid field (easy to do), but some of the surrounding asteroids are modified as well. They are "Sentinel Asteroids", asteroids with two ballturrets mounted on them which will be a nasty surprise for anybody who should attack the outpost.
To make them by putting two ballturrets (borrowed from gwxstations.oxp) on an ordinary asteroid (borrowed from the game) was easy. But to make them work gives me a headache!
I'll explain:
- If I set the sentinel asteroids up as escorts they appear without fault, but in this typical escort-like wing-formation behind the outpost, which means most of them are way too far away from the outpost to be of any use as a defense (the ballturrets only fire when their target is in a range of approx. 5000 m).
- Also everything set up as escort by default automaticly gets escortAI (that's an issue already discussed on the boards, IIRC). And worse: they immediatly set their AI to route1patrolAI and enter the FLY_TO_WITCHPOINT-state, which means they don't recognize the outpost as their mother.
- However they of course don't get very far, as their maximum_speed is 0. And they somehow seem to remember that they were escorts (and I have no idea whatsoever why they remember that, because there is no exitAI-method used in route1patrolAI), because when I attack the Outpost or one of them, they all set to interceptAI and start to attack me. That at least is some good news.
- But that works only if they are set up as escorts, which is the bad news.
- If I add or spawn them in any other way I can't get them to behave like escorts. I gave them an AI that first lets them offer their services to the outpost. But their suggestEscort-calls to the outpost (the technical stuff: scanForNearestShipWithRole: hacker_outpost, TARGET_FOUND = suggestEscort, ESCORTING = performEscort) remain unanswered (they continually send out the suggestEscort-message, but never get the ESCORTING-message), so they never actually start escorting. That means they don't respond at all to anything that happens to the outpost.
- I even made them start escorting without an offer before (scanForNearestShipWithRole: hacker_outpost, setTargetToFoundTarget, performEscort). No effect, they don't do.
- I thought, perhaps it may not be possible to escort a station, so I modified the outpost, giving it the role "carrier" instead of "station". No effect.
- I also tried to have the escort asteroids respond by other ways, like ACCEPT_DISTRESS_CALL or OFFENCE_COMMITTED. Nothing so far, they remain passive and peaceful.
- To make things worse, they don't even recognize themselves as a group. So if I attack any of them directly, that one sets its state to ATTACK_SHIP and fires at me. But all the others (and of course the outpost) stay completely unimpressed.
So for now I don't really know what to do and where to go. Specific questions I have are:
- Are there perhaps some more methods for mother-escort-communication that are not documented in the wiki? Something like callForEscort or requestEscort on the mother's side? Or at least an agreeToSuggestEscort? Because it seems there is only suggestEscort on the escort's side, and we can't script anything in the mother's AI to make her react to that suggestion.
- Can I do anything to make a couple of entities that have been spawned with "addShipsWithinRadius: sentinel_asteroid 8 wpm X Y Z 4000" into a group? Something like "scanForShipWithRole: sentinel_asteroid, TARGET_FOUND = setUpGroup"? So that they would respond to groupAttackTarget? For now they behave like single entities without any group-feeling.
Any help or hints will be very much appreciated!!!