Index: gui/gamesetup/gamesetup.js =================================================================== --- gui/gamesetup/gamesetup.js +++ gui/gamesetup/gamesetup.js @@ -166,6 +166,11 @@ const g_RandomCiv = '[color="' + g_ColorRandom + '"]' + translateWithContext("civilization", "Random") + '[/color]'; /** + * For less lag values for Population Cap according to playersize 1-8 + */ +const g_PopCapListToPlayerSizes = [ "300", "300", "250", "250", "200", "200", "150", "150" ]; + +/** * Whether this is a single- or multiplayer match. */ var g_IsNetworked; @@ -420,6 +425,14 @@ numPlayers.list = playersArray; numPlayers.list_data = playersArray; numPlayers.onSelectionChange = function() { + if (g_IsNetworked) + { + this.tooltip = sprintf(translate("Select number of players. (Advice: Population cap to %(cap)s for less lag"), { "cap": g_PopCapListToPlayerSizes[this.selected] }); + let populationCap = Engine.GetGUIObjectByName("populationCap"); + let index = populationCap.list.indexOf(g_PopCapListToPlayerSizes[this.selected]); + if (index != -1) + populationCap.selected = index; + } if (this.selected != -1) selectNumPlayers(this.list_data[this.selected]); };