View Issue Details

IDProjectCategoryLast Update
0024573AI War 2Bug - GameplayMar 19, 2021 2:24 pm
ReporterArides Assigned ToChris_McElligottPark  
Severitymajor 
Status resolvedResolutionfixed 
Product VersionBeta 2.758 Threat Explanation 
Fixed in VersionBeta 2.760 Xenophiles And Overlords 
Summary0024573: Threat against other factions targetting human homeworld
DescriptionAfter the threat explanation, it is now obvious that AI spawned a strong hunter against "Other factions", which is now targetting humans. In the save file, it is visible that the cluster attacked by hunter contains no other factions but two humand empires, yet the attacking hunter force is 300+ str, while "Threat against humans" is only 40.

Is it possible the hunter is attacking the (long gone) human resistance fighters or something silly like that?
TagsNo tags attached.

Activities

Arides

Mar 17, 2021 3:11 pm

reporter  

threat_wrong_again.jpg (282,444 bytes)

Arides

Mar 17, 2021 3:39 pm

reporter   ~0060814

About an hour later, on 70 AIP, a hunter consisting of 800 strength (mostly against "other factions") streamed at our defensive position and ... we quit the game. Yes, we're playing difficulty 10, with 3 AIs, but still. No point in playing a game where hunter kills you no matter what you do.

BadgerBadger

Mar 17, 2021 8:17 pm

manager   ~0060815

What other factions do you have in the game?

BadgerBadger

Mar 18, 2021 2:35 am

manager   ~0060817

Last edited: Mar 18, 2021 2:43 am

There are a bunch of anti-dyson ships turning up to go after the player as hunter. I believe these ships were originally threat that turned to hunter, since I don't think the hunter gets ships directly against the dyson. The hunter isn't honouring the request to be focused on the dyson, and so these units are going after the player. If the hunter gets ships directly donated to go after a minor faction it works, but the Hunter doesn't expect threat ships that are donated to it should be against a minor faction. There's a check in Helper_ConsiderJoiningTheHunterFleetFromThreatfleet() intended to rule out this case.

I think you either need to track down how anti-minor-faction threat ships (in this case against the dyson) are getting to the hunter and prevent that, or modify the hunter to handle such things correctly.

 Option A: In Helper_ConsiderJoiningTheHunterFleetFromThreatfleet the code has a check at the top that's intended to say "If you are against a non-human faction, you can't join the Hunter". Perhaps this check no longer works (are we looking at the wrong data structures or something? I spent a few minutes and didn't see anything obvious)? Or perhaps there's some other code path that's getting ships to the hunter, and you can find this code path and stop it.
 
Option B: Lets just make sure the hunter does the right thing when an anti-minor faction ship is donated to it. When a ship is donated to the hunter fleet we need to assign a FireteamSpecificationOrNull to the newly-donated ship based on the BehaviourRelatedFactionIndex and I think this should allow the hunter to manage things properly. Note that if you do this, you need to update the check in Helper_ConsiderJoiningTheHunterFleetFromThreatfleet to allow threat against non-player factions to join the hunter.

I lean toward option B.

BadgerBadger

Mar 18, 2021 2:55 am

manager   ~0060819

Oh, and on top of this the Dyson has ai_threat_against_this_faction_goes_back_to_guarding="true"
so I have no idea how we even got threat against this faction. Once the faction is dealt with they should just go back to being guards.

Chris_McElligottPark

Mar 18, 2021 11:08 am

administrator   ~0060820

I have really not been following the FireteamSpecificationOrNull very much, and it seems like we could wind up with an excess of fireteams that are going after the wrong faction, but I'll take a look at it.

I think there is also an Option C, which will at the very least work as a stopgap: add a flag for certain factions, and if there is Hunter chasing them but not within 1 hop of their planet, then kill those hunter units. Normally I'd prefer to just fix the root cause, but it seems like it could be coming from a variety of other smaller areas, and sometimes having that backup catcher solution is nice.

Chris_McElligottPark

Mar 18, 2021 7:59 pm

administrator   ~0060828

Okay, here's what I've got for now:

