Translating

If you would like to translate the game, please contact our translations manager. He will give you an account to our Web Translator and he will create everything needed in case you want to start with a translation of a yet untranslated language.

For errors in the translation you should also contact our translations manager.

What to do When You Find a Bug

When you think you found a bug in OpenTTD you should:

  • Make sure you are running a recent version, i.e. run the latest stable, testing or nightly based on where you found the bug.
  • Make sure you are not running a non-official binary, like a patch pack. If you are playing with a patch pack you should report any bugs to the forum thread related to that patch pack.
  • Make it reproducable for the developers. In other words, create a savegame in which you can reproduce the issue once loaded. For Windows users it is very useful to give us the crash.dmp and crash.log which are created on crashes.
  • Check whether the bug is already reported on our bug tracker. This includes searching for recently closed bug reports as the bug might already be fixed.
  • When you are certain it is an unknown bug you should make a bug report at our bug tracker. The bug report must contain a savegame, preferably crash.sav and the last (automatically) saved savegame. It must also contain crash.log and crash.png (if they were created). For crashes on Windows must attach the crash.dmp files too. For bugs in nightlies you must also specify the revision of the nightly.

Obtaining The Source Code

For OpenTTD we use the subversion (svn) version control system. OpenTTD's source code repository using subversion is accessible by anyone on the following URLs:

You can also browse the repository online, or query available versions (for automated tools). The documentation of the source is created by DoxyGen.

To download the source code you need a subversion client. The default client is called subversion and is available for almost all platforms; lots of them can be installed via their package manager. For Windows there is TortoiseSVN, a client that is easier to use for unexperienced subversion users. For more information about subversion we redirect you to the Subversion book, especially Chapter 2: Basic Usage.

To help people who want to manage their own patches we also provide a git and Mercurial (hg) repository of the svn repository. These can be found at respectively:

Compiling

OpenTTD depends on a few libraries. You need to install their development package to be able to compile OpenTTD. These libraries are:

  • zlib for decompressing content downloads and compression of the savegames from 0.3.0 to 1.0.5.
  • liblzma for compression of the savegames since 1.1.0.
  • lzo2 for loading old (before 0.3.0) savegames.
  • libpng for making screenshots and loading heightmaps.
  • freetype2 for loading fonts with support for UTF-8.
  • fontconfig to find those fonts (not needed on Windows).
  • sdl to be able to draw on the screen (not needed on Windows and Mac OS X).
  • icu to be able to render bi-directional text (Arabic, Hebrew, etc.)

For further instructions on how to properly set up your system to build OpenTTD, take a look at our wiki page about development environments.

Development of NewGRF Extensions

OpenTTD allows the use of NewGRFs and different base sets for graphics, sounds and music.

These files require special formats and you may need to use the following helper programs to assist with the creation of these add-ons:

  • nml High-level language and compiler for writing NewGRFs. See also the specs and tutorial
  • grfcodec Compiles NewGRF's low-level programming language NFO into a GRF file. Use the enclosed nforenum to check the code for sanity. See also the specs and tutorial.
  • catcodec Compiles the sound set description file (sfo) and the sounds into a sound set

For further help see the wiki, the DevZone or visit the forums.

NewGRFs can be made available to players via the online content.

Development of AIs and Game Scripts

OpenTTD provides a script interface, which is used to provide computer players or altered game behaviour and goals.

Scripts and associated libraries are written in squirrel (version 2) and need to make use of OpenTTD's API for Scripts. Useful ressources include:

  • NoAI API API for OpenTTD's AIs.
  • NoGo API API for OpenTTD's Game Scripts.
  • Wiki Wiki section dedicated to Script development.
  • Forum Forum dedicated to OpenTTD's Script development.
  • Squirrel 2 Reference Reference manual for the squirrel language.

Scripts can be made available to players via the online content.