Opened 2 years ago

Closed 19 months ago

Last modified 18 months 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 19 months 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 19 months ago.
Forgot a comment
3436_singMulti_filter_v3.patch (9.7 KB) - added by Imarok 19 months ago.
removed a warning
3436_singMulti_filter_v4.patch (9.6 KB) - added by Imarok 19 months ago.
Renamed singleMultiPlayer to singleplayer
3436_singMulti_filter_v5.patch (10.8 KB) - added by Imarok 19 months ago.
Add a filter for rated games
3436_singMulti_filter_v6.patch (10.7 KB) - added by Imarok 19 months ago.
Some little changes suggested by elexis
3436_singMulti_filter_v6.1.patch (12.6 KB) - added by elexis 19 months 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 19 months ago.
Only set RatingEnabled? if 1v1
3436_singMulti_filter_v6.3.patch (10.9 KB) - added by Imarok 19 months ago.
Also check total number of players

Download all attachments as: .zip

Change History (16)

comment:1 Changed 19 months ago by elexis

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 Changed 19 months ago by Imarok

Owner: set to Imarok

Changed 19 months ago by Imarok

Attachment: 3436_singMulti_filter.patch added

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

comment:3 Changed 19 months ago by Imarok

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

Changed 19 months ago by Imarok

Forgot a comment

Changed 19 months ago by Imarok

removed a warning

Changed 19 months ago by Imarok

Renamed singleMultiPlayer to singleplayer

Changed 19 months ago by Imarok

Add a filter for rated games

Changed 19 months ago by Imarok

Some little changes suggested by elexis

comment:4 Changed 19 months ago by elexis

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 19 months ago by elexis (previous) (diff)

Changed 19 months ago by elexis

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.

Changed 19 months ago by Imarok

Only set RatingEnabled? if 1v1

Changed 19 months ago by Imarok

Also check total number of players

comment:5 Changed 19 months ago by elexis

Resolution: fixed
Status: newclosed

In 18111:

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

comment:6 Changed 19 months ago by elexis

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 Changed 18 months ago by elexis

In 18388:

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

Note: See TracTickets for help on using tickets.