Server commands?

Discuss the new AI features ("NoAI") introduced into OpenTTD 0.7, allowing you to implement custom AIs, and the new Game Scripts available in OpenTTD 1.2 and higher.

Moderator: OpenTTD Developers

Post Reply
User avatar
Bennievv
Engineer
Engineer
Posts: 12
Joined: 11 Feb 2012 12:14
Location: The Netherlands

Server commands?

Post by Bennievv »

On some servers, you got commands (like !help, !stats). How do I make that, too? Just make a game script/AI or something like a Python-script?

Bennievv
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Server commands?

Post by Zuu »

For that you need something that can read the chat. Neither AIs nor Game Scripts can do that. I know that scripts that wrap around the dedicated server console can do that. I'm unsure if admin bots can do that.

An example of a script that can do what you want is the Autopilot script. IIRC its written in TCL/TK. But you can make a autopilot sort of script with pretty much any programming language. As long as you can start a process (OpenTTD) and hookup to standard input/output of that process.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
User avatar
Bennievv
Engineer
Engineer
Posts: 12
Joined: 11 Feb 2012 12:14
Location: The Netherlands

Re: Server commands?

Post by Bennievv »

Zuu wrote:For that you need something that can read the chat. Neither AIs nor Game Scripts can do that. I know that scripts that wrap around the dedicated server console can do that. I'm unsure if admin bots can do that.

An example of a script that can do what you want is the Autopilot script. IIRC its written in TCL/TK. But you can make a autopilot sort of script with pretty much any programming language. As long as you can start a process (OpenTTD) and hookup to standard input/output of that process.
Thanks for your answer ;)!
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 15 guests