View Issue Details

IDProjectCategoryLast Update
0019274AI War 2GUINov 2, 2017 1:21 pm
ReporterBadgerBadger Assigned Tokeith.lamothe  
Status resolvedResolutionfixed 
Product Version0.600 Tutorial Engine 
Fixed in Version0.601 
Summary0019274: save game fails to reflect AI type
DescriptionWhen I save a game, regardless of what I selected the AI type to be, when I go to the Load game menu I always see the AI type reflected as "Vanilla". Technically this is a problem with my code, but I'm not sure what's going wrong.

I created a brand new game whose AI Type I selected to be "Despiser of Shields. Here's how I generate the save game file name (there's a matching invocation in bSaveGameName):

        public class bSaveAndQuit : ButtonAbstractBase
        {
            public override MouseHandlingResult HandleClick()
            {
....

                ArcenDebugging.ArcenDebugLogSingleLine( "Save and quit: ai type name " + World_AIW2.Instance.Setup.MasterAIType.Name + " abbrev " + World_AIW2.Instance.Setup.MasterAIType.Abbreviation, Verbosity.DoNotShow );
...
                SaveGameData data = new SaveGameData( iSaveGameName.Instance.SaveName, World_AIW2.Instance.Setup.Seed,
                                                       World_AIW2.Instance.GameSecond, iCampaignName.Instance.CampaignName,
                                                       dt, World_AIW2.Instance.Setup.MasterAIType.Name, World_AIW2.Instance.Setup.Difficulty.Name ); <===========
.....

And I see the following in my ArcenDebugLog.txt

11/1/2017 12:34:44 AM Save and quit: ai type name Vanilla abbrev Vanilla

It looks like somehow the game doesn't know which AI Type it's using? Or at least, that value isn't stored where my code expects.
TagsNo tags attached.

Activities

keith.lamothe

Nov 2, 2017 1:21 pm

administrator   ~0046558

This is due to a vestigial way of tracking the AI type, before it could be picked at the faction level.

For 0.601:

* Removed the concept of the "world" object having a "master AI type", since individual AI factions can now have their own AI type.
** There's still only the one such faction, but this was an important step in preparing for multiple ones.
** The main piece that had to be moved here was the concept of what ships an AI has unlocked from AIP points. Used to be game-wide, is now faction-specific.
*** For now design-corruption is also now faction specific, but there will likely be a way added to make the corruption "spread" so that you get the same effect as in AIWC: once it's corrupted, no more of that design get spawned.

Thanks :)

Issue History

Date Modified Username Field Change
Nov 1, 2017 12:36 am BadgerBadger New Issue
Nov 1, 2017 10:26 am Chris_McElligottPark Assigned To => keith.lamothe
Nov 1, 2017 10:26 am Chris_McElligottPark Status new => assigned
Nov 2, 2017 1:21 pm keith.lamothe Status assigned => resolved
Nov 2, 2017 1:21 pm keith.lamothe Resolution open => fixed
Nov 2, 2017 1:21 pm keith.lamothe Fixed in Version => 0.601
Nov 2, 2017 1:21 pm keith.lamothe Note Added: 0046558