Het forum

TrackMania Nations Forever

for now absolutely free game

Auteur Antwoorden
chain2k Vrijdag 16 Mei 2008 om 22:05

Version of wine : 0.9.58
Distribution : Ubuntu
Version of the distribution : 8.04 (Hardy)
Graphics card : GeForce4 420 Go 32M/AGP/SSE2 (also tested with GeForce 7600 and 8800 GTS)
Drivers of the graphics card : 96.43.05
Comments : Works like a charm and music too. Tested all extreme game settings, only with BLOOM enabled screen get a strange look, all others ok.

Today I've read that Trackmania became absolutely free game and create installer for it.
So as the installer is more than 500 Mb, I added option to use manually downloaded installer. In script I used language variables so its easy to translate it (don't know if u fixed the bug with cyrillic symbols in scripts, so I didn't add russian translation). And I made a video capture of running game thanx for capture plugin) That was too hard for my little old notebook to do 2 things at once so you'll see the game is little slow, but when I play it without capture it runs fast enough.

So that is last version of the script from 26.05.08:

if [ "$PLAYONLINUX" = "" ]
exit 0
source "$PLAYONLINUX/lib/sources"


presentation "TmNationsForever" "Nadeo - www.nadeo.com" "http://www.trackmania.com/" "chriswill and chain" "TmNationsForever"

# Preparing translations
LNG_TM_PRESENT="A FREE game in the truest sense of the word, TrackMania Nations Forever lets you drive at mind-blowing speeds on fun and spectacular tracks in solo and multiplayer modes. Nations Forever will offer a new "Forever" version of the Stadium environment, a solid solo mode and 65 brand new, progressively difficult tracks. TrackMania Nations Forever will unite an even larger number of players than the original Nations thanks to its engaging multiplayer modes, innovative online functions and revolutionary interactivity between players."
LNG_TM_CHOOSE="Choose already downloaded installer"
LNG_TM_URL="Open link in default browser to download installer manually"
LNG_TM_WAIT_END="Click on "Next" after downloading and then indicate where the installer has been stored"
LNG_TM_URL_MESS="Please, choose preferable mirror on the page that will be displayed and download the client."
LNG_TM_ERROR="You have to choose ONLY tmnationsforever_setup.zip or tmnationsforever_setup.exe"
LNG_TM_DEFAULT="Please, use default directory 'C:\Program Files\TmNationsForever' in windows installation dialog and uncheck option to launch the game on finish."
LNG_TM_DX="To run the game properly, we need to install:
- DirectX
- change wrap_oal.dll."
LANG_TM_DOWN_DX="Downloading DirectX"
LANG_TM_DOWN_DLL="Downloading wrap_oal.dll"
LANG_TM_LAST="Installation finished. If you have a troubles with TrackMania try to disable the EAX sound effects and set quality of the sound to low on the game settings. You can also disable the doppler effect. You can safely try any game options but sometimes bloom effect can give a strange look for the game graphics."
LANG_TM_CANCEL="Script canceled"

LNG_TM_PRESENT="Véritable jeu gratuit, TrackMania Nations Forever vous propose de conduire à pleine vitesse des bolides sur des circuits amusants et spectaculaires, en solo comme en multijoueurs. Vous proposant une nouvelle version "Forever" de l’environnement Stadium , dotée d’un solide mode solo avec 65 circuits inédits à la difficulté progressive, TrackMania Nations Forever rassemblera un très grand nombre de joueurs grâce à ses modes multijoueurs captivants, ses fonctionnalités en ligne innovantes et une interactivité révolutionnaire entre les joueurs..."
LANG_TM_PRESENT_TITLE="Présentation du Jeu"
LNG_TM_CHOOSE="Choisir le programme d'installation précédemment téléchargé"
LNG_TM_URL="Ouvrir un lien dans votre navigateur afin de télécharger manuellement le programme d'installation"
LNG_TM_WAIT_END="Cliquez sur "Suivant" dès que le téléchargement est terminé.
Vous indiquerez ensuite l'endroit où le programme d'installation a été enregistré"
LNG_TM_URL_MESS="Veuillez choisir un site de téléchargement sur la page web qui va apparaître et téléchargez le programme d'installation."
LNG_TM_ERROR="Veuillez seulement choisir tmnationsforever_setup.zip ou tmnationsforever_setup.exe"
LNG_TM_DEFAULT="Veuillez garder le répertoire d'installation donné par défaut 'C:\Program Files\TmNationsForever'
et décocher l'option 'lancer le jeu' à la fin de l'installation."
LNG_TM_DX="Afin que le jeu puisse fonctionner correctement, il est nécessaire:
- d'installer Directx
- de changer wrap_oal.dll ."
LANG_TM_DOWN_DX="Téléchargment de DirectX"
LANG_TM_DOWN_DLL="Téléchargement de wrap_oal.dll"
LANG_TM_LAST="L'installation est terminée. Si vous rencontrez des problèmes lors de l'utilisation du jeu, essayez de desactiver le son EAX et de mettre la qualité du son à "basse", dans les options de jeu. Vous pouvez également désactiver l'option doppler. Vous pouvez essayer en toute sécurité les différentes options du jeu mais il peut arriver que, de temps en temps, l'option bloom change étrangement l'apparence du jeu."
LANG_TM_CANCEL="Annulation de l'exécution du script"
#define variable for wine version to easy change it later

