Advanced use of Enemy-Territory under Linux howto !

What is the subject of this howto ?

This document explains some tricks of configuration for the enemy territory linux player. There is no information about the game itself or about the installation and the configuration of the graphic card. We strongly recommend you to read the following website if you want to discover Enemy-Territory and to learn how to install it under Linux.

For the rest of this document, we will consider that you know how to play Enemy-Territory and that you have some basic knowledge on linux.

How can I use TeamSpeak with Enemy-Territory ?

First of all, we have to know the capabilities of your computer's sound card. Just type the following line :

cat /proc/asound/pcm
  1. First case: You have a multi-playback soundcard (playback value must be greater than one).

    00-00: emu10k1 : EMU10K1 : playback 32 : capture 1
    00-01: emu10k1 mic : EMU10K1 MIC : capture 1
    00-02: emu10k1 efx : EMU10K1 EFX : capture 1
    00-03: emu10k1 : EMU10K1 FX8010 : playback 8

    You just have to explain to alsa-oss how to dispatch the applications. Just type :

    echo "et.x86 0 0 direct" > /proc/asound/card0/pcm0p/oss
    echo "et.x86 0 0 disable" > /proc/asound/card0/pcm0c/oss
  2. Second case: You do not have a multi-playback soundcard (playback is equal to one).

    00-00: Intel ICH : Intel 82801DB-ICH4 : playback 1 : capture 1
    00-01: Intel ICH - MIC ADC : Intel 82801DB-ICH4 - MIC ADC : capture 1
    00-02: Intel ICH - MIC2 ADC : Intel 82801DB-ICH4 - MIC2 ADC : capture 1
    00-03: Intel ICH - ADC2 : Intel 82801DB-ICH4 - ADC2 : capture 1
    00-04: Intel ICH - IEC958 : Intel 82801DB-ICH4 - IEC958 : playback 1

    You have to use a sound daemon with the mmap support.
    For example, you can use aRts as follow :

    artsd -d -a oss -l 3
    artsdsp -m TeamSpeak
    artsdsp -m et

    Unfortunately, it doesn't work on 64bits platforms.

How can I use the first line of an azerty keyboard ?

A well known problem of Enemy-Territory is that the first line of an azerty keyboard is not handled correctly. To solve this problem, we propose here to use xmodmap. The idea is to modify the keyboard configuration for this line just before launching Enemy-Territory and to reset the configuration after. Enemy-Territory will consider the line like the line of a qwerty keyboard.

First of all you have to register the following lines in a file called etXmodmap and saved them in your .etwolf directory.

keycode  10 = 1 exclam
keycode  11 = 2
keycode  12 = 3 quotedbl
keycode  13 = 4 apostrophe
keycode  14 = 5 parenleft
keycode  15 = 6 minus
keycode  16 = 7
keycode  17 = 8 underscore
keycode  18 = 9
keycode  19 = 0
keycode  20 = parenright
keycode  21 = equal plus
keycode  49 = twosuperior

Then use the following script to launch Enemy-Territory. You can call it myET and can place it in your bin directory.

#!/bin/sh -u

#Enter here the localisation of your ET installation 

xmodmap "$HOME/.etwolf/etXmodmap"

cd "$ET_PATH"
#We launch etpro directly remove "+set fs_game etpro" if you simply want to launch ET
./et.x86  +set fs_game etpro "$@"  

setxkbmap fr #or fr-latin9
xmodmap "$HOME/.Xmodmap"

How can I minimize Enemy-Territory ?

There are three solutions :

  1. The first one is quite simple : during the game you just have to open the console with and to press Alt+Enter.

  2. The second one is more complicated but is faster. You have to use the given script to launch Enemy-Territory in a separate X server and so you will be able to switch from Enemy-Territory to your desktop by using the CTRL+ALT+F7 and CTRL+ALT+F8 keys. You can call this script myET and you can save it in your bin directory.

    #!/bin/sh -u
    #Enter here the localisation of your ET installation 
    #We give the autorisation to launch a window from the current X server (:0) 
    # to our future new X server (:1) 
    MIT=`xauth list | grep  'unix:0' | head -n 1 | grep -o 'MIT-MAGIC-COOKIE.*'`
    xauth add :1 $MIT
    cd "$ET_PATH"
    #We launch etpro directly remove "+set fs_game etpro" if you simply want to launch ET
    xinit "$ET_PATH/et.x86" +set fs_game etpro "$@" -- :1 &
    xmodmap -display :1 "$HOME/.Xmodmap"
    #Uncomment the line below if you want the support of azerty keyboards (see section above) 
    #xmodmap  -display :1 "$HOME/.etwolf/etXmodmap"

    Notice : this script does not work if you use the dualhead of an ATI graphic card.

  3. The last solution, but probably the best one, is to use etswitch :
    Go to the etswitch website to have more details.

How can I make an Enemy-Territory movie ?

There is no real differences between the creation of an Enemy-Territory movie under Windows or under Linux. To make a movie is hard, we strongly recommend you to read the following website : eng - fr and to use a video editing tool (e.g. avidemux).

  1. The first step is to have a good configuration file to produce beautifull screenshots, you can find the geek config file for movies here.

  2. The second step is to convert the screenshots into an .avi file. The more simple solution is to use mencoder of the mplayer project. In most of the case, x264 is the best codec and eq2 is the best filter to increase the luminosity, the contrast and the colors of the screenshots.

    In the command lines above, we consider that the screenshots resolution is 856x480, that the frame rate is 30 and that the bitrate is 5000. The values passed to the eq2 filter are only examples for the goldrush map, you have to choose your own values for each map of the game.

    First encoding pass :

    mencoder "mf://shot*.tga" -mf w=856:h=480:fps=30:type=tga \
          -ovc x264 -x264encopts \
          pass=1:subq=6:4x4mv:8x8dct:me=3:frameref=15:bframes=3:b_pyramid:weight_b \
          -vf eq2=1.00:1.48:0.22:2.20:1.0:1.0:0.94 \
          -o outputx264.avi

    Second encoding pass :

    mencoder "mf://shot*.tga" -mf w=856:h=480:fps=30:type=tga \
          -ovc x264 -x264encopts \
          pass=2:bitrate=5000:subq=6:4x4mv:8x8dct:me=3:frameref=15:bframes=3:b_pyramid:weight_b \
          -vf eq2=1.00:1.48:0.22:2.20:1.0:1.0:0.94 \
          -o outputx264.avi
  3. Last step, you can add a cool music.

    mencoder -oac copy -ovc copy -audiofile music.mp3 outputx264.avi  -o outputx264music.avi
j2s2, SOz and tty of [geekjide]