View Issue Details
ID | Project | Category | Date Submitted | Last Update | |
---|---|---|---|---|---|
0024522 | AI War 2 | Bug - Gameplay | Mar 9, 2021 10:52 am | Jul 16, 2021 7:00 pm | |
Reporter | Sigma7 | Assigned To | Chris_McElligottPark | ||
Status | resolved | Resolution | reopened | ||
Product Version | Beta 2.753 Interplanetary States of Matter | ||||
Fixed in Version | 3.312 Hotfix | ||||
Summary | 0024522: Autosaving when disabled | ||||
Description | \CodeExternal\AIWarExternalCode\src\SpecialFactions\Human.cs:5778, function UpdateAutosave int autosaveInterval = GameSettings.Current.GetIntBySetting( "AutosaveInterval" ); int autosaveIntervalUnit = 60; //once per minute if ( AIWar2GalaxySettingTable.GetIsBoolSettingEnabledByName_DuringGame( "IronmanMode" ) ) { tracking.NumAutosavesToTrack = 1; autosaveInterval = 5; //take ironman saves every few minutes. Note that exiting the game will cause it to take an ironman save anyway, so doesn't need to be super often } int secondsForNextAutosave = tracking.TimeForLastAutosave + autosaveInterval* autosaveIntervalUnit; if ( secondsForNextAutosave <= World_AIW2.Instance.GameSecond || (tracking.TimeForLastAutosave <= 0 && AIWar2GalaxySettingTable.GetIsBoolSettingEnabledByName_DuringGame( "IronmanMode" ) ) ) //save immediately for ironman { Actual result is Non-ironman games not checking if autosaveInterval is equal to zero, and thus attempts an autosave every few seconds. Expected result is described in GameData/Configuration/Setting/KDL_Settings.xml:12: description="Autosaves are done every X minutes. Set this to 0 to disable autosaves."/> | ||||
Tags | No tags attached. | ||||
|
Thanks! * Updated the autosave code so that even if you disable it, in ironman mode it will still work. And if you disable it in ironman mode, it should definitely actually be disabled. I was actually seeing one more line than what you had: tracking.NumAutosavesToTrack = GameSettings.Current.GetIntBySetting( "AutosavesToTrack" ); if(tracking.NumAutosavesToTrack <= 0) return; int autosaveInterval = GameSettings.Current.GetIntBySetting( "AutosaveInterval" ); int autosaveIntervalUnit = 60; //once per minute if ( AIWar2GalaxySettingTable.GetIsBoolSettingEnabledByName_DuringGame( "IronmanMode" ) ) { tracking.NumAutosavesToTrack = 1; autosaveInterval = 5; //take ironman saves every few minutes. Note that exiting the game will cause it to take an ironman save anyway, so doesn't need to be super often } That code above is what I saw in svn, not the code that you posted in your OP. I'm not sure why the difference. The code above should prevent saves fine, but also should have not properly worked in ironman if you had autosaves off. I've made the adjustment to be this: tracking.NumAutosavesToTrack = GameSettings.Current.GetIntBySetting( "AutosavesToTrack" ); int autosaveInterval = GameSettings.Current.GetIntBySetting( "AutosaveInterval" ); bool isIronMan = AIWar2GalaxySettingTable.GetIsBoolSettingEnabledByName_DuringGame( "IronmanMode" ); if ( isIronMan ) { tracking.NumAutosavesToTrack = 1; autosaveInterval = 5; //take ironman saves every few minutes. Note that exiting the game will cause it to take an ironman save anyway, so doesn't need to be super often } if (tracking.NumAutosavesToTrack <= 0) return; That should work for ironman and non-ironman as expected. If you still see issues, please let me know. Thanks! |
|
Setting Autosave every X minutes to 0 still has rapid autosaving. To fix, that last condition should be: if (tracking.NumAutosavesToTrack <= 0 || autosaveInterval <= 0) return; |
|
Thanks! * If you have the frequency of autosaves set to 0, it now actually properly disables those (as the tooltips say it should) rather than running them constantly. |
Date Modified | Username | Field | Change |
---|---|---|---|
Mar 9, 2021 10:52 am | Sigma7 | New Issue | |
Mar 9, 2021 1:37 pm | Chris_McElligottPark | Assigned To | => Chris_McElligottPark |
Mar 9, 2021 1:37 pm | Chris_McElligottPark | Status | new => resolved |
Mar 9, 2021 1:37 pm | Chris_McElligottPark | Resolution | open => fixed |
Mar 9, 2021 1:37 pm | Chris_McElligottPark | Fixed in Version | => Beta 2.754 Buffs And Bugfixes |
Mar 9, 2021 1:37 pm | Chris_McElligottPark | Note Added: 0060705 | |
Mar 12, 2021 5:48 pm | Sigma7 | Status | resolved => feedback |
Mar 12, 2021 5:48 pm | Sigma7 | Resolution | fixed => reopened |
Mar 12, 2021 5:48 pm | Sigma7 | Note Added: 0060748 | |
Jul 16, 2021 7:00 pm | Chris_McElligottPark | Status | feedback => resolved |
Jul 16, 2021 7:00 pm | Chris_McElligottPark | Fixed in Version | Beta 2.754 Buffs And Bugfixes => 3.312 Hotfix |
Jul 16, 2021 7:00 pm | Chris_McElligottPark | Note Added: 0062466 |