Since it is possible to use buttons in game scripts in the Story book by Openttd 1.11.0, I try to invent an administrative tool in the game. Unfortunately, GS / AI cannot call console commands. Although he can control some parameters of the game, he cannot access commands like Kick, Ban, Newgame. Is there any way a game script could use a game console? I have encountered similar problems before and someone has always referred me to use the Admin port. There is very little documentation and live examples for using the Admin port. It usually refers to decades of dead projects used the Admin port, which are also poorly documented.But I don't want to send game data out to an external program, I want to communicate inside the game.
It seems absurd to me that the two ways to control the game using "GS / AI scripts" and "Console / Console scripts" cannot communicate with each other. Everyone lacks some options.
I need to somehow call the RCON command from Gamescript. And I don't know how. Although I can write something on the console, but only with extra characters (script), which makes it not executable command.
How to make the console accessible to GS / AI programs?
Moderator: OpenTTD Developers
How to make the console accessible to GS / AI programs?
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
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: How to make the console accessible to GS / AI programs?
Not directly, but you can make a GS that sends things out on the admin port when the user presses buttons in the story book. You then need a program that listens on the admin port and sends actual admin commands back.
Re: How to make the console accessible to GS / AI programs?
Yes, this method also occurred to me, but I can't write such a program and the various tools I saw for the adminport service are for sending messages to the admin port, but I can't use them for listening and processing data. Unfortunately I can't program C, Python, Javascript.
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
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Re: How to make the console accessible to GS / AI programs?
if it were possible to somehow connect the two Openttd servers using admin ports. One for sending and the other for receiving.
GSAdmin.Send () solves only sending, but it is not possible to pass some parameters to which server and port to send data.
GSAdmin.Send () solves only sending, but it is not possible to pass some parameters to which server and port to send data.
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
My heightmaps: Flat Earth Map and United nations logo
My scenarios: Game Fallout 1,2,3 Map scenario
My gamescripts: City Founder GS
Who is online
Users browsing this forum: Baidu [Spider] and 15 guests