Moderator: OpenTTD Developers
I'm wondering if this is a bug or not with the way this setting is handled during multiplayer. We run with some pretty expensive trainset (2cc) and a pretty advanced start (1975) so the default max loan is not enough to get a good foundation going. It would take a few years of basically watching 1 train go back n forth.
I run the server and we decided we would set the max loan to be 3 times what is currently available. Changed the setting.ini MAX from 500000 to 1500000. Started a new game, and when the other client connects, they are unable to take out up to the max loan to start building up their empire. Is this considered a bug? Where can I look to see how the settings.ini values and the game settings are supposed to be passed over to other clients?
Code: Select all
[SDT_VAR] base = GameSettings var = difficulty.max_loan type = SLE_UINT32 from = SLV_97 guiflags = SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO | SGF_CURRENCY def = 300000 min = 100000 max = 500000 interval = 50000 str = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN strhelp = STR_CONFIG_SETTING_MAXIMUM_INITIAL_LOAN_HELPTEXT strval = STR_JUST_CURRENCY_LONG cat = SC_BASIC
First, I changed the settings.ini version and then went in game to set the max loan to the max defined in settings.ini. This works fine and as expected. I’m able to take out the big loan at the beginning of game.
The only issue was that clients joining my multiplayer game did not have the same max loan amount. I had to ship them the compiled exe and then they were able to take that loan amount out.
That's working as intended. Unless you're very careful with the changes you make, most source-code changes will make the server incompatible with clients unless they have exactly the same changes applied. In this case the effect was luckily quickly visible, other times you might simply get desyncs.
And it does exactly that. Clients that call settings from the savegame it gets from the server upon joining.djsider wrote: ↑31 May 2020 20:35I'm not sure this is considered cheating or hacking. This is the server trying to change the max limit on a setting. If you were a client joining this server, shouldn't it just take the server and game settings as the truth? Everyone would be running the exact same settings in this case.
Limits however are not settings. Limits are mostly hardcoded into the gamecode itself. There is no reason to send such hardcoded values over the network at all, since a basic assumption for OpenTTD networking is that both the server and all clients have been built from the same source code, and as such have the same limits.
yes, it definitely is.
if you change any code (including settings.ini) you must mark your version as modified (by the license requirements) and give this changed version to all other players that want to play on the server.
So what we are saying is that limits superceed settings, even if the save game will give the same option for all players in that game. I personally find this weird since it should only be server choice. The limits should only be applied when starting the game.
Is there a reason it checks limits during the game when the setting itself should be sufficient?
Limit: values that dictate what the per game settings can be set to. Ex: min-200 max-1000
Settings: what is actually being used in the save game. Every player will share the same settings in the game.
Users browsing this forum: No registered users and 5 guests