Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#3436 closed enhancement (fixed)

[PATCH] Replay Menu - singleplayer / multiplayer filter

Reported by: elexis Owned by: Imarok
Priority: Should Have Milestone: Alpha 21
Component: UI & Simulation Keywords: patch
Cc: Imarok Patch:

Description

It would be nice to filter singleplayer / multiplayer games in the replay menu.

Whether a game is networked should be should to the commands.txt file.

If we continue to display incompatible replays, we should filter those by the turn length, which are 200ms for singleplayer and 500ms for multiplayer.

Feature suggested by Stan.

Attachments (9)

3436_singMulti_filter.patch (9.6 KB ) - added by Imarok 8 years ago.
Add a filter for single player/multiplayer and one for the victory conditions
3436_singMulti_filter_v2.patch (9.7 KB ) - added by Imarok 8 years ago.
Forgot a comment
3436_singMulti_filter_v3.patch (9.7 KB ) - added by Imarok 8 years ago.
removed a warning
3436_singMulti_filter_v4.patch (9.6 KB ) - added by Imarok 8 years ago.
Renamed singleMultiPlayer to singleplayer
3436_singMulti_filter_v5.patch (10.8 KB ) - added by Imarok 8 years ago.
Add a filter for rated games
3436_singMulti_filter_v6.patch (10.7 KB ) - added by Imarok 8 years ago.
Some little changes suggested by elexis
3436_singMulti_filter_v6.1.patch (12.6 KB ) - added by elexis 8 years ago.
The nonAIPlayers method of detecting singleplayer is not bad. It doesn't work with unassigned players, but that shouldn't be a problem and might change at some point (ticket somewhere) (also don't ask me how we should sort games which are played by exclusively AI). Fixed indentation in the xml and the second line of the if's. Added the replay.attribs.settings.GameType check.
3436_singMulti_filter_v6.2.patch (10.9 KB ) - added by Imarok 8 years ago.
Only set RatingEnabled if 1v1
3436_singMulti_filter_v6.3.patch (10.9 KB ) - added by Imarok 8 years ago.
Also check total number of players

Download all attachments as: .zip

Change History (16)

comment:1 by elexis, 8 years ago

Cc: Imarok added
Keywords: simple added

Adding a new column to the table sounds like pain. A new entry below the compatibility filter sounds ok.

Also would be nice to be able to filter by victory condition (wonder games ftw).

comment:2 by Imarok, 8 years ago

Owner: set to Imarok

by Imarok, 8 years ago

Attachment: 3436_singMulti_filter.patch added

Add a filter for single player/multiplayer and one for the victory conditions

comment:3 by Imarok, 8 years ago

Keywords: review patch added
Summary: Replay Menu - singleplayer / multiplayer filter[PATCH] Replay Menu - singleplayer / multiplayer filter

by Imarok, 8 years ago

Forgot a comment

by Imarok, 8 years ago

removed a warning

by Imarok, 8 years ago

Renamed singleMultiPlayer to singleplayer

by Imarok, 8 years ago

Add a filter for rated games

by Imarok, 8 years ago

Some little changes suggested by elexis

comment:4 by elexis, 8 years ago

Keywords: simple removed
Milestone: BacklogAlpha 21
  • Since there are no labels in front of the dropdowns, ("Single or multiplayer", "Any gamemode", "Rated or unrated") might be a better indication than ("Any", "Any", "Any").
Last edited 8 years ago by elexis (previous) (diff)

by elexis, 8 years ago

The nonAIPlayers method of detecting singleplayer is not bad. It doesn't work with unassigned players, but that shouldn't be a problem and might change at some point (ticket somewhere) (also don't ask me how we should sort games which are played by exclusively AI). Fixed indentation in the xml and the second line of the if's. Added the replay.attribs.settings.GameType check.

by Imarok, 8 years ago

Only set RatingEnabled if 1v1

by Imarok, 8 years ago

Also check total number of players

comment:5 by elexis, 8 years ago

Resolution: fixed
Status: newclosed

In 18111:

Allow filtering the replaylist by single/multiplayer, victorycondition and rated games. Patch by Imarok, fixes #3436.

comment:6 by elexis, 8 years ago

Keywords: review removed

Changing replay.attribs is a big nono to me. It should be read-only and contain the unadulterated data of the file. Setting replay.isRated seems cleaner to me.

Also changed strings a bit again.

Thanks for the patch!

comment:7 by elexis, 8 years ago

In 18388:

Replace magic number with a readable string, refs #3436.

Note: See TracTickets for help on using tickets.