"bool ScriptRail::BuildRailTrack(TileIndex tile, RailTrack rail_track)" in multiplayer

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
Eronex
Engineer
Engineer
Posts: 2
Joined: 02 Oct 2021 05:07

"bool ScriptRail::BuildRailTrack(TileIndex tile, RailTrack rail_track)" in multiplayer

Post by Eronex »

Hello!

How can I use the functions from the "ScriptRail" class to automate some routine actions for myself while playing in multiplayer mode?
I understand that to do this, it is necessary to modify and recompile the source code of the game. But I still can't figure out how to use the "ScriptRail" class.
User avatar
jfs
Tycoon
Tycoon
Posts: 1757
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: "bool ScriptRail::BuildRailTrack(TileIndex tile, RailTrack rail_track)" in multiplayer

Post by jfs »

As the game is designed right now, you can't have an AI script running in the same company as a human player is controlling.
You could maybe modify the game to have an AI script play in the same company as you, without telling the server about it, but at that point you may as well also just put whatever you want to do directly in your modified client.
Also think about whether the server you play on would consider that cheating, by using a tool that could be giving you "super-human powers". (Such as building in multiple places at once, building much faster than a human with a mouse and keyboard would be able to normally, and more.)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Bing [Bot] and 20 guests