Opened 8 years ago
Closed 4 years ago
#3950 closed enhancement (fixed)
Rework rating-setting in the gamesetup
Reported by: | elexis | Owned by: | elexis |
---|---|---|---|
Priority: | Should Have | Milestone: | Alpha 24 |
Component: | UI – Game setup | Keywords: | |
Cc: | fpre_O_O_O_O_O_O | Patch: | Phab:D2117 Phab:D2483 |
Description (last modified by )
- The setting is saved in both C++ (
Engine.IsRankedGame()
) and simulation gamesettings (g_GameAttributes.settings.RatingEnabled
). Should be only one of both.
Saving it in the simulation seems kind-of wrong, since it is not used by it (yet?). Saving it in
cpp
seems to be much worse/uglier to me. That variableg_rankedGame
is only used to disable the wireframe hotkey inCGameView::HandleEvent
. Instead a global function could be introduced to check forRatingEnabled
of the gameattributes of the current client.
- The rated-game setting should be invisible in the GUI and unchecked if there are more than 2 players (since only 1v1s are rated due to ELO system in use)
- Following that, the provisional 2-player check in
reportGame()
and the replay filter can be removed
Change History (7)
comment:1 by , 6 years ago
Cc: | added |
---|---|
Description: | modified (diff) |
comment:2 by , 5 years ago
Component: | UI & Simulation → Game setup |
---|
comment:3 by , 4 years ago
Component: | UI – Game setup → Multiplayer lobby |
---|---|
Keywords: | simple removed |
comment:4 by , 4 years ago
Phab:2117 : The rated-game setting should be invisible in the GUI and unchecked if there are more than 2 players (since only 1v1s are rated due to ELO system in use)
comment:5 by , 4 years ago
Component: | Multiplayer lobby → UI – Game setup |
---|---|
Milestone: | Backlog → Alpha 24 |
Owner: | set to |
Priority: | Nice to Have → Should Have |
Summary: | Rework rating-setting → Rework rating-setting in the gamesetup |
The setting is saved in both C++ (Engine.IsRankedGame()) and simulation gamesettings (g_GameAttributes.settings.RatingEnabled). Should be only one of both.
This aspect is duplicate of #3550, and IsRankedGame
has been deleted in r23329.
Saving it in the simulation seems kind-of wrong, since it is not used by it (yet?).
Saving RatingEnabled in g_GameAttributes doesn't seem that wrong, because
- one shouldn't rely on
metadata.json
being successfully written to access the value in replays, - it is not implausible that the value may be used by the simulation or map generation, for example to make conditions in the match more balanced for the two rated match players or apply some new rule.
That variable g_rankedGame is only used to disable the wireframe hotkey in CGameView::HandleEvent. Instead a global function could be introduced to check for RatingEnabled of the gameattributes of the current client.
See comments in #3550, the C++ variable may be deleted if simulations' initAttributes value (g_GameAttributes) is read from, but then one probably still needs one or multiple locals. There are multiple uses for the variable, so perhaps it can be kept. That discussion should remain subject of #3550.
The rated-game setting should be invisible in the GUI and unchecked if there are more than 2 players (since only 1v1s are rated due to ELO system in use)
That is done in Phab:D2117 and Phab:D2483.
Following that, the provisional 2-player check in reportGame() and the replay filter can be removed.
Keeping the 2 player check sounds like an additional safety measure. So even if there is a host setting the RatingEnabled flag, there wont be invalid data sent to the lobby bots. The code should also not rely on replay data being syntactically and semantically correct ideally. So the replay menu check can be kept too IMO. Mods may override the function.
comment:6 by , 4 years ago
Patch: | → Phab:D2117 Phab:D2483 |
---|
Move tickets to
Game Setup
asUI & Simulation
got some sub components.