FAQ troubleshooting
From OpenTTD
FAQ series:
This article covers troubleshooting errors of OpenTTD. It is recommended that you try the latest nightly build, which is the very latest version of OpenTTD, before reporting a problem publicly. Often, the problem has been corrected already.
If you are experiencing errors even with the most recent build, you can run the game in debug mode. Run the game with the "-d1" flag in that case. Read more in the debugging section.
[edit] The game will not start because...
[edit] ...It complains about missing files
OpenTTD requires the graphics sets from Transport Tycoon Deluxe in order to function. Refer to the installation FAQ article and ensure you have followed the appropriate steps for your Operating System.
If you have not completed these steps sucessfully, you may see one of the following errors:
- 'Nix style OS (Linux, OSX, Morhops, etc.): Error: Cannot open file '/usr/share/games/openttd/data/sample.cat'
- Windows OS (Win98, Win2k, WinXP, etc.): Cannot open file '<OpenTTD Install Directory>\data\sample.cat'
NOTE: On *nix computers, if you copied the files from, say, a Windows partition as, say, "root" you may also have problems because you don't have the proper permissions to read the files as a normal user. (if this is the case, you can still run OTTD as root; you should probably fix the file permissions, though)
[edit] ...It crashes on Win98(SE)
- Windows98/98SE has problems with DirectX and DirectMusic. Try to start the game with:
openttd.exe -m win32
- Windows98/98SE has problems with DirectX and DirectMusic. Try to start the game with:
[edit] ...It outputs an error MD5 of <filename> is ****INCORRECT**** - File Corrupt
- This error comes about if you have a corrupt or changed GRF file. OpenTTD only checks the ones for the original TTD game, either DOS or Windows version, and if it finds that the file is corrupted, it presents this message. You should copy the file from your original TTD disk again.
- This message will also appear if you are using modified GRF files (but only if they modify the original TTD files). Other GRF's are not checked for corruption. The message was incorporated to make sure that any problems within the game are caused by the error you report rather than corrupt files on the disk.
[edit] ... it shows a white screen on MacOS X Leopard
- OpenTTD 0.6.0 running on Leopard has sometimes a problem with the color profile of the current display. Please make sure the at least one color profile is selected in the 'Monitor Preferences'. If that doesn't work, please create a new color profile by calibrating the old one. This is not a OpenTTD bug, it's more a Leopard bug and it's very rare.
[edit] When I start game in fullscreen mode, the refreshrate is changed to 60Hz! (Windows)
- It's because you haven't configured DirectX properly. Try to download "DirectX Control Panel" from microsoft.com, copy it into /windows/system32, open the dialog in the Control Panel, go to DirectDraw tab, and set the "Forced Refresh Rate" to the maximum what your monitor can show.
- You can set display_hz to have correct refreshrate. This item is in [win32] group of openttd.cfg.
[edit] When loading an older game my airports are screwed
- If you have used some nightly builds in the early era of development of larger airports, some of the indexes could be messed up. Again, this only applies if you have used nightly builds. Official releases cannot have this problem. Copy the code below somewhere to your OpenTTD source and call the function once. Most problems should be fixed. It could be that you only have a subproblem, eg. not all are faulty, then you need to filter on st->index (easiest to get by going to station_gui.c line 396 ("ScrollMainWindowToTile(DEREF_STATION(w->window_number)->xy);"), setting a breakpoint there. "w->window_number" is the index of the station.
void FixSVNVersion()
{
Station *st;
static bool only_once = true;
if (only_once) {
FOR_ALL_STATIONS(st) {
/* if you have not built any new types of airports since first release of SVN: *
* AT_HELIPORT 4 --> 2 *
* if (st->airport_type == 4) {st->airport_type = 2;} */
/* if you have not built any new types of airports since first release of SVN AND *
* oilrigs are screwed *
* AT_OILRIG 3 --> 5 *
* if (st->airport_type == 3) {st->airport_type = 5;} */
/* if you have built new types of airports since first release: *
* AT_METROPOLITAN 2 --> 3 *
* AT_INTERNATIONAL 3 --> 4 *
* AT_HELIPORT 4 --> 2 */
switch (st->airport_type) {
case 2: st->airport_type = 3; break;
case 3: st->airport_type = 4; break;
case 4: st->airport_type = 2; break;
}
}
only_once = false;
UpdateOldAircraft();
}
}
[edit] Cursor is hidden in fullscreen modes under Linux
- OpenTTD is playable in window mode.
- Ensure you have the latest ATi propetiary drivers installed correctly, follow this guide.
This bug has been recorded and can be tracked.
[edit] The Jukebox won't play any music/skips through tracks really fast
First of all, have you put all of the *.gm files into the 'gm' directory?
[edit] What 'gm' directory?
There should be one in the same directory as your OTTD program file. If there isn't, then create it and transfer the .gm files from your original TTD install/CD. If you only have the DOS version of the game, and you do not see any .gm files anywhere, then you may not have them. Sorry, no cheesy midi for you unless you find them elsewhere :(
[edit] I copied the files, still isn't working
It has been reported that the music will not play if you have any parent directories with spaces or special characters in them (eg. 'C:\\Program files\ottd\gm'). Try putting your install into a path without spaces and special characters (like é).
Also, there are sometimes issues with file permissions, especially if you have copied the files across direct from CD. Try setting all the file permissions to read/write:
- OS X; goto 'gm' directory, select all files [cmd]+[a], select file->'get info' (or [cmd]+[i]), under 'owner permissions' select 'read and write'.
- Windows; goto 'gm' directory, select all files [ctrl]+[a], select file->properties, uncheck 'read only'.
[edit] There is no sound or no music on Linux
This is a known issue for some systems. Only one application can send to the sound driver.
Try running the Timidity media player with commandstimidity -iAD -Osor
timidity -iA -OsThe -iAD is daemonized, while -iA is not-daemonized.
If you tried all the above and still didn't get sound you can try running "aoss openttd". It made the sound work for me. If that doesn't work. It's posible that your soundcard doesn't support multiple sound sources at once. Then try using ALSA compactibility mode (http://gentoo-wiki.com/HOWTO_ALSA_simple)
[edit] The game keeps scrolling on my IBM ThinkPad Laptop
This seems to be a common problem with these laptops. The workaround for this problem is the following: In the "Pass 0 rules" section of (either) %SYSTEM_ROOT%\System32\tp4table.dat or %SYSTEM_ROOT%\System32\tp4scrol.dat, add:
*,*,openttd.exe,*,*,*,WheelStd,0,9
Thank you Sam for your helpful comment on the bugtracker FlySpray #345
[edit] My mouse is not sensitive enough (SDL / Fullscreen)
OpenTTD does nothing with the mouse sensitivity, SDL takes full control over the mouse. Some people might feel it is not doing a good job about this; but luckily you can change SDL's mouse setting. Please read the doc over at [1].
The necessary environment variable is SDL_VIDEO_X11_MOUSEACCEL.
I found that setting SDL_VIDEO_X11_MOUSEACCEL didn't work for me without setting SDL_MOUSE_RELATIVE=0 too.
So, for example:
$ SDL_MOUSE_RELATIVE=0 SDL_VIDEO_X11_MOUSEACCEL=6/1/0 openttd

