Thargoid behaviour

For test results, bug reports, announcements of new builds etc.

Moderators: another_commander, winston, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Thargoid behaviour

Post by Commander McLane »

In 1.71 I still have seen Thargoid ships fighting with each other. Not only those from Thorgorn_Threat.oxp (that was an issue before, because of their slightly different roles), but even original Thargoid Warships, when I had no other Thargoid related OXP installed.

I seem to remember that the scanForNonThargoid was worked upon. But it seems still something is broken.

Can someone tell me what scanForThargoid and scanForNonThargoid are doing now?

And may I suggest that, instead of scanning for ships with role tharg* or not having role thargoid, perhaps it would be better to have them scanning for ships with or without scan_class CLASS_THARGOID?
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

scanForThargoid searches for primary role thargoid. scanForNonThargoid searches for ships whose scan class is not CLASS_THARGOID.

scanForThargoid can’t scan by class because its purpose is to find motherships for tharglets. If it did, tharglets would continue to fight as long as there is another tharglet in range. At least, it would be if the tharglet AI used it; it actually uses "scanForNearestShipHavingRole: thargoid-mothership". scanForThargoid has to stay around for backwards-compatibility with any OXPs using it (are there any?) but I’m not sure offhand why it isn’t also using the more specific thargoid-mothership role.

I’ve added code in the trunk to log what scanForNonThargoid is actually finding.
User avatar
Commander McLane
---- E L I T E ----
---- 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:

Post by Commander McLane »

Okay, I did some more testing with the new and very handy Target Inspector. :)

The situation was: five Thargoid Warships at the witchpoint and firing at each other, with me coming from the station, nothing else around.

As soon as I arrived I targetted one of the ships and consulted the Target Inspector, which revealed that its target was the witchpoint beacon, and it was in state ATTACK_SHIP. I inspected another one, same result. Nevertheless the witchpoint beacon was still there and unharmed, even under attack by the combined force of five Warships (who seemingly fired upon each other instead of on the beacon!). Before I could examine a third ship, one of the Warships rammed the beacon, thereby destroying it and itself (didn't know that Thargoids are up for Kamikaze!). I think this was more an accident than a planned action.

Now the rest of the bunch changed their primary target to me, but still continued to fire on each other. Only the one whom I was targetting and responding the fire, was starting to actually hit me.

My conclusion is this: Something is wrong not with the scanning mechanism, but with the aiming mechanism of the Thargoids.

They find their correct target, they go into ATTACK_SHIP-state and they attack it, but their shots seem to be fired into random directions instead of towards the target. Probably their fire gets more accurate, as soon as their enemy fires on them, but this is speculation. Although it would explain, why they never gained accuracy towards the beacon - it doesn't respond with fire.
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Post by Eric Walch »

As soon as I arrived I targeted one of the ships and consulted the Target Inspector, which revealed that its target was the witchpoint beacon, and it was in state ATTACK_SHIP.
Congratulations McLane, I think you found the crucial stone to squash this bug. It is probably there since the turrets were introduced.

Lets explain further. Lasers are aimed by the ship, but turrets are self thinking. They are programmed to shoot at hostile targets and are not directly targeted by the ship itself. When the mother tells them to shoot at the buoy they don't use the target offered by the mother and don't find a hostile target themselves and just start shooting randomly. In the code I never was able to find how "hostile target" was exactly defined, but one of the things to get hostile that it is aiming at the ship. And because a buoy can't aim, it will never be a hostile target. When the player targets the thargoid, the thargoid has a hostile target and will choose the player.
User avatar
Rimbaud
Dangerous
Dangerous
Posts: 86
Joined: Fri Dec 23, 2005 7:32 pm
Location: London
Contact:

Post by Rimbaud »

Is this easily fixable? What release do you think it will be in?
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6557
Joined: Wed Feb 28, 2007 7:54 am

Post by another_commander »

On a different note, and mostly referring to the first post by Commander McLane, the tharglet AI seems to be broken as well. The way it is now, when a mothership dies, its children start looking for non thargoid targets. If they don't immediately find any, then they target the nearest mothership and start attacking it. This is probably one of the reasons battles in witchspace seem so easy recently.

A fix has been applied for the next release. For those interested, you can change the thargletAI.plist, LOOK_FOR_TARGETS paragraph as follows:
From

Code: Select all

"LOOK_FOR_TARGETS" = {
        "THARGOID_DESTROYED" = ("setStateTo: CHECK_FOR_CONTROL"); 
		"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP"); 
		ENTER = (scanForNonThargoid, "pauseAI: 1.0");
		EXIT = ();
		UPDATE = ("scanForNearestShipHavingRole: thargoid-mothership", "pauseAI: 10.0");
	}; 
to

Code: Select all

"LOOK_FOR_TARGETS" = {
        "THARGOID_DESTROYED" = ("setStateTo: CHECK_FOR_CONTROL"); 
		"TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP"); 
		ENTER = (scanForNonThargoid, "pauseAI: 1.0");
		EXIT = ();
		UPDATE = (scanForNonThargoid, "pauseAI: 10.0");
	}; 
User avatar
matt634
Deadly
Deadly
Posts: 206
Joined: Tue Mar 21, 2006 6:32 pm
Location: Colorado, USA

Post by matt634 »

Code: Select all

"LOOK_FOR_TARGETS" = { 
        "THARGOID_DESTROYED" = ("setStateTo: CHECK_FOR_CONTROL"); 
      "TARGET_FOUND" = (setTargetToFoundTarget, "setStateTo: ATTACK_SHIP"); 
      ENTER = (scanForNonThargoid, "pauseAI: 1.0"); 
      EXIT = (); 
      UPDATE = ("scanForNearestShipHavingRole: thargoid-mothership", "pauseAI: 10.0"); 
   };

Nice find! This definitely explains the thargoid infighting I see in my reserve navy missions. It's always the tharglets going at motherships, never motherships against eachother. Great to see it fixed!!
Post Reply