-
Notifications
You must be signed in to change notification settings - Fork 0
Description
When trying to load an existing save file using the CityBuilder script that I started my save file with, it loads but is unable to continue my save file as it appears that I have already won. If I look at the GameScript settings after loading my save, I noticed that the values that everything changed to are the default settings, Specifically, the two settings I changed for my game when I started were the game length to be indefinite (instead of the default of 4 years) and the game type of CityBuilder instead of the default of FreeBuilder.
To fix this as a small hack, I edited C:\Users\mengh\Documents\OpenTTD\game\CityBuilder\info.nut directly. On line 49/50 the default value is set to the easy_value of 4 years. I changed the easy_value to 0 (which is indefinite). I also changed line 56's easy_value to be 1 instead of 0. 1 is CityBuilder and 0 is FreeBuilder. These are the two settings I changed when starting the script. It appears to be working.
These are the original values:
AddSetting({name = "gametime", description = "Game Length in years: "
easy_value = 4, medium_value = 8, hard_value = 12, custom_value = 16, flags= CONFIG_INGAME, min_value = 0, max_value = 1000});
AddLabels("gametime", {_0 = "Indefinite"});
AddSetting({name = "gamegoal", description = "Goal Target: "
easy_value = 0, medium_value = 0, hard_value = 0, custom_value = 0, flags= CONFIG_INGAME, min_value = 0, max_value = 10000000, step_size = 500});
AddLabels("gamegoal", {_0 = "Disabled"});
AddSetting({name = "gametype", description = "Game Type: "
easy_value = 0, medium_value = 1, hard_value = 1, custom_value = 1, flags = CONFIG_INGAME, min_value = 0, max_value = 3});
AddLabels("gametype", {_0 = "FreeBuilder", _1 = "CityBuilder", _2 = "CityBuilder Co-Op", _3 = "Metropolis"});
and these are the values I changed them to:
AddSetting({name = "gametime", description = "Game Length in years: "
easy_value = 0, medium_value = 8, hard_value = 12, custom_value = 16, flags= CONFIG_INGAME, min_value = 0, max_value = 1000});
AddLabels("gametime", {_0 = "Indefinite"});
AddSetting({name = "gamegoal", description = "Goal Target: "
easy_value = 0, medium_value = 0, hard_value = 0, custom_value = 0, flags= CONFIG_INGAME, min_value = 0, max_value = 10000000, step_size = 500});
AddLabels("gamegoal", {_0 = "Disabled"});
AddSetting({name = "gametype", description = "Game Type: "
easy_value = 1, medium_value = 1, hard_value = 1, custom_value = 1, flags = CONFIG_INGAME, min_value = 0, max_value = 3});
AddLabels("gametype", {_0 = "FreeBuilder", _1 = "CityBuilder", _2 = "CityBuilder Co-Op", _3 = "Metropolis"});
Note that these values are the same values that I set my gamescript settings to in the first place. I assume that the CityBuilder is not saving these settings rather than the error within OpenTTD itself because other Game Scripts save the settings. It would be nice to have any settings changed within the Script within the game to be saved so I can reload a save file with the same settings.