AssaultCube Documentation

Favourite servers

Favourites let you move your favourite servers (ie. servers with preferred maps, modes, etc.) above others in the serverbrowser, and, similarly, move disliked servers, etc. below other servers.

Basic favourites category definitions are located in [AC_installation_folder]/config/favourites.cfg.

To add your own category, it's best to copy this file to your game home directory (where saved.cfg is located), and then edit that copy. Another way is to put additional categories into your autoexec.cfg.
You can edit later category definitions in a text editor or via the in-game menu - just press F1 in the serverbrowser to open the "serverbrowser help" menu, then "Edit favourites" (or press F4 in the serverbrowser to get there directly) and select the one you wish to edit.

You can easily toggle (add it to, or remove it from a category) the category of a selected server in the serverbrowser - just press the 0..9 keys on the keyboard. See in the serverbrowser help menu which key toggles what category.

Note: the category SEARCH is special, because it's used in the "Search for servers" feature, so please DON'T remove it and keep it always as the last category.

Alternative views in serverbrowser

In the serverbrowser it's possible to toggle between viewing all servers and viewing only servers which match chosen categories of favourites. Switching views is possible by using Alt + Mouse wheel or Alt + Up/Down.

Firstly, in the "serverbrowser help" menu open "Edit alternative views in serverbrowser" and type the names of the categories (not tags!) which you want to be displayed on the alternative views. Category name is displayed in the settings of each category.
For example, type: LOVE MATCH

These category names will be saved in the serverbrowseraltpages alias.

Now you will able to toggle between a view of all servers and views of only servers matching your LOVE and MATCH categories.

Category attributes

Every category has the following attributes:

  Attribute Description
weight Positive weights list a server higher in the list; negative weights list lower. To see weights in serverbrowser use:
showweights = 1.
tag A short category description, which shows in the serverbrowser. It can use escaped colour commands (for example: \f3). If undefined, it's the same as the category name.
desc A detailed category description.
red, green, blue, alpha The background colour for servers of this category. Use values from 0..100; use alpha = 0 to disable the background colour.
keys Keywords to describe which servers are in this category.
Possible key types:

Key Key description
IP IP address of a server; partial addresses can be used. Example:

11.22.33 - matches all servers whose IP starts with that string
IP:port IP address and port of a server. Example: - matches the server with that IP and port
serverdescription Description of a server; partial strings are possible. Example:

ABC - matches all servers that have "ABC" as a part of the server description

Notes: The "serverdescription" key is case sensitive for showonlyfavourites = 0 and case insensitive when it's > 0 (for example, showonlyfavourites is > 0, when you select "Show servers of this category" from the menu, where you can edit selected favourites).
%mapname Map name; partial names possible. Examples:

%desert - matches all servers with "desert" in the currently played map's name (for example: ac_desert, ac_desert2, ac_desert3, apollo_desertcity)

%gema - matches all servers with gema maps currently being played
#gamemode Number of a game mode. Example:

#5 #13 #14 #15 - matches all servers with flag modes currently being played
>ping Matches servers with a ping above the given number. Example:

>350 - matches all servers with a ping >350
$cubescript Name of an alias to check, for the server to be in the category. Example:

$offmap - matches all servers with an official map currently played

Definition of "offmap" alias (see it in favourites.cfg): offmap = [ (+ 1 (findlist $defaultmaps $arg1)) ]

Notes: cubescript aliases can be used to check more complicated conditions. The alias gets the server properties as arguments, and has to return non-zero for the server to be placed in the category:
  • arg1: mapname,
  • arg2: gamemode number,
  • arg3: ping,
  • arg4: minutesremaining,
  • arg5: number of players,
  • arg6: maxclients,
  • arg7: IP,
  • arg8: port,
  • arg9: pongflags - bit-coded:
    • bit 0: passworded,
    • bit 1: banned,
    • bit 2: blacklisted,
    • bit 6: mastermode.

In the category:
  • you can prefix a key with '!' to invert its meaning,
  • you can prefix a key with '+' to match only populated servers,
  • if several keys are specified (separated by spaces), all servers that match _any_ of the keys are placed in the category.
ignore 1: disable this category, 0: enable it
image Path to the image which is displayed in serverbrowser instead of a tag (for example: packages/misc/heart.png)

Example category definition

Below is an example definition of a category. More examples are contained in favourites.cfg.
You don't have to use all the attributes; you can use only those which you need to define.

            addfavcategory LOVE
            sbfavourite_LOVE_desc = "Your real favourites"
            sbfavourite_LOVE_alpha = 20
            sbfavourite_LOVE_red = 0
            sbfavourite_LOVE_green = 100
            sbfavourite_LOVE_blue = 0
            sbfavourite_LOVE_weight = 255
            sbfavourite_LOVE_image = packages/misc/heart.png

© Copyright, Rabid Viper Productions
We would be grateful for any donations considered towards AssaultCube