List of Commands

  • Hello,

    Playing the other night, and started playing with commands, and getting help from some of the players that have played constantly for the past however many years. One of the main commands we were playing with was #animoverride which was a lot of fun, tho not useful (It changes how the player's stance looks). Others, like #showclientnum 1 was useful...

    My question is is there a thread where all/ most of the commands are listed? if not can we share some fun and or useful ones on this thread??

    Thank you, Cowboy

  • Some commands are server specific and they start with the "#", for example in the pasta servers like Rigatoni and Spirit of Pasta you just need to type #help and you get a list of possible commands.

    Some other commands are Sauer specific, they start with the "/", for example /showclientnum.

    Of course the main documentation and the Cube engine wiki are the starting place to look for information.

    Unfortunately I've never seen a complete list of the available commands, I usually look them up directly in the Sauer source code, which comes for free when you install the game. This might be daunting at first but you get to tune every single detail of the game so let me show you how to find these commands:

    • locate the folder where you installed Sauerbraten. Source files are there. What you want to open is the file src/shared/command.h
    • around line 262 you'll find this:
    // nasty macros for registering script functions, abuses globals to avoid excessive infrastructure
    #define _VAR(name, global, min, cur, max, persist)  int global = variable(#name, min, cur, max, &global, NULL, persist)
    #define VARN(name, global, min, cur, max) _VAR(name, global, min, cur, max, 0)
    #define VARNP(name, global, min, cur, max) _VAR(name, global, min, cur, max, IDF_PERSIST)
    #define VARNR(name, global, min, cur, max) _VAR(name, global, min, cur, max, IDF_OVERRIDE)
    #define VAR(name, min, cur, max) _VAR(name, name, min, cur, max, 0)
    #define VARP(name, min, cur, max) _VAR(name, name, min, cur, max, IDF_PERSIST)
    #define VARR(name, min, cur, max) _VAR(name, name, min, cur, max, IDF_OVERRIDE)
    • basically all Sauer commands that you can call are declared using "VARN", "VARNP", "VARNR", etc...
    • these command declarations are scattered around a few files in the Sauerbraten source files, so fire up your favorite text editor or IDE and have it search among all files in the "src" folder and subfolders for lines of text starting with "VARN", "VARNP", "VARNR" and so on.

    For example you might stumble upon these lines in the file scoreboard.cpp:

    VARP(scoreboard2d, 0, 1, 1);
    VARP(showservinfo, 0, 1, 1);
    VARP(showclientnum, 0, 0, 1);  
    VARP(showpj, 0, 0, 1);
    VARP(showping, 0, 1, 1);
    VARP(showspectators, 0, 1, 1);
    VARP(highlightscore, 0, 1, 1);
    VARP(showconnecting, 0, 0, 1);

    Now you just found the commands "scoreboard2d", "showserverinfo", "showclientnum", "showpj", etc.. and according to the "VARP" declaration we have seen before the 3 numbers following the name of the command are the minimum value, current value and maximum value the command can accept.

    There's plenty of commands. Some are useful, some are not. Have fun hunting them down.

  • This post is deleted!

Log in to reply