Make gameplay settings available to the player.
Moderator: OpenTTD Developers
Make gameplay settings available to the player.
If the variables with CONFIG_INGAME are defined in the info.nut gamescript file, these parameters can be changed by the player in the running game. This works in a single player game, but in a multiplayer game, the player does not have the option to click on the gameplay settings to change some of the values. Is there a possibility to make the relevant "Game Script Parameters" window available for some players to change?
I tried to call the window through the GSWindow class, but there are only window checking or window closing functions but there are no window opening functions.
I tried to call the window through the GSWindow class, but there are only window checking or window closing functions but there are no window opening functions.
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: Make gameplay settings available to the player.
There are OpenFooWindow ShowFooWindow functions to open a window.
It won't do much good though, as there is no script running at a non-server machine in an MP game.
It won't do much good though, as there is no script running at a non-server machine in an MP game.
Being a retired OpenTTD developer does not mean I know what I am doing.
Re: Make gameplay settings available to the player.
Yes, and that's a problem. The user, even though he has the right to change the settings script, can not change it in multiplayer settings. If there were at least some windows where it could be changed. The Goal window is not very appropriate.Alberth wrote:There are OpenFooWindow ShowFooWindow functions to open a window.
It won't do much good though, as there is no script running at a non-server machine in an MP game.
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: Make gameplay settings available to the player.
ShowFooWindow functions is not on https://nogo.openttd.org/api/1.7.2/agentw4b wrote:Yes, and that's a problem. The user, even though he has the right to change the settings script, can not change it in multiplayer settings. If there were at least some windows where it could be changed. The Goal window is not very appropriate.Alberth wrote:There are OpenFooWindow ShowFooWindow functions to open a window.
It won't do much good though, as there is no script running at a non-server machine in an MP game.
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: Make gameplay settings available to the player.
You can ask yes/no questions to companies using GSGoal::Question It is possible to customize the buttons with up to 3 buttons from a set of available button types.
If you do not need input, you can display longer texts and call up the story book to all players in a company using GSStoryPage::ShowPage. This can be used to explain non-standard interface like placing a sign with some special code to send a message to the script.
A third option is to have a webserver that talks with a GameScript in OpenTTD via the admin port.
If you do not need input, you can display longer texts and call up the story book to all players in a company using GSStoryPage::ShowPage. This can be used to explain non-standard interface like placing a sign with some special code to send a message to the script.
A third option is to have a webserver that talks with a GameScript in OpenTTD via the admin port.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: Make gameplay settings available to the player.
I've read a lot about the Admin port, but there are very few tools for it and they are mostly not well documented.
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: Make gameplay settings available to the player.
Using the admin port is probably the most complex solution, but it depends on your set of skills.
There are docs for the actual admin port protocol:
http://svn.openttd.org/trunk/docs/admin_network.txt
But if you can do with GSGoal::Question or sign based input, that is probably significantly less work than going via admin port and a web interface.
There are docs for the actual admin port protocol:
http://svn.openttd.org/trunk/docs/admin_network.txt
But if you can do with GSGoal::Question or sign based input, that is probably significantly less work than going via admin port and a web interface.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Who is online
Users browsing this forum: No registered users and 28 guests