torhus / monster-browser

A simple game server browser for Quake 3-based games
https://sites.google.com/site/monsterbrowser/
10 stars 1 forks source link

[Idea] Showing more columns in the main table? #4

Closed The-Gig closed 1 year ago

The-Gig commented 2 years ago

Just an idea, what about adding a few more columns to the main table? I was thinking about gamename and gametype (the numerical one). It looks like Tremulous doesn't broadcast a "gametype" info, but in that case I guess leaving the field empty should be enough.

torhus commented 2 years ago

The problem is that what you would want depends on the game. Tremulous differs too much from Q3 here. gametype is shown in the Game column, though.

The-Gig commented 2 years ago

About the "game" column, I thought it was showing the "game" info from serverinfo string, but it looks like it's not the case (so the actual "game" variable could be nice to be shown, too). It looks like it shows the gametype number for high numbers (non-standard gametypes), and a short text description for the original Q3A gametypes (1v1, TDM, FFA, CTF). Is the conversion of those low numbers hardcoded somewhere? Some mods may be so different than the basegame that those descriptions may not fit... a little number probably, but possible.

I don't get how the program knows that in Smoking Guns gametype 5 is "BR" or in World of Padman gametype 4 is "LPS"... Considering in mods.ini you may write anything in section name, how does it know which game actually each section is referring to?

torhus commented 2 years ago

It's based on the value of mod. It's hardcoded, which it probably shouldn't have been, except for the Q3 defaults. But it shouldn't be to hard to fix, I'll see if I can get it done.

https://github.com/torhus/monster-browser/blob/master/src/serverdata.d#L200

The-Gig commented 2 years ago

It's good enanchement that now the short description for gametype is customizable (https://github.com/torhus/monster-browser/issues/10), very well!

Anyway, I still think that adding separate colums for "game" and "gamename" variables, while renaming the current "game" one (to gametype, gt, mode or something similar), could be useful.

The-Gig commented 2 years ago

Hi! I tried the new version 0.9e. Very well, but with the addition of "Quake III (all servers)" entry (and in general the ability to show "all servers" for a game without having to filter for a certain mod as before), I really think adding colums for game and gamename cvars would be an extremely useful feature.

torhus commented 2 years ago

I'm a bit worried that having Game type, Game, and Gamename columns would be confusing to many people. Maybe the better solution is to add a more flexible filter selector, but that's a bigger project.

The-Gig commented 2 years ago

Well, I guess one could try adding them and see "how it feels"... checking how those columns would look like for the various games... I guess you might place them as the last ones, after the more important columns, if you like.

However, while in theory anyone using this tool should already know what "gametype" is (by the way, what about a setting somewhere to "always show gametype number" instead of its description? Just an idea I just had.), actually learning about the existence of "game" and "gamename" cvars is useful for anyone which wants to customize mods.ini to add filters for their favorite mods.

And of course, you could still add "choose columns" feature later, if you will think is needed...

The-Gig commented 2 years ago

As the program is keeping getting better and better with the new releases, I'd still like to be able to see game and gamename CVARs columns... If you still think it's a feature for advanced users, why don't add a checkbox in options menu to show them?

On a side note, what's your opinion about that little idea I had in the post above, about an option to show gametype number instead if description?

torhus commented 2 years ago

Is the idea of having those extra columns to make it easier to adjust mods.ini? I did a quick test version with this in it. So far it's not configurable, and a bit buggy (don't try to sort on those columns): https://ci.appveyor.com/project/torhus/monster-browser/builds/45110848/artifacts

Why would you need to see the gametype number, by the way?

The-Gig commented 2 years ago

The reasons for those columns are:

I'm just a little unsure whether [gamename] should be enabled by default or it should be an option, for experienced users, as some games have it "wrong", which is misleading (e.g. many OA servers show "quake3arena" there, despite actually being OpenArena servers... I guess due to using ioquake3 binaries instead of official oa binaries)... immagine But on the other hand, seeing both fields all the time can allow users to find out, as example, why some servers running "osp" mod showed up when they searched for "baseq3" instead. immagine

About allowing to see the gametype as a number, it's just thinking about the fact that mods' gametypes may differ from basegame gametypes, hence in some situations the description could be misleading. As example, OpenArena has got 12 gametypes (13 if you count the yet unreleased Possession mode - and I'm not counting gametype 0 for simplicity), but servers running OA might be running mods based upon quake3 gamecode, so they might have added their own gametypes, so in a certain mod, gametype 5 could be something else than Oneflag, which was something initialy added by Team Arena mod (and a few mods might even have replaced the first 4 gametypes).

On a side note, I guess I'll have to point out in OA github that probably the binary should set "game" to "openarena" instead of "baseoa".

torhus commented 2 years ago

The work on this is still unfinished, but you can get a 0.9g build with the extra columns added here: https://ci.appveyor.com/project/torhus/monster-browser/builds/45156480/artifacts

The-Gig commented 2 years ago

Tried, nice! Looking forward for when ordering for them will not crash the program anymore. :-)

torhus commented 2 years ago

Partially fixed in v0.9h. The game type is still only available in the Cvar table.

The-Gig commented 2 years ago

0.9h tested. Good, thank you! Maybe "game" column might have been shown by default, anyway the ability to enable it is the important thing!

The-Gig commented 2 years ago

On a side note, I guess I'll have to point out in OA github that probably the binary should set "game" to "openarena" instead of "baseoa".

Ehm... I was trying to find out if that might have been a good idea or not, but I discovered a big rabbit hole which frightens me... I try to sum up what I found out so far.

torhus commented 2 years ago

I'm guessing that the "Info Variables" (getinfo query response) is what is used in the in-game server browser, while "Status Variables" (getstatus query response) is used when you connect. It seems strange that they would conflict, maybe it's a bug?

By the way, you can get colored output on Windows by adding this to the script:

from colorama import just_fix_windows_console
just_fix_windows_console()

Install colorama first: pip install colorama

torhus commented 1 year ago

@The-Gig I'm thinking about adding a setting to enable a numerical game type column, I suppose that would mean I can close this issue?

The-Gig commented 1 year ago

I guess so... :-)

torhus commented 1 year ago

I added the column, maybe I'll try to fix one or two bugs and make a release tomorrow...

https://ci.appveyor.com/project/torhus/monster-browser/builds/45697318/artifacts

The-Gig commented 1 year ago

Nice! I wonder whether it's better "Numerical GT", "Gametype N" or "[g_gametype]", as column header...

torhus commented 1 year ago

Nice! I wonder whether it's better "Numerical GT", "Gametype N" or "[g_gametype]", as column header...

I set it to [g_gametype] first, but the value is actually taken from the gametype, so it seemed wrong to call it that. I thought it should start with something else than "Game", to differentiate from the other Game type column. Make sense?

The-Gig commented 1 year ago

I don't think there is need to start with something else than "game"... Couldn't you just take the value from g_gametype and call it a day?

torhus commented 1 year ago

I suppose I could call it "Game type #", how about that?

torhus commented 1 year ago

The downside is they will look the same in practice, except for the contents: MB_Gametype

The-Gig commented 1 year ago

The downside is they will look the same in practice, except for the contents: MB_Gametype

Probably not a big issue, I guess...