Ticket #44105

Server setting for AI level

Eröffnet am: 2022-03-14 18:59 Letztes Update: 2022-04-11 14:44

Auswertung:
Verantwortlicher:
Typ:
Status:
Geschlossen
Komponente:
Meilenstein:
Priorität:
5 - Mittel
Schweregrad:
5 - Mittel
Lösung:
Gefixt
Datei:
3

Details

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.

Ticket-Verlauf (3/12 Historien)

2022-03-14 18:59 Aktualisiert von: cazfi
  • New Ticket "Server setting for AI level" created
2022-03-23 16:34 Aktualisiert von: cazfi
Kommentar

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.

2022-03-24 15:18 Aktualisiert von: cazfi
Kommentar

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?

2022-03-27 22:07 Aktualisiert von: cazfi
  • Verantwortlicher Update from (Keine) to cazfi
  • Lösung Update from Keine to Accepted
  • Meilenstein Update from S3_1 d3f (closed) to S3_2 d3f
Kommentar

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)

Depends on #44164 and #44163

2022-03-28 00:41 Aktualisiert von: alienvalkyrie
Kommentar

Are access levels for the new setting meant to be ALLOW_HACK? Current AI level commands are ALLOW_CTRL.

2022-03-30 07:20 Aktualisiert von: cazfi
Kommentar

- New version with setting's properties adjusted: SSET_RARE -> SSET_VITAL, read access ALLOW_HACK -> ALLOW_NONE, write access ALLOW_HACK -> ALLOW_CTRL

2022-04-09 07:49 Aktualisiert von: cazfi
  • Lösung Update from Accepted to Keine
Kommentar

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.

2022-04-09 14:04 Aktualisiert von: cazfi
  • Lösung Update from Keine to Accepted
Kommentar

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

2022-04-11 14:44 Aktualisiert von: cazfi
  • Status Update from Offen to Geschlossen
  • Lösung Update from Accepted to Gefixt

Bearbeiten

You are not logged in. I you are not logged in, your comment will be treated as an anonymous post. » Anmelden