Page 1 of 1

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

Posted: 11 Oct 2021 05:41
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.

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

Posted: 11 Oct 2021 07:45
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.)