Scripts

It is possible within OpenTTD to write Scripts which can be used to automate specific tasks. Unfortunately at present this functionality is a little buggy, but it does work.

Scripts comprise regular console commands, with the commands being run in sequence.

An example script:

echo "Starting server"
script openttd.log
net_frame_freq = 1
name "My Server"

If we then save the above script as

.openttd/scripts/on_dedicated.scr

, it will be run whenever a dedicated server is started, and do the following:

If you want scripts to automatically run whenever you start a client, see here. To run scripts manually, simply use the exec command from the Console.