Tremfusion.net

Features list

From TremFusion

Contents

Server and Client Features

Aliases

Author: Amanieu

Support for aliases in the client and the server. Aliases are saved to autogen.cfg when changing maps. You can't make an alias to itself.

Commands:

  • `alias <name> <exec>`: creates an alias called `<name>` that executes `<exec>`
  • `alias <name>`: Shows what `<name>` is an alias for
  • `unalias <name>`: Removes the alias `<name>`
  • `aliaslist`: Lists all existing aliases
  • `clearaliases`: Removes all existing aliases

Aliases can have arguments to them, for example:

alias lol echo hi
lol ==> echo hi
lol world ==> echo hi world

Scripting Features

Author: Amanieu, wireddd, MikaYuoadas

Script arguments

The entire command line is stored `arg_all`.

Individual arguments are stored in `arg_?` where ? is the arg number starting from 1.

The number of arguments is stored in `arg_count`.

For example:

  • `exec test.cfg hello`: `arg_count = 1, `arg_1` = "hello", `arg_all` = "hello"
  • `exec test.cfg hello world`: `arg_count` = 2, `arg_1` = "hello", `arg_2` = "world", `arg_all` = "hello world"
  • `exec test.cfg`: `arg_count` = 0, `arg_all` = ""

Cvar Substitution

Cvar contents can be insterted into a command (server/client commands and scripts).

The syntax for substitution is `\$cvar_name\` including the quotes.

For example:

exec setvar.cfg 1 0

setvar.cfg:

set g_allowVote \$arg_1\
set g_allowShare \$arg_2\

This function can be used to pass arguments from an admin command to a script:

exec = exec test.cfg \$arg_all\

Note 1: cvar substitution is done before the command line is split into args so argument count could be affected if the cvar contains a space.

Note 2: cvar substitution is done from the begining of the command to the end. So `\$g_unlagged\$g_allowVote\` will become `1$g_allowVote\`.

Note 3: if a cvar doesn't exist it won't be substituted and will be left as it is. So `\$dd\` will stay `\$dd\` in the command.

Note 4: you can use \$$cvar\ in a bind command so that the cvar will be parsed when the bind is executed, and not when it is made.

The `math` command

Commands:

  • `math <variableToSet> = <value1> <operator> <value2>`
  • `math <variableToSet> <operator> <value1>`
  • `math <variableToSet> ++`
  • `math <variableToSet> --`

Valid operators are + - `*` /

The `if` command

/if <value1> <operator> <value2> <cmdthen> (<cmdelse>)

Compares the first two values and executes <cmdthen> if true, <cmdelse> if false.

Valid operators are = != < > >= <=

The `strcmp` command

strcmp <string1> <operator> <string2> <cmdthen> (<cmdelse>)

Compares the first two strings and executes <cmdthen> if true, <cmdelse> if false.

Comparison is case-sensitive.

Valid operators are = and !=

The `concat` command

concat <dest> <cvar1> <cvar2> ...

Concatenates all of the listed cvars and stores the result in `dest`.

The `random` command

random <dest> <value1> <value2>

Will generate a random integer between value1 and value2.

Lot's more cvars

Tremfusion supports up to 4096 cvars.


Some Fun Stuff /r_bloom /r_celoutline (Author Geophray)

Less spam in console during map change

Author: Amanieu

Now you don't need to scroll through 20 pages of system info just to see who deconned the reactor at the end of the last map.

The `delay` command

Author: Kangounator, bob0

Usage:

`delay (name) <delay in milliseconds> <command>`
`delay (name) <delay in frames>f <command>`

Executes `command` after the delay without blocking, optionally assigning a name to the delay. Delays can the be removed with `undelay` and `undelayAll`.

/which command

Author: Amanieu

/which will show where a file was loaded from.

IPv6

Author: tma, Thilo (ioquake3 commiter)

TremFusion fully supports IPv6 (merged from ioquake3).

Curses console

Author: Amanieu, based on the previous work of griffon

The new ncurses console has many improvements over the existing tty console, such as:

  • A colorfully decorated UI
  • A text buffer in which has scrolling, moving the cursor around, delete key support, etc
  • A scrolling log

Improved History

Author: Amanieu

The new history system unifies the terminal console and the client console, and also provides a much more intelligent history entry handling.

New PowerPC QVM Compiler

Author: Przemyslaw Iskra

The new QVM compiler for PowerPC support both 32 bit and 64 bit PowerPC and is faster than the existing one.

The fs_autogen Cvar

Author: Amanieu

The fs_autogen cvar allows you to select a different file to use as autogen.cfg.

SSE and SSE2 optimizations

Author: gimhael, modified by Amanieu

Tremfusion support the use of SSE and SSE2 instruction on x86 and x86_64. They are disabled by default on x86 for compatibility reasons, but you can enable them by recompiling Tremfusion with USE_SSE=1 for SSE1 support or USE_SSE=2 for SSE2 support.

VoIP

Author: icculus (ioquake3 commiter), with some enhancements by benmachine and Google

TremFusion supports VoIP directly and through Mumble (merged from ioquake3). See [wiki:VoIPInstructions TremFusion's VoIP Instruction Page] for more information on how to get it working. In addition to the above, you can set cl_voipSendTarget to "team" to talk to your team only. /voip help will give you a list of all availible commands. `cl_voipDefaultGain` will allow you to set the default gain for all clients.

Split autogen.cfg

Author: Amanieu

A common autogen.cfg is stored in the homepath and contains all of the client/server cvars. A mod-specific autogen.cfg is stored in the mod folder, and contains qvm and user-created cvars, aliases and binds. The `exec` command has also been modified to execute the mod-specific file and then the global one.

If you wish to return to a client which doesn't have this feature, you will have to copy the contents of the global autogen.cfg into the one in the 'base' subfolder.

Clock and timestamps

Author: Amanieu

A clock has been added in the ncurses console and the client console. Timestamps can be added to the console by toggling com_timestamps.

Symlink support

Author: unknown

Taken from Trem 1.1 svn

A common setup on UNIX platforms is to have a symlink to the actual Tremfusion executable in one of the `PATH` folders. Previously, there were issues because this caused the game to fail to find the location of the game data. This has been fixed in Tremfusion by reverting to the Tremulous 1.1 behaviour.

The `toggle` command

Author: DevHC and benmachine

Usage:

toggle <varname> <value> ...

This function will toggle a given cvar's value between the specified strings.

For example:

toggle cl_shownet -2 -1 0 1 2 3 4

That will change the printed net info verbosity. If the cvar was set to 0, then the next value it will be set to is 1.

Client Features

SMP support

Author: Original code from idq3, fixed by Amanieu and Tr3b

Tremfusion can take advantage of multiple CPU on all platforms by running the renderer in a separate thread.

VBO support

Author: gimhael

Tremfusion will take advantage of vertex buffer objects to improve rendering performance.

/search and /searchDown commands

Author: Amanieu

These commands will scroll the client console to find the words you are looking for.

Alt + Tab

Author: Amanieu, based on a patch by TJW

On Linux & Mac: Press the Alt and Tab keys to minimize Tremulous.

On Windows: Press the Windows key to minimize Tremulous.

Server list cleanup

Author: Critux

If `cl_cleanHostNames` is set to 1 then:

  • Non-printable characters (boxes) are removed from host names
  • Black characters are removed from host names
  • Leading spaces are removed from host names

s_alSourcePitch

Author: Champion

This cvar lets you adjust the pitch of every sound, but only when using OpenAL.

Specular Lighting

Author: Odin

Setting r_specularLighting to 1 will enable specular lighting for all entities and lightmapped shaders. The brightness can be controlled using r_specularLightingExponent.

Minimum Entity Light

Author: Odin

The minimum amount of lighting an entity has can be tweaked using r_minEntityLight. 1 is the previous default value, 0 allows entities to be completely black when in the shadows.

Client `messagemode5` command

Author: Critux

Bind `messagemode5` to a key to easily use admin chat.

Client `messagemode6` command

Author: Slacker

Bind `messagemode6` to a key to easily PM anyone in your clan. Set `cl_clantag` to your clan tag, must be between 3 and 10 characters.

Client `prompt` command

Author: Kangounator

Usage: `/prompt <callback> <prompt>`

This will display a chat box with the label `<prompt>`. When you press enter, the contents of the chat box will be stored in `ui_sayBuffer` and `vstr <callback>` will be executed.

Show black text in console

Author: benmachine

Makes black text show up as grey in the client console.

Download prompt

Author: risujin

You will be prompted to accept or reject downloads if a server asks for it. You can disable this using cl_showdlPrompt.

Support for accented characters and %

Author: Amanieu

If both the client and the server support it, accented characters and % will be allowed in chat.

Automatic nameloging

Author: Rezyn

If `cl_autoNamelog` is set to 1, !namelog will be executed each time a client connects.

Client logging

Author: Slacker

If `cl_logs` is set to a non-zero value, logs will be saved to `base/logs/<Date>.log`. Values of `cl_logs`:

1: logs will have prefix of 3 stars
2: logs will show game time
3: logs will show 24 hour system time
4: logs will show game and 24 hour system time

The www download URL override

Author: benmachine

Overrides the server's www download URL with the one provided in `cl_dlURLOverride`.

OGG Vorbis support

Author: ??

Allows the use of OGG encoded sounds ingame (maps, etc).

Freetype support with console extensions

Author: From idq3, fixed by Tr3b and ported to trem by Lakitu7 with some extensions to the console

By linking the Freetype library and reviving/fixing some old Q3 code, the Xreal guys got support for TTF/OTF fonts working for their clients. With the help of their bugfixes, I got it going in IOQ3/Tremulous, while adding back-compatibility to not break the old fonts. Further, I've also added the ability to use these fonts in the console, which as far as I know is an entirely new feature to any opensource Q3-engine game. Mods can make use of the feature by simply calling for the use of whatever font via its qpath from any .menu file. Regular users can use it to modify their console font by using the cl_consoleFont cvar. To use, place the ttf/otf files in your base directory, or optionally a subdirectory of base. For example, I put mine in Program Files\Tremulous\base\fonts\example.ttf and set cl_consoleFont "fonts/example.ttf" Also available are cl_consoleFontSize and cl_consoleFontKerning (the distance between characters: negative values are allowed) cvars to tweak these. Fonts placed in pk3 files will not work on pure servers, so place them directly if you want them to do so. If you would like a nice set of free fonts, I recommend those available here: http://savannah.gnu.org/projects/freefont/. I also recommend using boldface fonts as they generally look better in console. cl_consoleFont defaults to "" (blank), which will use the regular console font you're used to. Note that this patch adds the additional requirement that you have the Freetype library/dll available. Linux users should already have this in most cases. Windows users can download it from wherever this client is located. When building from source, you will need to have these libraries (which are available for mingw here: http://sourceforge.net/project/showfiles.php?group_id=204414) or you can disable the feature entirely by building with USE_FREETYPE 0 in the makefile.

Messagemode extension

Author: benmachine

Allows the `messagemode` commands to accept arguments. For example:

/messagemode Hello

will show up as:

Say: Hello

This also applies to the `messagemode2`, `messagemode3`, `messagemode4`, `messagemode5` and `messagemode6` commands.

Stereo Rendering

Author: Thilo

TremFusion has stereo rendering capabilities (merged from ioquake3), which allows you to play the game with 3D glasses. See http://wiki.ioquake3.org/Stereo_Rendering for more information.

Bloom

Author: Harekiet

You can enable bloom by setting the `r_bloom` cvar to 1. Other bloom options can be set through the `r_bloom_*` cvars.

Cel-shading

Author: Jordi Prats Catala and Guillermo Miranda Alamo

This adds two cvars: `r_celoutline` and `r_celshadalgo`, which allow you to enable/disable the Cel-Shading effect.

`r_celshadalgo` options:

1: kuwahara
2: blur & kuwahara
3: kuwahara & blur
4: blur & kuwahara  & blur
5: snn
6: blur & snn
7: snn & blur
8: blur & snn & blur

Protection from malicious qvms

Author: Amanieu

This patch prevents autodownloaded evil qvms from destroying your computer.

1.1 compatibility fixes

Author: Amanieu, Slacker

A few hacks to make all the 1.1 stuff work:

  • Sort by ping works
  • Favorites menu fixed
  • 1.1 resolution menu works
  • r_custom* cvars work
  • Windows will use both the path in Local Settings and the one in Application data
  • If qkey is not found in homepath, search in base folder
  • Use www download even if the server didn't set sv_dlURL, but set sv_wwwDownloadURL
  • Color codes work just like in 1.1

Console changes

Author: Amanieu, Google

The contents of the console field will persist across toggles and map changes if `cl_persistantConsole` is set to 1.

The backgroud color of the console can be set using the following cvars:

  • `scr_conColorRed`
  • `scr_conColorGreen`
  • `scr_conColorBlue`
  • `scr_conColorAlpha`

You can optionally choose to use a shader for you console background. Set `scr_conUseShader` to 1 and define a shader called `console`.

You can set the fraction of the screen that the console uses using the `scr_conHeight` cvar. 100 is the whole screen and 0 is nothing.

You can also change the color and thickness of the bar that delimits the bottom edge of the console using the following cvars:

  • `scr_conBarColorRed`
  • `scr_conBarColorGreen`
  • `scr_conBarColorBlue`
  • `scr_conBarColorAlpha`
  • `scr_conBarSize`

The size of the console buffer has also been doubled to allow for more scrollback.

Colors will show up automatically while typing in the console or in a chat field.

Interactive TTY support for clients

Author: Amanieu

If you start TremFusion from a terminal you can minimize the game and continue interacting with it through the terminal, just like a dedicated server.

You can also choose to use a tty-only client, which is availible on Linux, Mac and Windows. To connect to a server you will have to use /connect with the ip and port of the server. You will only be able to use console commands in the game. Although this doesn't allow you to play, it is a very practical way of connecting to a server just to chat or to admin.

VoIP Sender

Author: Google, enhanced by Amanieu

Set `cl_voipShowSender` to 1 to show the name of the person currently talking using VoIP. Use the `cl_voipSenderPos` cvar to change the location on the screen of the name.

The `mapinfo` and `lastvote` commands

Author: Google

`mapinfo` will print the title of the current map.

`lastvote` will print the last vote that was called, even if you weren't in the map.

The `grep` command

Author: Amanieu

`/grep <string>` will search through the console log and will output any line that contains string.

Automatic version information

Author: Amanieu

At the bottom right side of the server list you will see a message that gives you the latest TremFusion version. You can compare it with your version by looking at the version number at the bottom-right of the console.

Team-autoexec and demo-autoexec config files

Author: Lakitu7

If you set the corresponding cvars, your client can automatically execute a config file for you when you change teams and/or when you play demos. People have been doing this with creative use of binds for years, but this works more intuitively/automatically and also doesn't break when you use /team auto or !putteam etc. The cvars all default to blank, which disables the feature. Set them to the name of a .cfg file (eg: "aliens.cfg") in your base directory and it will be /exec-ed upon these events. These files will never be written to.

cl_humanConfig
cl_alienConfig
cl_demoConfig
cl_spectatorConfig

s_muteWhenUnfocused

Author: Lakitu7

I made this patch because I thought that the (already-in-SVN) cvar s_muteWhenMinimized was unbroken because my sound didn't mute when I alt-tabbed out of Tremulous. However, that one only works when the game is in windowed mode and then actually *minimized*. Thus, I made a s_muteWhenUnfocused that supercedes that cvar and can produce the behavior that I had expected. Perhaps you will find it useful too.

The `cl_defaultUI` cvar

Author: Amanieu, with some help from f0rqu3

Set the `cl_defaultUI` cvar to the name of the mod from which you would like to use the main menu. For example, you may want to use the TremX menus by default because they don't have the annoying backgroud music.

Demos automatically switch to the correct fs_game

Author: Amanieu

Demos will now automatically switch to the correct mod, so you won't get those "client/server base/tremx mismatch" error messages.

Server Features

Server-side demos

Author: Amanieu

This allows a server to record games and the play them back later. When demos are played, people can spectate the game from different perspectives, but cannot join teams.

Cvars:

  • `sv_autodemo`: Set to 1 to automatically record a demo at the start of each map
  • `sv_demostate`: Current demo state: 0 = none, 1 = playing, 2 = recording
  • `sv_democlients`: Must be >= to the value of sv_maxclients used when recording a demo in order to play it

Commands:

  • `demo_record <name>`: Records a demo
  • `demo_play <name>`: Plays a demo
  • `demo_stop`: Stops playing/recording a demo

Note: For proper demo recording and playback, you should use a patched qvm. This patch is planned for inclusion in p-g-qvm, I do not know for other qvms.

The `redirectClient` command

Author: Amanieu

Executes a server command and redirects all of the output to a specific client. Useful for admin.dat scripts.

Usage:

`redirectClient <clientNum> <command>`
`clientNum` = -1 for all clients.

Unlagged field in getinfo requests

Author: Amanieu

This will allow clients with a custom ui to add an "unlagged" column to the server list, for easy identification of lagged and unlagged servers.


RCON log

Author: DavidSev

Enable it by setting sv_rconLog to a filename (such as rcon.log). The file will appear in the server's fs_home/fs_game directory and log all rcon usage and attempts in the following format (example):

09/08/08 17:29:49  Rcon from 76.114.18.200: echo test
09/08/08 17:48:59  Bad rcon from 76.114.18.150: shutdown
09/08/08 17:49:02  Bad rcon from 76.114.18.100: !help

As part of this patch, rcon usage messages to the server console will also include the arguments used/attempted.