This depends on #44164 to make it possible to handle "Experimental" AI level value saved by debug build when loading game to non-debug build.
This will also need adjustments to savegame format as the default AI level gets saved among the settings, obsoleting current savegame field for it. The old field needs to be dropped, and also conversion from an older format savegames to new format introduced. At the same time ai_level_convert() issue (#44163) interferes with the very same parts of savegame handling. Unless further complications come up, it certainly makes sense to resolve #44163 first.
Another thing that patch I'm working on does is rearranging enum ai_level so that "Away" is always the highest value (as we have means to terminate some iterations early, but no means to skip values from the beginning). This is a bit risky change, though I don't *know* any place to rely on old hardcoded order any more.
Given these points, does anyone have strong opinion whether we still should target this to 3.1, or should we postpone it to 3.2?
Reply To cazfi
Given these points, does anyone have strong opinion whether we still should target this to 3.1, or should we postpone it to 3.2?
Attached patch for master assumes that this is a new 3.2 feature - savegame format conversion happens between 3.1 and 3.2 formats (as well as from older 3.2 dev version)
Are access levels for the new setting meant to be ALLOW_HACK? Current AI level commands are ALLOW_CTRL.
- New version with setting's properties adjusted: SSET_RARE -> SSET_VITAL, read access ALLOW_HACK -> ALLOW_NONE, write access ALLOW_HACK -> ALLOW_CTRL
There's an issue in compat_load_dev(). It tries to determine if < 3.1.92 savegame is newer than this change or not by looking existence of the ailevel setting in it. However, setting that follows default value is not saved -> when ai level is the default, the code tries to look the level from old "game.level" entry and errors when it's not there either.
Reply To cazfi
There's an issue in compat_load_dev(). It tries to determine if < 3.1.92 savegame is newer than this change or not by looking existence of the ailevel setting in it. However, setting that follows default value is not saved -> when ai level is the default, the code tries to look the level from old "game.level" entry and errors when it's not there either.
- Fixed
Split from https://www.hostedredmine.com/issues/858206 : Jacob Nevins wants regular server setting for AI level of the newly created players. Unlike the dedicated level setting commands, this setting would not affect existing AIs.