View Issue Details

IDProjectCategoryLast Update
0024499AI War 2Crash/ExceptionMar 2, 2021 9:41 am
ReporterHistidine Assigned ToChris_McElligottPark  
Status resolvedResolutionfixed 
Product VersionBeta 2.748 Defaults And Fixes 
Fixed in VersionBeta 2.750 Bastions And Tuning 
Summary0024499: ReactToPowerLevel, DoPerSecondLogic exceptions
DescriptionThis disables two of the three AI factions in my save.
```
2/27/2021 7:27:03 PM 2.748 SINGLEP Start load save: D:/Program Files (x86)/Steam/steamapps/common/AI War 2/PlayerData/Save/Rangers\ReactToPowerLevel ex.save Source1: AnythingElse Source3: LoadingSaveGame
2/27/2021 7:27:03 PM 2.748 SINGLEP Recalculated Strengths For Loaded Galaxy Map in 22ms
2/27/2021 7:27:03 PM 2.748 SINGLEP Finish load save in 652.7ms
2/27/2021 7:27:07 PM 2.748 SINGLEP Hit exception in ReactToPowerLevel debugCode 730 System.Exception: Could not find any planets for budget target faction Macrophage Infestation idx 21 allegiance budget 49588.65 next unit Hunter / Seeker power level 1.09
  at Arcen.AIW2.External.SpecialFaction_AI.ReactToPowerLevel (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) [0x003b1] in <a9bd7bcd5a2e449cbdeed269d1cce34e>:0
2/27/2021 7:27:07 PM 2.748 SINGLEP Unknown Exception in DoPerSecondLogic_Stage3Main_OnMainThreadAndPartOfSim for faction Blazer(Index 2), so will not run any more of those until a reload of the save. Check error log to see prior recorded exception.
2/27/2021 7:27:07 PM 2.748 SINGLEP Hit exception in ReactToPowerLevel debugCode 730 System.Exception: Could not find any planets for budget target faction Macrophage Infestation idx 21 allegiance budget 49588.65 next unit Hunter / Seeker power level 1.09
  at Arcen.AIW2.External.SpecialFaction_AI.ReactToPowerLevel (Arcen.AIW2.Core.Faction faction, Arcen.AIW2.Core.ArcenSimContext Context) [0x003b1] in <a9bd7bcd5a2e449cbdeed269d1cce34e>:0
2/27/2021 7:27:07 PM 2.748 SINGLEP Unknown Exception in DoPerSecondLogic_Stage3Main_OnMainThreadAndPartOfSim for faction Keller(Index 8), so will not run any more of those until a reload of the save. Check error log to see prior recorded exception.
```
Mods: Kaizers Marauders, Macrophage Histiocytes (+ Spire integration), Raising the Floor MultiAI Adjustment, AMU
TagsNo tags attached.

Activities

Histidine

Feb 27, 2021 6:35 am

reporter  

ReactToPowerLevel ex.save (977,290 bytes)

BadgerBadger

Feb 27, 2021 10:41 am

manager   ~0060660

I think this is a bug in the Macrophage related mods you have, since the Macrophage doesn't use the Overall Power Level mechanism

Chris_McElligottPark

Mar 1, 2021 2:38 pm

administrator   ~0060668

Thanks!

* Fixed an error in ReactToPowerLevel() where it would throw an exception and disable a faction if the faction didn't own or influence any planets at the moment when it ran this.
** This will wind up with these factions who have apparently aggro'ed the exo forces of an AI just not getting any exos against them, presumably because they have no territory for the exo to attack.

BadgerBadger

Mar 1, 2021 2:41 pm

manager   ~0060669

I'd argue that this is a bug in the minor faction, since it's requesting the AI to attack it but not providing anything to attack ;-)

Chris_McElligottPark

Mar 2, 2021 9:41 am

administrator   ~0060682

My understanding of the code, as I looked through it, was that the minor faction was not involved in actually setting anything at all, other than the OPness power level. When the power level was high enough, our AI code kicked in to try to respond, but could not find a valid target planet for the faction that was flagged as having a certain power level. So it was all on us, in most respects; perhaps there should be guidelines to modders that the OPness power level is never set for factions that don't currently have some territory, but even if that were the case, it's hard for everyone to get the memo, and our code should be robust enough to work around it.

I could imagine some edge cases where a faction of our own managed to have a power level that was high enough and then lose influence over their last planet, and then this same bug would have been hit with our own code with no changes. It would be extremely rare, I'm sure, but it's one of those things we could have triggered in vanilla under just the right phase of the moon, etc.

Issue History

Date Modified Username Field Change
Feb 27, 2021 6:35 am Histidine New Issue
Feb 27, 2021 6:35 am Histidine File Added: ReactToPowerLevel ex.save
Feb 27, 2021 6:35 am Histidine File Added: ReactToPowerLevel ex.savemet
Feb 27, 2021 10:41 am BadgerBadger Note Added: 0060660
Mar 1, 2021 2:38 pm Chris_McElligottPark Assigned To => Chris_McElligottPark
Mar 1, 2021 2:38 pm Chris_McElligottPark Status new => resolved
Mar 1, 2021 2:38 pm Chris_McElligottPark Resolution open => fixed
Mar 1, 2021 2:38 pm Chris_McElligottPark Fixed in Version => Beta 2.750 Bastions And Tuning
Mar 1, 2021 2:38 pm Chris_McElligottPark Note Added: 0060668
Mar 1, 2021 2:41 pm BadgerBadger Note Added: 0060669
Mar 2, 2021 9:41 am Chris_McElligottPark Note Added: 0060682