Help has moved to the Planio platform. All logins and passwords remained the same. All users will be able to login and use Redmine just as before. Read more...

Bug #765061

Client's AI skill level control in pregame page is out of sync with server state

Added by Jacob Nevins almost 4 years ago. Updated almost 4 years ago.

Start date:
Due date:
% Done:


Estimated time:


Complained about in gna bug #24899, and also by just about everyone ever, since it's one of the most visible flaws in the UI for single-player games.

The dropdown to set the AI skill level in clients which have it (Gtk, Qt) have no feedback from the server state, so they tend to start out wrong (Gtk3 is worst by starting with "Handicapped" when server default is "Easy") and don't update if the AI level changes by means other than the user modifying the dropdown (e.g., chatline commands like "/hard", ruleset scripts, etc). This can lead to players being unable to select the desired skill level, because the client thinks it is already in force.

Attached patches look at incoming PACKET_PLAYER_INFO (for individual AIs) and PACKET_GAME_INFO (default for new AIs), and if they are all consistent, update the dropdown to reflect that level, otherwise set the dropdown to an unset value to indicate the inconsistency.

(Server wasn't sending PACKET_GAME_INFO when default level changed; it does now. That means the updating might not be perfect for old servers, but this UI is mainly used for single-player games where version skew isn't a thing anyway.)

m-client-ai-level-sync.patch (15.2 KB) m-client-ai-level-sync.patch Jacob Nevins, 2018-07-15 04:10 PM
30-client-ai-level-sync.patch (15.2 KB) 30-client-ai-level-sync.patch Jacob Nevins, 2018-07-15 04:10 PM
26-client-ai-level-sync.patch (17.5 KB) 26-client-ai-level-sync.patch Jacob Nevins, 2018-07-15 04:11 PM
25-client-ai-level-sync.patch (14 KB) 25-client-ai-level-sync.patch Jacob Nevins, 2018-07-15 04:11 PM

Related issues

Related to Freeciv - Bug #704730: AI Skill level forgotten when saved game is loadedNew

<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>


#1 Updated by Jacob Nevins almost 4 years ago

Patches for branches other than S2_6 not tested yet.

gui-gtk-3.22 and gui-gtk-4.0 not even compile-tested, as usual. (But patch applied cleanly.)

S2_6 patch targeted at 2.6.1.

#2 Updated by Jacob Nevins almost 4 years ago

Now tested all branches' versions.

#3 Updated by Jacob Nevins almost 4 years ago

  • Status changed from Resolved to Closed

#4 Updated by Jacob Nevins over 2 years ago

  • Related to Bug #704730: AI Skill level forgotten when saved game is loaded added

Also available in: Atom PDF