# define function to remove tmp directories if script canceled
fin_tm ()
message "$LANG_TM_CANCEL" "$LANG_TM_FIN" 0 0 0 "" "$LANG_TM_FIN"
rm $REPERTOIRE/tmp/TmNationsForever/ -r
rm $REPERTOIRE/wineprefix/TmNationsForever -r
exit 0

#define function to really cancel the script execution
cancel_tm ()
if [ "$?" = "1" ]

# define function to check the file for installation
cd $HOME
INSTALLFILE=$(select_file "$LNG_LI_INSTALLFILE" "" 2 9 1)
if [ "$INSTALLFILE" != "$WORKINGINSTALLDIR/tmnationsforever_setup.exe" ]
if [ "$INSTALLFILE" != "$WORKINGINSTALLDIR/tmnationsforever_setup.zip" ]
error "$LNG_TM_ERROR" "" 0 0 1 "" ""
run_and_wait "$LNG_SCRIPT_WAIT" "unzip $INSTALLFILE -d $REPERTOIRE/tmp/TmNationsForever" "" 3 9 1

# define function for checking if /WineVersions/0.9.58 is empty,
# there was a bug when POL can't properly unpack wine versions
# so we have to be sure that ./wine is present.
if [ ! -e "$REPERTOIRE/WineVersions/$WINE_VER_TM/usr/bin/wine" ]
rm $REPERTOIRE/WineVersions/$WINE_VER_TM/ -r

# change language
case "$POL_LANG" in

# prepare tmp
if [ -d "$HOME/.PlayOnLinux/tmp/TmNationsForever/" ]
rm $HOME/.PlayOnLinux/tmp/TmNationsForever/ -r
mkdir -p $REPERTOIRE/tmp/TmNationsForever

# choice to download or use already downloaded distribution
down=$(menu "" "$LNG_TM_URL"~"$LNG_TM_CHOOSE" "" 1 9 1 "" "~")
case "$down" in
message "$LNG_TM_URL_MESS"
browser "http://www.trackmania.com"
message "$LNG_TM_WAIT_END"

# prepare executable,create prefix and run installation
select_prefixe "$HOME/.PlayOnLinux/wineprefix/TmNationsForever/"
creer_prefixe 4 9 1
Set_OS "win2k"
Set_WineVersion_Session "$WINE_VER_TM"

attention "$LNG_TM_DEFAULT" "" 5 9 0

wine "tmnationsforever_setup.exe"

cd $REPERTOIRE/tmp/TmNationsForever

# directx and windows dll's installation
message "$LNG_TM_DX"
download "$LNG_DOWNLOADING" "$SITE/divers/dx9/dx9.tar.gz" "$LANG_TM_DOWN_DX" 6 9 0
run_and_wait "$LNG_WAIT" "tar -xvf dx9.tar.gz" "" 7 9 0 "" 1
wine ./DXSETUP.exe
download "$LNG_DOWNLOAD" "http://www.dllbank.com/zip/w/wrap_oal.dll.zip" "$LANG_TM_DOWN_DLL" 8 9 0
run_and_wait "" "unzip wrap_oal.dll.zip" "" 0 0 0 "" 1
cp -f wrap_oal.dll $REPERTOIRE/wineprefix/TmNationsForever/drive_c/Program\ Files/TmNationsForever/wrap_oal.dll

# add registry entries to disable pixel shaders
echo "[HKEY_CURRENT_USER\\Software\\Wine\\Direct3D]" > $REPERTOIRE/tmp/TmNationsForever/reglages.reg
echo "\"PixelShaderMode\"=\"disabled\"" >> $REPERTOIRE/tmp/TmNationsForever/reglages.reg
regedit reglages.reg
# clear temporary files and directories
rm $REPERTOIRE/tmp/TmNationsForever/ -r
cd $DESKTOP && rm -f TmNationsForever.desktop

