add commands for kick, ban, setting_newgame, restart to Gamescript
Moderator: OpenTTD Developers
add commands for kick, ban, setting_newgame, restart to Gamescript
Please add commands for kick, ban, setting_newgame, restart (doesn't matter that it crashes the control script, it will start again after restart), rcon to the NoGo API for Gamescripts. I'm working on an Admin interface using buttons in Storybook and I miss these options a lot. Although the use of Adminport is still promoted, the official developers do not offer any suitable client that can receive commands from the game and do these things. They are only third-party tools that do something, but using them requires months of learning programming languages...
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: add commands for kick, ban, setting_newgame, restart to Gamescript
It would also be good if Gamescript could delete cities. For now, he can only add them.
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
- 2TallTyler
- Route Supervisor
- Posts: 508
- Joined: 11 Aug 2019 18:15
- Contact:
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
Game Scripts cannot add towns because towns cannot be deleted in-game -- only in Scenario Editor, and then only if no stations, industries, houses, etc., refer to that town as their parent location.
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
The game script can add cities, but cannot delete them. I use the city founder in the "City Founder GS" gamescript.
GSTown::FoundTown
GSTown::FoundTown
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
- kkidslogin
- Engineer
- Posts: 23
- Joined: 01 Feb 2024 21:02
- Location: Tal'dorese Empire
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
Just an idea: why shouldn't it be possible? I don't know what goes on in the code, but why not iterate through the company infrastructure and industries that refer to that town, set them to another nearby town (Or unincorporate them, perhaps), delete the houses, and delete the town reference? This could be a possible solution.2TallTyler wrote: ↑19 Feb 2024 17:00 Game Scripts cannot add towns because towns cannot be deleted in-game -- only in Scenario Editor, and then only if no stations, industries, houses, etc., refer to that town as their parent location.
Certified forum helper ©. Also active in the Scratch forums, where I have over 2300 posts as of the last count.
Played OpenTTD since 1.4.4
Played OpenTTD since 1.4.4
- 2TallTyler
- Route Supervisor
- Posts: 508
- Joined: 11 Aug 2019 18:15
- Contact:
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
Yes, it can be solved. I'm just explaining why it's not as simple as adding a missing method to the script API. PRs welcome.
- kkidslogin
- Engineer
- Posts: 23
- Joined: 01 Feb 2024 21:02
- Location: Tal'dorese Empire
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
Time to learn C++ then!2TallTyler wrote: ↑20 Feb 2024 13:32 Yes, it can be solved. I'm just explaining why it's not as simple as adding a missing method to the script API. PRs welcome.
Certified forum helper ©. Also active in the Scratch forums, where I have over 2300 posts as of the last count.
Played OpenTTD since 1.4.4
Played OpenTTD since 1.4.4
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
So I mainly don't understand why Gamescripts were created in the "squirrell language" to replace the console, when they didn't replace everything from the console and a lot of things have to be solved in various complex procedures. Also, plain text output from the closed Gamescript API is a technical problem. However, everything is answered here: Activate the Admin port or by parsing logs via python scripts. But similar functionalities should simply be enabled by default in Gamescripts. It would save server admins nerves.
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
- 2TallTyler
- Route Supervisor
- Posts: 508
- Joined: 11 Aug 2019 18:15
- Contact:
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
Looking forward to reviewing your PR!
I believe in Scenario Editor there is an error if you try to delete a town that is referenced by something, so you might start there.
I believe in Scenario Editor there is an error if you try to delete a town that is referenced by something, so you might start there.
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
Game scripts were not created to replace the console.
Game scripts are intended to change the rules of the game by modifying the game world and giving players goals and such.
The console is intended to manage the game, and can be supplemented with the admin port.
Game scripts are intended to change the rules of the game by modifying the game world and giving players goals and such.
The console is intended to manage the game, and can be supplemented with the admin port.
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
It would be enough if the Gamescript could also use RCON. A lot of things would be greatly simplified.
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: add commands for kick, ban, setting_newgame, restart to Gamescript
Considering story book is fully visible to everyone using it for admin interface doesn't sound like a good idea. And, yeah, GameScript is so not made for this task, I'm not sure how you're even going to authenticate an admin with it.
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
In each script, you can set which company the script works for. In my program I'm creating, I'm assuming that the administrator also has a business, and that the administrator will change during the game.
- Attachments
-
- admin.png
- (438.26 KiB) Not downloaded yet
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: add commands for kick, ban, setting_newgame, restart to Gamescript
But everyone can see story book of each company. And I'm pretty sure that pin you enter there gets broadcasted to every client.
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
I think it's divided into the global story book and the company story books, so you can't see everything, but I'll try...good reminder.
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: add commands for kick, ban, setting_newgame, restart to Gamescript
You can chose which company story book you want to open when you press the button
- Attachments
-
- Screenshot from 2024-02-21 23-59-56.png (202.07 KiB) Viewed 1338 times
Re: add commands for kick, ban, setting_newgame, restart to Gamescript
I also wanted to introduce a hacking tool for fun: a time-limited number generator.
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: add commands for kick, ban, setting_newgame, restart to Gamescript
If other users could see the buttons pressed directly, it would be a problem, unfortunately I have canceled the Openttd server now, so I can't verify it now.......I can hide the resulting PIN with asterisks or it may not show at all.
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: add commands for kick, ban, setting_newgame, restart to Gamescript
I tested it with a friend and he can't see what I press for the buttons on the page, so this is not a problem.
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: add commands for kick, ban, setting_newgame, restart to Gamescript
this is just my personal opinion, but it feels a lot like "wrong tool for the job".
for server admin stuff, use the admin port. do not abuse the game script.
for server admin stuff, use the admin port. do not abuse the game script.
Who is online
Users browsing this forum: No registered users and 5 guests