With cordite in the air, splintered steel, shell casings and powder burns, there’s only one explanation...
Post feedback & meet new friends. General SG discussion.

Moderators: Pardner, TheDoctor

Re: Monster Browser 0.8a is Released!

Postby torhu » Thu May 03, 2012 1:28 pm

/dev/random wrote:Usually there's no need to set fs_game manually while connecting to a server, since the engine will figure this out on its own.
If you insist, then just use "game" from the info reply, since it matches the server's fs_game setting. Be aware that this key might not be present if it equals the default BASEGAME, e.g. "baseq3", "baseoa", "smokinguns" etc. (in which case you should not need to manually set it either).
Since it does not include any useful information for the players, I'd say just ignore it.
IIRC, the wrong UI module will be loaded initially if the server isn't using the default fs_game. Then the client changes the UI when it learns the server's fs_game setting. That doesn't look so good, so I'll continue setting it to avoid that situation.

/dev/random wrote:Be sure to use "gamename" from status replies to discriminate between mods.
The same key in info replies is set to "com_gamename" in recent ioquake3 forks. I have no idea why they chose a key name which is already taken by another cvar.
I guess this is the "safest" way to detect mods. There is no guarantee that a mod actually changes this value, but you'd have to rely on other hacks to detect mods in this case (like looking at special version cvars, such as "xp_version" for E+ in status replies).

Some mods change only game, not gamename. I'm still thinking about this -- it's a bit of a mess. Currently, MB checks both of them and includes the server if either is a match for the desired mod name.
In game: =SG=monSter
Monster Browser
User avatar
torhu
SG Team
 
Posts: 1125
Joined: Thu Jan 06, 2005 8:12 pm
Location: Norway



Re: Monster Browser 0.8a is Released!

Postby /dev/random » Fri May 04, 2012 2:42 pm

Mods themselves can not change the "game" key in info replies. This is done by the server admin via "fooded +set fs_game bar". The key might therefor not represent the actual mod/gametypes in use on the server.
As an example, I can do "~/smokinguns $ smokinguns_dedicated +set fs_game baseoa +set g_gametype 5", which will still be Smokin' Guns and Bank Robbery, not OpenArena with One Flag CTF.
Furthermore one admin might start his ExcessivePlus server with fs_game "e+", another one with "ep", a third one with "excessiveplus", as there is no real standard to this.

I agree that it's a mess. You could try to rely on mod-specific cvars such as "xp_version" for ExcessivePlus. Alas not all mods have such a cvar.
User avatar
/dev/random
Smokin' Amigo!
 
Posts: 410
Joined: Thu Jan 22, 2009 1:58 pm



Previous

Return to Saloon

Show Sidebar
Show Sidebar

User Control Panel

cron