How to make server filters work

filsinger said:
my question can we add multiple queryStrings to one filter?

edit: just tested it.. and yes you can.

Code:
filterList=(filterName="filternamehere",queryString="numplayers > 0",queryString="password = 'false'")

is an example.


yes you can, but that code is not how to do it
 
Server Filtering in Tribes: Vengeance
-------------------------------------
It is possible to create a server filter in order to more easily find the type of servers you would like play on. You can filter on server names, number of players, game version, etc. The filter string is limited to 255 characters, and follows a SQL like syntax.

The most common comparison operators are:

'=' Equal
'>' Greater Than
'<' Less Than
'!=' Not Equal
'>=' Greater Than or Equal
'<=' Less Than or Equal
'AND' Additive Operator (This AND That)
'OR' Choice Operator (This OR That)
'&' Bitwise-AND
'LIKE' Equal using Wild Cards (also 'NOT LIKE')
'%' Wild Card character

The possible fields that you can use these operators on are

'mapname' The Name of the map currently being played
'numplayers' Number of players currently on the server
'maxplayers' Maximum number of players allowed on the server
'hostname' Name of the server
'hostport' TCP/IP Port the server is using
'gametype' Type of game ('ctf', 'rabbit', 'arena', 'fuel', 'ball')
'gamever' Game Version
'password' Is a password required to join ('true' or 'false')
'trackingstats' Is the server tracking statistics ('true' or 'false')

These can be used to create just about any filter you would want:

gametype = 'ctf'
Only returns games whose gametype key matches ‘ctf’

numplayers > 0 and numplayers != maxplayers
Only returns servers who have players on them, but are not full

password = 'false'
Only returns servers that are not passworded.

hostname like '%[IGA]%'
Only returns servers that have the string '[IGA]' somewhere in their name.

hostname not like '%ANOTHER%' AND maxplayers != 16 AND gamever = 59407
Returns a good approximation of dedicated servers that are running the current beta version of Tribes: Vengeance.

There are two additional special fields that you can filter on as well:

'country'
'region'


'country' is the two letter ISO country code. It is determined by the IP address of the server. For example:

(country = 'DE' or country = 'FR') and maxplayers >= 8
Only returns servers located in Germany or France that support 8 or more players.

The 'region' is identified by a region ID number, however a particular server can be listed in multiple regions since regions are "nested". Because of this, the region number for a server is actually the sum of all the regions the server is in. To filter on a specific region, you should use the bitwise-AND operator to identify servers that are listed in that region.

For example, to identify servers in North America, you would use the filter:

(region & 2) = 2
since 2 is the region code for North America.

Normal bitwise math can be used to check for multiple regions. For example, to check for North America or Caribbean, you can add them together:

(region & 6) != 0


Region ID & Region Name
---------------------------
1 Americas
2 North America
4 Caribbean
8 Central America
16 South America
32 Africa
64 Central Africa
128 East Africa
256 Northern Africa
512 Southern Africa
1024 West Africa
2048 Asia
4096 East Asia
8192 Pacific
16384 South Asia
32768 South-East Asia
65536 Europe
131072 Baltic States
262144 Commonwealth of Independent States
524288 Eastern Europe
1048576 Middle East
2097152 South-East Europe
4194304 Western Europe
 
It's only insecure if it's direct access to the SQL server (which it isn't). Since this is all interpreted by an intermediate layer at Gamespy it's far less interesting (but feel free to come up with 255 bytes of killer pseudo SQL code to destroy all of the universe ;) ).
 
Dunno why but sometimes afther i add a filter the query reset to blank, and i must readd it. The 2nd time it work.
 
Can we plz get servers that u cant/didnt ping to report a 999 ping or something instead of a 0..so they dont sort to the top of your lists when sorting by ping!
 
and I take it that a euro filter ( (region & 65536) = 65536 ) will automaticly include all the sub euro regions like 'west' 'south-east' and 'east'?
 
DOX said:
Can we plz get servers that u cant/didnt ping to report a 999 ping or something instead of a 0..so they dont sort to the top of your lists when sorting by ping!
:signed:

I kept trying to join them when I first installed... then I realized what 0 would actually mean. *slaps head*

Zustiur.
 
DOX said:
Can we plz get servers that u cant/didnt ping to report a 999 ping or something instead of a 0..so they dont sort to the top of your lists when sorting by ping!

Should be able to just add ping > 0 to your filter line.

Something like gametype = 'ctf' and ping > 0
 
Back
Top