OpenTTD 是流行的 DOS 遊戲 Transport Tycoon Deluxe 的自由開源重新實現。您是運輸公司的所有者,您必須多年來對其進行管理才能獲利。
安裝
如果您沒有原版遊戲,openttd-opengfx包 和 openttd-opensfx包 包含免費圖形和聲音。
此外,你還可以安裝 openttd-openmsxAUR 來獲取免費的 OpenMSX 音樂包。請務必閱讀 Timidity#配置 以正確設置 Timidity,尤其是將自己添加到音頻組,並配置 Timidity 使用 Freepats SoundFont。
Transport Tycoon Deluxe 原始數據(可選)
OpenTTD 可以使用原始 Windows/DOS 版本的 Transport Tycoon Deluxe 的非自由圖形和聲音數據。
您可以從遊戲光碟、現有安裝文件中獲取這些文件,也可以從 Abandonia 免費提供的遊戲安裝存檔中獲取。
要使用原始圖形和音效,請將以下文件複製到 /usr/share/openttd/data/
或 ~/.openttd/baseset
:
- Windows : trg1r.grf, trgcr.grf, trghr.grf, trgir.grf, trgtr.grf
- DOS : TRG1.GRF, TRGC.GRF, TRGH.GRF, TRGI.GRF, TRGT.GRF
- sample.cat from either version
如果是原始配樂,請將原始 TTD 遊戲目錄下 gm 文件夾中的文件複製到 ~/.openttd/gm
中。
教程
遊戲一開始可能會讓人一頭霧水。 這裡的中文維基和這裡的英文維基上有很好的教程。
對於遊戲內的教程,我們已經實現了一個遊戲腳本。 只需使用遊戲內的下載管理器下載 '新手教程',然後加載 '新手教程' 場景即可。
Configuration
The OpenTTD main configuration file is located at ~/.openttd/openttd.cfg
and is automatically created upon first startup.
Various settings in the configuration file can be edited with buttons on the main menu. Each button is explained below.
Game Options
This window allows you to set options which will be used by default at the start of a new game.
You can also set the default graphics, sound, and music here.
Difficulty
This window allows you to change the difficulty of the game, and specific options about them. You can either use the difficulty presets by selecting the difficulty buttons at the top of the window, or set custom options.
More information can be found here[失效連結 2021-05-17 ⓘ].
Advanced Settings
In this window, nearly all the other settings in the configuration file can be modified. All the options are grouped in expandable sections. You can also search for the setting to be changed using the search utility.
Details about these settings can be found here[失效連結 2021-05-17 ⓘ].
AI/Game Script Settings
This window allows you to customize various options relating to artificial intelligence (bots or CPU players) and Game Scripts.
Game Scripts are a goal-based scripts which can perform many in-game actions to enhance or extend the game.
Detailed information about this window can be found here[失效連結 2021-05-17 ⓘ].
Multiplayer
Client
Players can join a server using the Multiplayer menu. In multiplayer, fast forwarding, pausing by the player and cheats are disabled.
All problems with a server should resolve the administrator of the server and are usually not a bug, just a misconfiguration on the server.
Server
You can start the server by passing the -D
argument, e.g.:
# openttd -D 0.0.0.0:3979
This starts the server and accepts additional commands. Configuration is generated and stored in ~/.config/openttd/openttd.cfg
and is read every time the server starts. It can be overriden with commands issued directly to the server while running. Some settings cannot be changed during a game.
You can either create a Systemd service to run on background, or use screen.
To make your server publicly available, you need a public-facing server with all port forwardings set up properly. The default port is 3979.
Tips and tricks
Heightmaps
OpenTTD allows using a grayscale image as a heightmap for landscape generation. There is an excellent heightmap generator available at terrain.party, based on real Earth terrain. Alternatively, you can use the botherAUR application, which can download larger areas and contains a number of options for fine-tuning the resulting heightmap (see the README for some notes on usage). You may further use gimp包 for fine-tuning the heightmap, especially useful are the Levels and Gaussian Blur tools.
Cheats
A cheat menu can be shown in a local game by pressing Ctrl+Alt+c
.
Detailed information about cheats are available here
Multiplayer
Always set a password for your own company to avoid others taking over. Some servers reset your password after some idle time.
Chat can be brought up with the t
letter if the rail building menu is not open.
You can invest in other companies by buying shares (if enabled on server). You can later sell the shares for profit, or loss.
Troubleshooting
Music is not playing
The soundtrack of the game is made of MIDI files. Therefore, you need a MIDI synthesizer to play them.
The game will automatically try to use TiMidity++ with no additional arguments. If for some reason you need/want to use another synthesizer, OpenTTD provides the "extmidi" music driver, which allows you to configure a command to be ran to play music.
- When using the extmidi driver, the in-game volume control sliders are disabled and cannot be used to change the volume.
- If the command you want to run is not included in
$PATH
, you must specify the absolute path.
Edit your openttd.cfg to configure extmidi :
~/.openttd/openttd.cfg
[misc] musicdriver = "extmidi:cmd=<command>"
openttd -m extmidi:cmd=<command>
However, extmidi does not allow additionnal arguments in the command. The solution is to use a wrapper script:
~/.openttd/playmidi
#!/bin/bash #here, we want to use the FluidSynth synthesizer with the soundfont #provided in soundfont-fluid包 and PulseAudio trap "pkill fluidsynth" EXIT fluidsynth -a pulseaudio -i /usr/share/soundfonts/FluidR3_GM2-2.sf2 $*
Mark it as executable.
Then you can specify the full path to the script as the command to be used with extmidi :
~/.openttd/openttd.cfg
[misc] musicdriver = "extmidi:cmd=/home/<user>/.openttd/playmidi"