# create launcher and finish
creer_lanceur "TmNationsForever" "Program Files/TmNationsForever/" "TmForeverLauncher.exe" "TmNationsForever" "TmNationsForever"
Set_WineVersion_Assign "$WINE_VER_TM" "TmNationsForever"
attention "$LANG_TM_LAST" "$LANG_TM_FIN" 9 9 0 "" "$LANG_TM_FIN"
exit 0

And there is the game icon

so I can give the game 5 from 5 for now

Aangepast door chain2k

Quentin PÂRIS Vrijdag 16 Mei 2008 om 23:52
Quentin PÂRISAnonymous

Did you tried the accepted script ?
chain2k Zaterdag 17 Mei 2008 om 1:39

you mean that script?
yes and with full download from script ( very slow) and with manually choose the installer, i've downloaded it with multithread manager
it looks very unreadable in the forum, you can check it in my scripts for validation

Aangepast door chain2k

chain2k Zaterdag 17 Mei 2008 om 2:22

yep, all is ok, checked it right now with copy paste from here, for sure with already downloaded installer
may be some grammar mistakes in english.. but someone better can check it)
and i'll test another mirrors for more faster downloading
chain2k Zaterdag 17 Mei 2008 om 16:45

made some changes to easy downloading and pare of functions to make script clear and really exit on "cancel" and 'case' instead 'if-else' in user choice.
i'll post it there and will made changes in "scripts" page.
check the first message with last version

Aangepast door chain2k

chain2k Zondag 18 Mei 2008 om 0:54

Today I tested it on another more faster computer with NVidia GeForce 8800 GTS. All settings to maximum, except audio and shader version, with shader higher than 2.0 text in menu became unreadable, so i'll add comment to script.
that is test video on youtube, you can see here bad sound but that is because of video capture, when I just play the game without capture all is wonderfull.
TomLottermann Donderdag 22 Mei 2008 om 13:45

Thanks for that script!
It works extremely well (except for the sound but that is a wine issue) on my mashine.
The only thing that happenes is, that my mashin freezes when I close TMNF... But I put the whole thing on a virtual desktop, and everything works fine ;)
The official one din't work for me at all.
Thanks a lot for that great script ;)
chain2k Donderdag 22 Mei 2008 om 14:07

thanx for testing)
so if it can freeze, i'll add an option to use virtual desktop by default
TomLottermann Donderdag 22 Mei 2008 om 15:06

Oh yeah. That's a great idea! ;)
chain2k Vrijdag 23 Mei 2008 om 1:12

hi again!
Bad news.. first time I didn't understand you:

The official one din't work for me at all.


And strange Tinou's reaction ...
There are no script for trackmania in my local POL repo... I renewed it, and there are still no that script...
Ok. I've decided to check french forums... and found out that chriswill already created the script for this game and early than me.. After that I checked scripts published on the site and found chriswill's script there.. So pity.. I'm looser))
But you told me my version works for you and I'm feeling better.

Now GOOD NEWS! For now sound works))
I'm cool, I'm sooooo cool! I'm damn little hero)
I've checked the site of OpenAL developers and found there that there are two libraries, not only OpenAL32.dll. After testing I discovered that OpenAL32.dll that installed with the game is ok! problem was in the second library. For now that game more closer to gold, I think)
I'm feeling goooood That is the second game problem resolved by myself. If you like MMORPG you can check another here:

So you can check new script at the first message.


Aangepast door chain2k

chain2k Vrijdag 23 Mei 2008 om 10:33

I'll delete old versions, only last will stay here
chain2k Zaterdag 24 Mei 2008 om 12:56

After hard and long tests now I know that only wine version for that game without bugs is 0.9.58.
Great thanx to chriswill and french forum. So I changed script:
clean code,
remove autodownload option, because mirrors slow and fastest use antileech,
added check for wine versions (beause of the bug in older POL versions directory with wine version can be empty, but game need in 0.9.58 only),
make it easy to translate in any language,
changed windows version to win2k,
disabled pixel shaders to prevent menu problems,
and so as I know that this version is absolutely stable, I removed virtual desktop from default options.

If someone with ATI videocard will successfully test it, I think that Game can get 5 from 5 in POL rating.

Aangepast door chain2k

chain2k Maandag 26 Mei 2008 om 0:28

added french translation and remove some unnecessary messages.(thanx chriswill).