I know that Thargoid motherships and their Thargons are not in the same sense a group as a ship and is escorts, or a carrier and its defense ships. For instance there is no group attack structure in their AIs.
But I'm wondering how close their group relationship actually is, and whether it is perhaps underplayed in the AI handling.
I just came across the THARGOID_DESTROYED message in thargletAI. According to the Wiki it is sent to all Thargons by each dying Thargoid mothership. This would mean that whenever any mothership dies, all Thargoids currently in attack mode get thrown off and have to look for other possible mothers. I'm wondering whether this actually makes sense. Doesn't it make Thargons too prone to going inactive? Any time any Thargoid mothership dies, all Thargons break up their attacks and begin to tumble, and have to find a new target even if they don't go inactive. Does that sound reasonable? Not to me (at least if I have understood the Wiki correctly).
I would assume that the THARGOID_DESTROYED message is only sent to those Thargons which belong to the destroyed mother. Only they need to find another mothership. All other Thargons should be unaffected.
There is, however, the further complication that Thargons are quite independent from their "mothers" anyway. They are not required to stay close to their mother, they don't get targets or instructions by their mother, and they don't fly coordinated attacks with their mother or each other. So perhaps the way the THARGOID_DESTROYED message is handled is necessary in order to de-activate Thargons which have strolled too far from their mother? I'm sure there is some reason behind it, I just don't understand it very well.
Can I get some more in-depth explanation? And—seen from a more expert view—is there room for improvement?
Thargoids and Thargons
Moderators: winston, another_commander, Getafix
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Thargoids and Thargons
I don't think there are strong reasons behind this all. And indeed, it sucks. All this stuff was written for Oolite 1.65 and older where we didn't have groups. Probably it made sense back than. With the explicit groups, it would have been more logic to only send the message to group members. Now it is send to all ships containing the role 'tharglet' an in range of 655360000 meters (= 25600x25600). That range is probably wrong also and should be 25600 or the range of the mother (usually 6000). Custom tharglets without a 'tharglet' role are not notified at all. But that is handled now because there is always a check in update.Commander McLane wrote:....I just came across the THARGOID_DESTROYED message in thargletAI. According to the Wiki it is sent to all Thargons by each dying Thargoid mothership. This would mean that whenever any mothership dies, all Thargoids currently in attack mode get thrown off and have to look for other possible mothers. I'm wondering whether this actually makes sense. ......
I would assume that the THARGOID_DESTROYED message is only sent to those Thargons which belong to the destroyed mother. Only they need to find another mothership. All other Thargons should be unaffected.....
So perhaps the way the THARGOID_DESTROYED message is handled is necessary in order to de-activate Thargons which have strolled too far from their mother? I'm sure there is some reason behind it, I just don't understand it very well.
Can I get some more in-depth explanation? And—seen from a more expert view—is there room for improvement?
Somehow I think that this code has no use anymore. But having a feature lock, I don't want to touch it and risk the introduction of new bugs.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
- JensAyton
- Grand Admiral Emeritus
- Posts: 6657
- Joined: Sat Apr 02, 2005 2:43 pm
- Location: Sweden
- Contact:
Re: Thargoids and Thargons
Yes, this was a bug introduced with the switch to the predicate-based search system. (All the other cases seem to be right.) I’ve fixed this in r4537, but I agree that the bigger picture is a post-MNSR issue. Feature request #5340Eric Walch wrote:Now it is send to all ships containing the role 'tharglet' an in range of 655360000 meters (= 25600x25600). That range is probably wrong also and should be 25600 or the range of the mother (usually 6000).
E-mail: [email protected]
Re: Thargoids and Thargons
I ripped out the THARGOID_DESTROYED message in thargletAI in my mod. Doesn't cause any apparent harm.
The "ATTACK_SHIP" section is already doing a thargonCheckMother every 5 seconds anyway, so Thargons won't attack very long without a nearby Thargoid mothership.
"INCOMING_MISSILE" = ("messageMother: INCOMING_MISSILE");
...might as well be in the "ATTACK_SHIP" section as well, since Thargoid warships could see missiles being fired because they're probably in range anyway. Doesn't seem any reason to put that in the other sections, since the Thargon in question is probably not associated with a Thargoid mothership at that point.
The "ATTACK_SHIP" section is already doing a thargonCheckMother every 5 seconds anyway, so Thargons won't attack very long without a nearby Thargoid mothership.
"INCOMING_MISSILE" = ("messageMother: INCOMING_MISSILE");
...might as well be in the "ATTACK_SHIP" section as well, since Thargoid warships could see missiles being fired because they're probably in range anyway. Doesn't seem any reason to put that in the other sections, since the Thargon in question is probably not associated with a Thargoid mothership at that point.
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: Thargoids and Thargons
I don't know. I have never fired a missile against a Thargon. Okay, the mothership could fire its ECM, but other than that?Switeck wrote:"INCOMING_MISSILE" = ("messageMother: INCOMING_MISSILE");
...might as well be in the "ATTACK_SHIP" section as well, since Thargoid warships could see missiles being fired because they're probably in range anyway.
Re: Thargoids and Thargons
NPC ships fire their missiles at Thargons in my tests.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: Thargoids and Thargons
But I am sure that you never tested if the code works. As far as I can see is the line:Switeck wrote:NPC ships fire their missiles at Thargons in my tests.
Code: Select all
"INCOMING_MISSILE" = ("messageMother: INCOMING_MISSILE");
Now, when the mother receives the message it does a
fleeOrFightMissile
. That specific command was intended for traders. It starts with a scan for missiles, heading for herself or one of its escorts. But as targlets are not added as escorts, the mother won't find such a missile and do nothing.Better change that command for the mother into
fireECM
as that is the only response you need for thargoids.UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: Thargoids and Thargons
You're correct, I didn't do a proper test of ECM by Thargoids when missiles fired at Thargons. I have seen the situation occur, but there was *SO* much going on something was always firing ECM about every 15 seconds anyway.