Scriptable Admin Console 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
aidos
Engineer
Engineer
Posts: 9
Joined: 14 May 2015 02:47

Scriptable Admin Console Commands

Post by aidos »

I was wondering if it would be possible to add an ability to define new admin console commands in the same way that game scripts are defined?

I would love to access a stream of data from OpenTTD to do some data analysis on, and the current API integration through the admin console doesn't give me information about all of the vehicles (cargo, capacity, age, profit etc.).

I was thinking about patching the console to include this command, however I realised that if it was possible to define the command using a game script it would be much more flexible.
User avatar
Zuu
OpenTTD Developer
OpenTTD Developer
Posts: 4553
Joined: 09 Jun 2003 18:21
Location: /home/sweden

Re: Scriptable Admin Console Commands

Post by Zuu »

Hello,

Did you have a look on Server GS?

It expose almost the entire GS API through the Admin port. (exceptions are mentioned in the top of the linked thread)

At the bottom of that thread, there is a version 3 that I haven't uploaded yet which is more forward compatible than version 2 on bananas.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
agentw4b
Traffic Manager
Traffic Manager
Posts: 216
Joined: 14 Apr 2017 15:51
Location: Czech Republic

Re: Scriptable Admin Console Commands

Post by agentw4b »

Is there any analyzing text editor that would capture JSON output from the Admin port? Any Admin Port Client?
Owner and admin of servers with names "Experimental games" .
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Post Reply

Return to “OpenTTD AIs and Game Scripts”

Who is online

Users browsing this forum: No registered users and 24 guests