Console Aliases

From OpenTTD
Jump to: navigation, search

Alias Commands

Aliases are handy shortcuts for one or more command. You can define aliases ingame or in one of the scripts files (located in <OpenTTD installation>/scripts directory). Simply add an alias by typing "alias <whateveryouwant>". If the alias needs spaces, remember to enclose it in double-quotes. If your alias needs double-quotes, use single quotes as subsitution. Like this: alias echo " 'hallo b' %A". Aliases can use the arguments typed in after them.

  • "%A - %Z" substitute arguments 1 t/m 26
  • "%+" lists all parameters keeping them seperated
  • "%!" also lists all parameters but presenting them to the aliased command as one argument
  • ";" allows for combining multiple commands (eg alias startgame "load 5; pause")

There are a few predefined aliases ingame

same as reset_company
same as company_pw
same as ls
same as connect
new_game, new_map and newmap
same as newgame
same as rcon_pw
server_bind, server_bind_ip and server_ip_bind
same as server_ip
same as server_pw

Debug aliases [not available in release]

echo %A; echo %B (shows concatenation of commands)
echo %!
Personal tools