* New safety valve, of sorts: when ships are specifically hunting some faction that is not you, and they are nowhere near that other faction (not on their planet or an adjacent planet), they get disbanded.
** In the threat details window, it now shows you how many total units, and what total strength, has been disbanded (on clients in MP, it should be showing you the number just sent from the host).
** It also shows you a breakdown by faction or subfaction (again coordinated by the host in MP).
** This information in the threat display is for your entire campaign, not just the current session, so it gets saved into your savegame. If something is going wrong and this is too-aggressively killing off some units it should not, then this screen would let us know. One of the most notable things would be if other factions that are not AI-affiliated start getting caught in this particular garbage disposal.
** As it is, in some of the test savegames that we've seen, this winds up chopping up a fair bit of Hunter (that was the main goal), some Praetorian Guard (unexpected, but basically these were spawned to drive off some invader and I guess did not manage to do so), some Warden (same deal), and some sentinels themselves. Huh.
** Originally, our implementation of this was based solely on being near planets under the influence of that faction. But that actually does a disservice to subfactions like PG, who might validly have a force way away from the target faction's territory -- defending from said faction. So now it no only checks for faction influence, but also checks for at least one ship of that faction existing on the current or adjacent planets for these ships.
*** After making this change, in some of the test saves we started seeing only 50 or so strength get disbanded, rather than 400ish. This did mean that the hunter can camp out on the dyson sphere planet like crazy, for example... but if they get bored and wander off to go murder you for some reason, then they'll get hit with the disbanding rather rapidly.

Chris_McElligottPark

Mar 18, 2021 9:43 pm

administrator   ~0060830

Scratch that, better version:

* Some factions can request that threat against them go back to guarding (like zombies, dyson sphere, etc). This request was not being always honored, especially the Dyson, which could to vast quantities of threat against the Dyson that would eventually go after you.
** Thanks to Badger for finding and fixing.

* New safety valve, of sorts: when ships are specifically hunting some faction that is not you, and they aren't in a fireteam or don't have proper rules for how to hunt that faction as a fireteam, they get disbanded.
** In the threat details window, it now shows you how many total units, and what total strength, has been disbanded (on clients in MP, it should be showing you the number just sent from the host).
** It also shows you a breakdown by faction or subfaction (again coordinated by the host in MP).
** This information in the threat display is for your entire campaign, not just the current session, so it gets saved into your savegame. If something is going wrong and this is too-aggressively killing off some units it should not, then this screen would let us know. One of the most notable things would be if other factions that are not AI-affiliated start getting caught in this particular garbage disposal.
** This is an iterative version of the solution to handling existing saves with massive amounts of stuff that needs to die, while at the same time hopefully not having units really hit this status too much.
** Thanks to Arides, ArnaudB, and others for reporting. And big thanks to Badger for advice on how to best make this work.

Chris_McElligottPark

Mar 19, 2021 2:24 pm

administrator   ~0060833

Okay, toss out all of the above. This is being replaced with this:

* Rather than the previous logic trying to get rid of threat against other factions, which was either too aggressive or not aggressive enough, we now have a hunter_targeting_this_faction_dies_immediately="true" that has been added to the dyson sphere factions.
** Essentially, if hunter are after them, it's time for those hunter units to die. Those were the ones coming after your homeworld erroneously. If it's other forms of threat against that faction, or threat in general against other factions, those seem okay.

* Similarly, for the warden and praetorian guard, if they are targeting a faction that is nowhere near them, then they now also get killed off.
** This solves some issues where they were building up against a secondary faction, then could not reach them anymore (probably because they murdered the threat), but now they just sit around like idiots.
** Killing these units allows them to respawn better ones that actually will do things like defend their homeworld from the players.
** We don't know for sure this is why some PG were sitting off to the side, but we suspect it could be related.

Issue History

Date Modified Username Field Change
Mar 17, 2021 3:11 pm Arides New Issue
Mar 17, 2021 3:11 pm Arides File Added: threat_wrong_again.jpg
Mar 17, 2021 3:11 pm Arides File Added: threat_against_humans_40_really.savemet
Mar 17, 2021 3:11 pm Arides File Added: threat_against_humans_40_realy.save
Mar 17, 2021 3:39 pm Arides Note Added: 0060814
Mar 17, 2021 8:17 pm BadgerBadger Note Added: 0060815
Mar 18, 2021 2:35 am BadgerBadger Note Added: 0060817
Mar 18, 2021 2:36 am BadgerBadger Assigned To => Chris_McElligottPark
Mar 18, 2021 2:36 am BadgerBadger Status new => assigned
Mar 18, 2021 2:43 am BadgerBadger Note Edited: 0060817
Mar 18, 2021 2:55 am BadgerBadger Note Added: 0060819
Mar 18, 2021 11:08 am Chris_McElligottPark Note Added: 0060820
Mar 18, 2021 7:59 pm Chris_McElligottPark Status assigned => resolved
Mar 18, 2021 7:59 pm Chris_McElligottPark Resolution open => fixed
Mar 18, 2021 7:59 pm Chris_McElligottPark Fixed in Version => Beta 2.760 Xenophiles And Overlords
Mar 18, 2021 7:59 pm Chris_McElligottPark Note Added: 0060828
Mar 18, 2021 9:43 pm Chris_McElligottPark Note Added: 0060830
Mar 19, 2021 2:24 pm Chris_McElligottPark Note Added: 0060833