Opened 12 years ago

Last modified 3 years ago

#812 new enhancement

Add new options to game setup

Reported by: historic_bruno Owned by:
Priority: Nice to Have Milestone: Backlog
Component: UI – Game setup Keywords:
Cc: Patch:

Description (last modified by elexis)

A few more options that are useful for game setup:

  • Speed - set game speed / simulation rate (dropdown: default, slow, medium, fast)
  • Resources - set the starting resources for all players (dropdown: default, low, medium, high)
  • Population - set max population for all players (dropdown: default, 50, 100, 150, 200, 300, ...)
  • Difficulty - set AI difficulty (dropdown: easy, medium, hard, hardest)
  • Player Color (#1580)
  • Starting phase / techs
  • RMS advanced options: #4110
    • Possibly let random maps control what settings are available to the user during setup (change available map sizes or number of players)
    • Add advanced options (e.g. forest cover, water/land balance, resource placement)
    • These could be specified in the corresponding JSON file.
  • AI advanced options
    • Mode (aggressive, defensive, etc.) see #2550
    • Could be defined in the same manner as RMS advanced options

Change History (13)

comment:1 by historic_bruno, 12 years ago

Description: modified (diff)

comment:2 by Philip Taylor, 12 years ago

Maybe AI difficulty/mode settings should be per AI player, rather than a single global setting that applies to all AIs. (Or maybe that'd complexify the UI too much in the common cases.)

comment:3 by historic_bruno, 11 years ago

Description: modified (diff)

comment:4 by O.Davoodi, 10 years ago

In [12756]:

Match setup GUI revamp. Adds pop-cap and starting resource options. Refs #812

comment:5 by historic_bruno, 10 years ago

Description: modified (diff)
Keywords: setup game removed

Game speed will be implemented with #785.

comment:6 by historic_bruno, 10 years ago

Description: modified (diff)

comment:7 by wraitii, 9 years ago

Description: modified (diff)

comment:8 by Stan`, 7 years ago

Description: modified (diff)

comment:9 by elexis, 6 years ago

Component: Core engineUI & Simulation
Description: modified (diff)

comment:10 by elexis, 5 years ago

In 20646:

AI behavior gamesetup setting.

Based On Patch By: Sandarac
Differential Revision:
Refs #812, #2550

comment:11 by Imarok, 4 years ago

Component: UI & SimulationGame setup

Move tickets to Game Setup as UI & Simulation got some sub components.

comment:12 by elexis, 3 years ago

In 23374:

Gamesetup class rewrite, fixes #5322, refs #5387.

  • Decouples settings logically which in turn allows fixing many problems arising from previous coupling.
  • Fixes the persist-match-settings feature, refs #2963, refs #3049.
  • Improves performance of the matchsetup by rebuilding GUI objects only when necessary.

Provides groundwork for:

  • UI to control per-player handicap, such as StartingResources, PopulationCap, StartingTechnologies, DisabledTechnologies, DisabledTemplates, ..., refs #812.
  • Map specific settings (onMapChange event), refs #4838.
  • Chat notifications announcing which settings changed, refs D1195,
  • Multiple controllers setting up the game (since setting types can check for permissions in onUpdateGameAttributes without the need for a new data model or a second gamesetup data network message type), refs #3806, subsequently dedicated server, refs #3556.
  • MapBrowser (MapCache, MapTypes, onUpdateGameAttributes interface), refs D1703 and D1777,
  • Multiplayer saved games (decoupling and setting dependent unique logic), refs #1088.


Enable maps to restrict setting values:

  • If a map specifies an AI or Civs for a playerslot, the controller can't assign a player/other AI or Civ to that slot, refs #3049, #3013.

Fix per player StartingResources, PopulationCap, StartingTechnologies, DisabledTechnologies, DisabledTemplates following rP12756, refs #812, fixes #4504. Use this for DisabledTechnologies on Polar Sea.

Persist user settings for Skirmish maps:

  • All user chosen settings are persisted when changing the selected map or maptype, except where the selected map overwrites the setting value and except for Scenario maps which still use the default value where the map doesn't specify the setting value.
  • Tickets relating to that Skirmish mapchange user setting persistance:
    • Selecting a map doesn't change the selected civilizations, fixes #3120 (together with r23279 removing map specified Civs).
    • Selecting a map type doesn't reset the selected settings, fixes #5372.
    • Selecting a map doesn't change the selected victory conditions, unless the map specifies those, refs #4661, #3209. (Atlas still writes VictoryConditions to every map.)
    • Consume the player color palette from Skirmish maps, refs rP17040 / #1580. Preserve the selected playercolors when switching the Skirmish/Random map by chosing the most similar colors if the map comes with a different palette.

Rated games:

  • Hide and disable Rated game setting unless there are exactly two players, fixes #3950, supersedes D2117.
  • Display conspicuous warning if the game is rated, so players are perfectly aware.

Autostarted games:

  • Allow using the gamesetup page to autostart matches with arbitrary maps, not only this one tutorial, as reported in D194 and rP19599, refs D11.


  • Keep gamesetup page open after disconnect, allowing players to read chat messages indicating why the host stopped the server, fixes #4114.
  • The message subscription system allows new and mod settings to run custom logic on arbitrary setting changes (most importantly on map change). This removes hardcoded logic restrictions from the gamesetup option unification rewrite in rP19504/D322, refs #3994, such as the hardcoding of setting references in selectMap to biomes from rP20115/D852 and the difficulty from rP20760/D1189, RelicDuration, WonderDuration, LastManStanding, RegicideGarrison, TriggerScripts, CircularMap, Garrison, DisabledTemplates.


  • Display values of disabled checkboxes with Yes/No labels, fixes D2349, reviewed by nani.

Clean g_GameAttributes of invalid values and gamesetup GUI temporaries, refs #3049, #3883:


  • Refactor to MapCache class, store maps of all types and use it in the replaymenu, lobby and session as well.


  • Remove hardcodings and coupling of the SettingTabsPanel with biomes/difficulties/chat UI from D1027/rP20945.


  • Restructure the page to use hierarchical object organization (topPanel, centerPanel, centerLeftPanel, bottomPanel, centerCenterPanel, centerRightPanel, bottomLeftPanel, bottomRightPanel), allowing to deduplicate object position margins and size math and ease navigation.

New defaults:

  • Check LockedTeams default in multiplayer (not only rated games).
  • Persist the rated game setting instead of defaulting to true when restarting a match, which often lead to unintentional rated games when rehosting.
  • 60 FPS in menus since they are animated

Autocomplete sorting fixed (playernames should be completed first).
Refactoring encompasses the one proposed in Polakrity and bb D1651.

Differential Revision:
Tested by: nani
Discussed with:

Emojis by: asterix, Imarok, fpre, nani, Krinkle, Stan, Angen, Freagarach

comment:13 by elexis, 3 years ago

In 23413:

Gamesetup subpages support.

Split SetupWindow from GameSetupPage class.
Create Gamesetup/Pages subfolder, starting with the existing GameSetupPage and LoadingPage.
Run the subpage in the same GUI script context instead of separate pages.
Planned subpages are AIConfigPage (refs D2577), MapBrowser (D1703), hero selection dialog, civ selection (refs #3987), starting resources, population capacity (refs #4379, #812...).

This allows:

  • subpages to benefit from direct access and reuse of the gamesetup controlers, (f.e. gameSettingsControl, playerAssignmentsControl, mapCache, netMessages, ...), deduplication.
  • subpages to handle events and control gamesettings even if the according subpage is closed (for example deleting AIBehavior if there is no AI assigned).
  • to keep gamesettings decoupled, i.e. exactly one class per setting (for this example avoiding that both GameSetupPage/AIConfigButton and AIConfigPage/AIBehavior control the AIBehavior setting value.).

Differential Revision:
Comments By: Vladislav (, nani (PM)

Note: See TracTickets for help on using tickets.