View Issue Details

IDProjectCategoryLast Update
0019086AI War 2SuggestionMay 9, 2017 11:47 am
ReporterBadgerBadger Assigned Tokeith.lamothe  
Status resolvedResolutionfixed 
Product Version0.121 Ship Batch 2 of 7: 16 Ships! 
Fixed in Version0.123 Ship Batch 4 of 7, And A Metric Ton of Improvements 
Summary0019086: Modding request: improved error message for illegal map generator
DescriptionIf you try to have the MapGenerator code generate an illegal map (for example, a map where all planets are connected) you get an error like

4/29/2017 2:30:36 PM System.ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index
  at System.Collections.Generic.List`1[Arcen.AIW2.Core.Planet].get_Item (Int32 index) [0x00024] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/Sys\
tem.Collections.Generic/List.cs:635
  at Arcen.AIW2.Core.SetOfGalaxies.Create (Arcen.AIW2.Core.ArcenSimContext Context) [0x00446] in D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\GameState\M\
apping\SetOfGalaxies.cs:144
  at Arcen.AIW2.Core.Mapgen.WorkThreadOnly_GenerateNewGame () [0x003af] in D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\Sim\Mapgen.cs:92
  at Arcen.AIW2.Core.Engine_AIW2.WorkThreadOnly_StartNewGame () [0x0000d] in D:\vclarge\AI_War_2_Ultra\ArcenAIW2Core\src\Logic\Engine_AIW2.cs:586

I believe this indicates that the map can't be adequately populated (since the Ark would have to be placed next to the AI controller).

It would be nice to get an improved error message for modders ("Attempt to generate illegal map"?). However, I'm opening this half to have a record for any future modders who might run into the same issues that I did when I was starting. I would also be okay with this bug being Closed as a "Will Document" and an entry in the Modding FAQ being added.
TagsNo tags attached.

Activities

Chris_McElligottPark

May 8, 2017 4:52 pm

administrator   ~0046115

It's complicated, but basically this is a general bug in the data that was created. Keith moved a lot of the logic over to the open-source part of the code so that this can be more directly observed in the next build, thus making it so you can correct that sort of thing better.

BadgerBadger

May 8, 2017 10:26 pm

manager   ~0046116

Believe me, I am psyched to get my grubby little badger-paws on controlling where things go in a map ;-)

Chris_McElligottPark

May 9, 2017 11:47 am

administrator   ~0046117

Cheers. :)

Issue History

Date Modified Username Field Change
May 1, 2017 10:36 pm BadgerBadger New Issue
May 1, 2017 10:37 pm BadgerBadger Category Bug - Gameplay => Suggestion
May 8, 2017 4:52 pm Chris_McElligottPark Note Added: 0046115
May 8, 2017 4:52 pm Chris_McElligottPark Status new => resolved
May 8, 2017 4:52 pm Chris_McElligottPark Fixed in Version => 0.123 Ship Batch 4 of 7, And A Metric Ton of Improvements
May 8, 2017 4:52 pm Chris_McElligottPark Resolution open => fixed
May 8, 2017 4:52 pm Chris_McElligottPark Assigned To => keith.lamothe
May 8, 2017 10:26 pm BadgerBadger Note Added: 0046116
May 9, 2017 11:47 am Chris_McElligottPark Note Added: 0046117