Server Filter
When the menu program is looking for servers to show in a List Box fed by the server feeder it uses what is called a filter to limit the search and display. This filter is made up of several cvars, each of whose values determine one portion of the server search or display. The contents of these cvars are altered by various different script commands but they also can be altered directly from the menu script. The cvars that make up the filter are :
- ui_netSource - this cvar determines the source to search for servers. It is altered by the ownerdraw UI_NETSOURCE command. The values and source for searching are :
| 0 |
Local network |
| 2 |
Internet using the Quake3World master server list |
| 3 |
Favorites list maintained by the program |
- ui_browserShowEmpty - this cvar determines if servers with no players are displayed. It is not directly altered by any script command and must be set manually. The values are :
| 0 |
don't show empty servers |
| 1 |
show the server even if there are no players |
- ui_browserShowFull - this cvar determines if servers that are full are displayed. It is not directly altered by any script command and must be set manually. The values are :
| 0 |
don't show full servers |
| 0 |
show servers even if they are full |
- ui_joinGameType - this cvar determines the type of game the server must be running before it will be displayed. It is altered by the ownerdraw UI_GAMETYPE command. The values and game type they represent, as defined by the standard gameinfo.txt file, are :
| 0 |
All |
| 1 |
FFA |
| 2 |
Tournament |
| 3 |
Single Player |
| 4 |
Team DM |
| 5 |
CTF |
| 6 |
1FCTF |
| 7 |
Overload |
| 8 |
Harvester |
- ui_serverFilterType - this cvar determines the type of mod that the server must be running before it is displayed. It is altered by the ownerdraw UI_NETFILTER command. If this cvar is set to -1 then the mod name is taken from the ui_CustomServer cvar rather than the internal mod name list. This allows you to display servers running mods that are not part of the internal list. The values, type of mod and mod name are :
| 0 |
All |
no mod name |
| 1 |
Quake 3 Arena |
baseq3 |
| 2 |
Team Arena |
missionpack |
| 3 |
Rocket Arena |
arena |
| 4 |
Alliance |
alliance20 |
| 5 |
Weapons Factory Arena |
wfa |
| 6 |
OSP |
osp |
If you only want to display servers running a mod not listed above, say the Ultra Freeze Tag mod whose mod name is ufreeze, you would place the following commands in the onOpen script of your Join Server menu :
setcvarfloat ui_serverFilterType -1;
setcvar ui_CustomServer "ufreeze" ;
This will display servers running the Ultra Freeze Tag game and no others.
After you have manually made changes to any of these cvars you must update the internals of the program by executing either the uiScript refreshFilter or uiScript updateFilter command. Without one of these commands, the lists may fail to be updated to reflect the changes made.
Map Filter
When you are displaying a list of the avalible maps using a List Box and either feeder ALLMAPS or feeder MAPS you can filter what type of maps are shown. Information about the maps is supplied from either the scripts/arenas.txt file or from the scripts/mapname.arena files, where mapname is the name of the map. In this information there is a line defining the type of game this map can be used for. More than one game type can be defined in this line, if the map supports more than one game type.
The information about the maps is loaded when you run the uiScript loadArenas command, usually in the onOpen script of the menu displaying the maps. The maps are marked as to which game type they support at this point. If you wish to only show maps for a specific mod whose type is not one of the internally supported types then you must setup a filter before running uiScript loadArenas. For example, in the Tremulous mod all the maps specific to that mod have their type defined as type "tremulous" in their .arena files. This is not a game type supported internally and normally you wouldn't see them listed as an avalible map. To set it so only those maps are displayed in a List Box you must do the following :
setcvar ui_SpecialGame "tremulous" ;
uiScript load Arenas ;
in the onOpen script. This will mark all maps whose type is tremulous as FFA and set all other maps to no game type.
The second part of the filter controls the game type displayed by the List Box. If you are using feeder ALLMAPS the cvar ui_netgametype is used. If you are using feeder MAPS then the cvar ui_gametype is used. The values and game type displayed for these cvars, as defined by the standard gameinfo.txt file, is :
| 0 |
FFA |
| 1 |
Tournament |
| 2 |
Single Player |
| 3 |
Team DM |
| 4 |
CTF |
| 5 |
1FCTF |
| 6 |
Overload |
| 7 |
Harvester |
These cvars are altered by ownerdraw UI_GAMETYPE for ui_gametype and ownerdraw UI_NETGAMETYPE for ui_netgametype or they can be manually changed by setcvar or a Multi item.
If you are using the ui_SpecialGame cvar to filter the maps then the only game type you will be concerned with is FFA, since all maps will be marked as this game type. Simply set either ui_gametype or ui_netgametype to 0 in the onOpen script to display only those special maps.
setcvar ui_SpecialGame "tremulous" ;
uiScript load Arenas ;
setcvar ui_netgametype 0 ;
After doing this the feeder ALLMAPS will only display maps that have their type defined as type "tremulous" in their .arena files.