# settings.h

Go to the documentation of this file.

    00001 /* $Id: settings.h 22074 2011-02-13 20:52:33Z yexo $ */
    00002
    00003 /*
    00004  * This file is part of OpenTTD.
    00005  * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
    00006  * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    00007  * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
    00008  */
    00009
    00012 /* Begin - Callback Functions for the various settings */
    00013 static bool v_PositionMainToolbar(int32 p1);
    00014 static bool v_PositionStatusbar(int32 p1);
    00015 static bool PopulationInLabelActive(int32 p1);
    00016 static bool RedrawScreen(int32 p1);
    00017 static bool RedrawSmallmap(int32 p1);
    00018 static bool InvalidateDetailsWindow(int32 p1);
    00019 static bool InvalidateStationBuildWindow(int32 p1);
    00020 static bool InvalidateBuildIndustryWindow(int32 p1);
    00021 static bool CloseSignalGUI(int32 p1);
    00022 static bool InvalidateTownViewWindow(int32 p1);
    00023 static bool DeleteSelectStationWindow(int32 p1);
    00024 static bool UpdateConsists(int32 p1);
    00025 static bool CheckInterval(int32 p1);
    00026 static bool TrainAccelerationModelChanged(int32 p1);
    00027 static bool RoadVehAccelerationModelChanged(int32 p1);
    00028 static bool TrainSlopeSteepnessChanged(int32 p1);
    00029 static bool RoadVehSlopeSteepnessChanged(int32 p1);
    00030 static bool DragSignalsDensityChanged(int32);
    00031 static bool TownFoundingChanged(int32 p1);
    00032 static bool DifficultyReset(int32 level);
    00033 static bool DifficultyChange(int32);
    00034 static bool DifficultyNoiseChange(int32 i);
    00035 static bool MaxNoAIsChange(int32 i);
    00036 static bool CheckRoadSide(int p1);
    00037 static size_t ConvertLandscape(const char *value);
    00038 static bool TLSettingChanged(int32 p1);
    00039 static bool CheckFreeformEdges(int32 p1);
    00040 static bool ChangeDynamicEngines(int32 p1);
    00041 static bool StationCatchmentChanged(int32 p1);
    00042 static bool InvalidateVehTimetableWindow(int32 p1);
    00043 static bool InvalidateCompanyLiveryWindow(int32 p1);
    00044 static bool InvalidateNewGRFChangeWindows(int32 p1);
    00045 static bool InvalidateIndustryViewWindow(int32 p1);
    00046 static bool RedrawTownAuthority(int32 p1);
    00047 extern bool UpdateNewGRFConfigPalette(int32 p1);
    00048 static bool CheckSharingRail(int32 p1); // TODO: re-introduce IS individual company settings?
    00049 static bool CheckSharingRoad(int32 p1);
    00050 static bool CheckSharingWater(int32 p1);
    00051 static bool CheckSharingAir(int32 p1);
    00052
    00053 #ifdef ENABLE_NETWORK
    00054 static bool UpdateClientName(int32 p1);
    00055 static bool UpdateServerPassword(int32 p1);
    00056 static bool UpdateRconPassword(int32 p1);
    00057 static bool UpdateClientConfigValues(int32 p1);
    00058 #endif /* ENABLE_NETWORK */
    00059 /* End - Callback Functions for the various settings */
    00060
    00061
    00062 /****************************
    00063  * OTTD specific INI stuff
    00064  ****************************/
    00065
    00103 #define NSD_GENERAL(name, def, cmd, guiflags, min, max, interval, many, str, proc, load)\
    00104   {name, (const void*)(size_t)(def), {(byte)cmd}, {(uint16)guiflags}, min, max, interval, many, str, proc, load}
    00105
    00106 /* Macros for various objects to go in the configuration file.
    00107  * This section is for global variables */
    00108 #define SDTG_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, var, length, def, min, max, interval, full, str, proc, from, to)\
    00109   {NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, proc, NULL), SLEG_GENERAL(sle_cmd, var, type | flags, length, from, to)}
    00110
    00111 #define SDTG_CONDVAR(name, type, flags, guiflags, var, def, min, max, interval, str, proc, from, to)\
    00112   SDTG_GENERAL(name, SDT_NUMX, SL_VAR, type, flags, guiflags, var, 0, def, min, max, interval, NULL, str, proc, from, to)
    00113 #define SDTG_VAR(name, type, flags, guiflags, var, def, min, max, interval, str, proc)\
    00114   SDTG_CONDVAR(name, type, flags, guiflags, var, def, min, max, interval, str, proc, 0, SL_MAX_VERSION)
    00115
    00116 #define SDTG_CONDBOOL(name, flags, guiflags, var, def, str, proc, from, to)\
    00117   SDTG_GENERAL(name, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, var, 0, def, 0, 1, 0, NULL, str, proc, from, to)
    00118 #define SDTG_BOOL(name, flags, guiflags, var, def, str, proc)\
    00119   SDTG_CONDBOOL(name, flags, guiflags, var, def, str, proc, 0, SL_MAX_VERSION)
    00120
    00121 #define SDTG_CONDLIST(name, type, length, flags, guiflags, var, def, str, proc, from, to)\
    00122   SDTG_GENERAL(name, SDT_INTLIST, SL_ARR, type, flags, guiflags, var, length, def, 0, 0, 0, NULL, str, proc, from, to)
    00123 #define SDTG_LIST(name, type, flags, guiflags, var, def, str, proc)\
    00124   SDTG_GENERAL(name, SDT_INTLIST, SL_ARR, type, flags, guiflags, var, lengthof(var), def, 0, 0, 0, NULL, str, proc, 0, SL_MAX_VERSION)
    00125
    00126 #define SDTG_CONDSTR(name, type, length, flags, guiflags, var, def, str, proc, from, to)\
    00127   SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, length, def, 0, 0, 0, NULL, str, proc, from, to)
    00128 #define SDTG_STR(name, type, flags, guiflags, var, def, str, proc)\
    00129   SDTG_GENERAL(name, SDT_STRING, SL_STR, type, flags, guiflags, var, lengthof(var), def, 0, 0, 0, NULL, str, proc, 0, SL_MAX_VERSION)
    00130
    00131 #define SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max, full, str, proc, from, to)\
    00132   SDTG_GENERAL(name, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, max, 0, full, str, proc, from, to)
    00133 #define SDTG_OMANY(name, type, flags, guiflags, var, def, max, full, str, proc)\
    00134   SDTG_CONDOMANY(name, type, flags, guiflags, var, def, max, full, str, proc, 0, SL_MAX_VERSION)
    00135
    00136 #define SDTG_CONDMMANY(name, type, flags, guiflags, var, def, full, str, proc, from, to)\
    00137   SDTG_GENERAL(name, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, var, 0, def, 0, 0, 0, full, str, proc, from, to)
    00138 #define SDTG_MMANY(name, type, flags, guiflags, var, def, full, str, proc)\
    00139   SDTG_CONDMMANY(name, type, flags, guiflags, var, def, full, str, proc, 0, SL_MAX_VERSION)
    00140
    00141 #define SDTG_CONDNULL(length, from, to)\
    00142   {{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLEG_CONDNULL(length, from, to)}
    00143
    00144 #define SDTG_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLEG_END()}
    00145
    00146 /* Macros for various objects to go in the configuration file.
    00147  * This section is for structures where their various members are saved */
    00148 #define SDT_GENERAL(name, sdt_cmd, sle_cmd, type, flags, guiflags, base, var, length, def, min, max, interval, full, str, proc, load, from, to)\
    00149   {NSD_GENERAL(name, def, sdt_cmd, guiflags, min, max, interval, full, str, proc, load), SLE_GENERAL(sle_cmd, base, var, type | flags, length, from, to)}
    00150
    00151 #define SDT_CONDVAR(base, var, type, from, to, flags, guiflags, def, min, max, interval, str, proc)\
    00152   SDT_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, base, var, 1, def, min, max, interval, NULL, str, proc, NULL, from, to)
    00153 #define SDT_VAR(base, var, type, flags, guiflags, def, min, max, interval, str, proc)\
    00154   SDT_CONDVAR(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, min, max, interval, str, proc)
    00155
    00156 #define SDT_CONDBOOL(base, var, from, to, flags, guiflags, def, str, proc)\
    00157   SDT_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, base, var, 1, def, 0, 1, 0, NULL, str, proc, NULL, from, to)
    00158 #define SDT_BOOL(base, var, flags, guiflags, def, str, proc)\
    00159   SDT_CONDBOOL(base, var, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
    00160
    00161 #define SDT_CONDLIST(base, var, type, from, to, flags, guiflags, def, str, proc)\
    00162   SDT_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, proc, NULL, from, to)
    00163 #define SDT_LIST(base, var, type, flags, guiflags, def, str, proc)\
    00164   SDT_CONDLIST(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
    00165
    00166 #define SDT_CONDSTR(base, var, type, from, to, flags, guiflags, def, str, proc)\
    00167   SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, base, var, lengthof(((base*)8)->var), def, 0, 0, 0, NULL, str, proc, NULL, from, to)
    00168 #define SDT_STR(base, var, type, flags, guiflags, def, str, proc)\
    00169   SDT_CONDSTR(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
    00170 #define SDT_CONDSTRO(base, var, length, type, from, to, flags, def, str, proc)\
    00171   SDT_GENERAL(#var, SDT_STRING, SL_STR, type, flags, 0, base, var, length, def, 0, 0, NULL, str, proc, from, to)
    00172
    00173 #define SDT_CONDCHR(base, var, from, to, flags, guiflags, def, str, proc)\
    00174   SDT_GENERAL(#var, SDT_STRING, SL_VAR, SLE_CHAR, flags, guiflags, base, var, 1, def, 0, 0, 0, NULL, str, proc, NULL, from, to)
    00175 #define SDT_CHR(base, var, flags, guiflags, def, str, proc)\
    00176   SDT_CONDCHR(base, var, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
    00177
    00178 #define SDT_CONDOMANY(base, var, type, from, to, flags, guiflags, def, max, full, str, proc, load)\
    00179   SDT_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, max, 0, full, str, proc, load, from, to)
    00180 #define SDT_OMANY(base, var, type, flags, guiflags, def, max, full, str, proc, load)\
    00181   SDT_CONDOMANY(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, max, full, str, proc, load)
    00182
    00183 #define SDT_CONDMMANY(base, var, type, from, to, flags, guiflags, def, full, str, proc)\
    00184   SDT_GENERAL(#var, SDT_MANYOFMANY, SL_VAR, type, flags, guiflags, base, var, 1, def, 0, 0, 0, full, str, proc, NULL, from, to)
    00185 #define SDT_MMANY(base, var, type, flags, guiflags, def, full, str, proc)\
    00186   SDT_CONDMMANY(base, var, type, 0, SL_MAX_VERSION, flags, guiflags, def, full, str, proc)
    00187
    00188 #define SDT_CONDNULL(length, from, to)\
    00189   {{"", NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLE_CONDNULL(length, from, to)}
    00190
    00191
    00192 #define SDTC_CONDVAR(var, type, from, to, flags, guiflags, def, min, max, interval, str, proc)\
    00193   SDTG_GENERAL(#var, SDT_NUMX, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, min, max, interval, NULL, str, proc, from, to)
    00194 #define SDTC_VAR(var, type, flags, guiflags, def, min, max, interval, str, proc)\
    00195   SDTC_CONDVAR(var, type, 0, SL_MAX_VERSION, flags, guiflags, def, min, max, interval, str, proc)
    00196
    00197 #define SDTC_CONDBOOL(var, from, to, flags, guiflags, def, str, proc)\
    00198   SDTG_GENERAL(#var, SDT_BOOLX, SL_VAR, SLE_BOOL, flags, guiflags, _settings_client.var, 1, def, 0, 1, 0, NULL, str, proc, from, to)
    00199 #define SDTC_BOOL(var, flags, guiflags, def, str, proc)\
    00200   SDTC_CONDBOOL(var, 0, SL_MAX_VERSION, flags, guiflags, def, str, proc)
    00201
    00202 #define SDTC_CONDLIST(var, type, length, flags, guiflags, def, str, proc, from, to)\
    00203   SDTG_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, _settings_client.var, length, def, 0, 0, 0, NULL, str, proc, from, to)
    00204 #define SDTC_LIST(var, type, flags, guiflags, def, str, proc)\
    00205   SDTG_GENERAL(#var, SDT_INTLIST, SL_ARR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, proc, 0, SL_MAX_VERSION)
    00206
    00207 #define SDTC_CONDSTR(var, type, length, flags, guiflags, def, str, proc, from, to)\
    00208   SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, length, def, 0, 0, 0, NULL, str, proc, from, to)
    00209 #define SDTC_STR(var, type, flags, guiflags, def, str, proc)\
    00210   SDTG_GENERAL(#var, SDT_STRING, SL_STR, type, flags, guiflags, _settings_client.var, lengthof(_settings_client.var), def, 0, 0, 0, NULL, str, proc, 0, SL_MAX_VERSION)
    00211
    00212 #define SDTC_CONDOMANY(var, type, from, to, flags, guiflags, def, max, full, str, proc)\
    00213   SDTG_GENERAL(#var, SDT_ONEOFMANY, SL_VAR, type, flags, guiflags, _settings_client.var, 1, def, 0, max, 0, full, str, proc, from, to)
    00214 #define SDTC_OMANY(var, type, flags, guiflags, def, max, full, str, proc)\
    00215   SDTC_CONDOMANY(var, type, 0, SL_MAX_VERSION, flags, guiflags, def, max, full, str, proc)
    00216
    00217 #define SDT_END() {{NULL, NULL, {0}, {0}, 0, 0, 0, NULL, STR_NULL, NULL, NULL}, SLE_END()}
    00218
    00219 /* Shortcuts for macros below. Logically if we don't save the value
    00220  * we also don't sync it in a network game */
    00221 #define S SLF_NOT_IN_SAVE | SLF_NO_NETWORK_SYNC
    00222 #define C SLF_NOT_IN_CONFIG
    00223 #define N SLF_NO_NETWORK_SYNC
    00224
    00225 #define D0 SGF_0ISDISABLED
    00226 #define NC SGF_NOCOMMA
    00227 #define MS SGF_MULTISTRING
    00228 #define NO SGF_NETWORK_ONLY
    00229 #define CR SGF_CURRENCY
    00230 #define NN SGF_NO_NETWORK
    00231 #define NG SGF_NEWGAME_ONLY
    00232 #define NS SGF_NEWGAME_ONLY | SGF_SCENEDIT_TOO
    00233 #define PC SGF_PER_COMPANY
    00234
    00235 #include "../map_func.h"
    00236
    00237 static bool AfterChangeOfAllowMoreHeightlevels(int32 p1)
    00238 {
    00239   /* It's a boolean setting, so anything else would be really strange... */
    00240   assert(p1 == 0 || p1 == 1);
    00241
    00242   /* Allow_more_heightlevels was turned off before, now we turn it on. */
    00243   if (p1 == 1) {
    00244     /* If we are in game or in the editor, we have to copy
    00245      * the heightlevel information to its new place. */
    00246     if (_game_mode != GM_MENU) {
    00247       CopyHeightlevelDataFromOldToExtended();
    00248     }
    00249     return true;
    00250   } else {
    00251     if (_game_mode != GM_MENU) {
    00252       /* Considering the assertion above, p1 == 0 is true here. */
    00253       bool success = CopyHeightlevelDataFromExtendedToOld();
    00254       if (!success) {
    00255         _settings_game.construction.allow_more_heightlevels = true;
    00256         ShowErrorMessage(STR_CONFIG_SETTING_ERROR_NO_CHANGE_TO_OLD_POSSIBLE, INVALID_STRING_ID, WL_WARNING);
    00257         return false;
    00258         }
    00259       }
    00260     /* Other settings are reduced to old heightlevels. */
    00261     _settings_newgame.game_creation.snow_line_height     = Clamp(_settings_newgame.game_creation.snow_line_height, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT_OLD);
    00262     _settings_newgame.game_creation.se_flat_world_height = Clamp(_settings_newgame.game_creation.se_flat_world_height, 0, MAX_TILE_HEIGHT_OLD);
    00263     _settings_newgame.game_creation.tree_line_height     = Clamp(_settings_newgame.game_creation.tree_line_height, MIN_TREELINE_HEIGHT, MAX_TREELINE_HEIGHT_OLD);
    00264     return true;
    00265   }
    00266 }
    00267
    00268 static const SettingDesc _music_settings[] = {
    00269    SDT_VAR(MusicFileSettings, playlist,   SLE_UINT8, S, 0, 0,     0,   5, 1, STR_NULL, NULL),
    00270    SDT_VAR(MusicFileSettings, music_vol,  SLE_UINT8, S, 0, 127,   0, 127, 1, STR_NULL, NULL),
    00271    SDT_VAR(MusicFileSettings, effect_vol, SLE_UINT8, S, 0, 127,   0, 127, 1, STR_NULL, NULL),
    00272   SDT_LIST(MusicFileSettings, custom_1,   SLE_UINT8, S, 0, NULL,             STR_NULL, NULL),
    00273   SDT_LIST(MusicFileSettings, custom_2,   SLE_UINT8, S, 0, NULL,             STR_NULL, NULL),
    00274   SDT_BOOL(MusicFileSettings, playing,               S, 0, true,             STR_NULL, NULL),
    00275   SDT_BOOL(MusicFileSettings, shuffle,               S, 0, false,            STR_NULL, NULL),
    00276    SDT_END()
    00277 };
    00278
    00279 /* win32_v.cpp only settings */
    00280 #if defined(WIN32) && !defined(DEDICATED)
    00281 extern bool _force_full_redraw, _window_maximize;
    00282 extern uint _display_hz, _fullscreen_bpp;
    00283
    00284 static const SettingDescGlobVarList _win32_settings[] = {
    00285    SDTG_VAR("display_hz",              SLE_UINT,    S, 0, _display_hz,             0,     0, 120,        0, STR_NULL, NULL),
    00286   SDTG_BOOL("force_full_redraw",                    S, 0, _force_full_redraw,      false,                   STR_NULL, NULL),
    00287    SDTG_VAR("fullscreen_bpp",          SLE_UINT,    S, 0, _fullscreen_bpp,         8,     8, 32,         0, STR_NULL, NULL),
    00288   SDTG_BOOL("window_maximize",                      S, 0, _window_maximize,        false,                   STR_NULL, NULL),
    00289    SDTG_END()
    00290 };
    00291 #endif /* WIN32 */
    00292
    00293 extern char _config_language_file[MAX_PATH];
    00294
    00295 static const SettingDescGlobVarList _misc_settings[] = {
    00296   SDTG_MMANY("display_opt",           SLE_UINT8,    S, 0, _display_opt, (1 << DO_SHOW_TOWN_NAMES | 1 << DO_SHOW_STATION_NAMES | 1 << DO_SHOW_SIGNS | 1 << DO_FULL_ANIMATION | 1 << DO_FULL_DETAIL | 1 << DO_SHOW_WAYPOINT_NAMES), "SHOW_TOWN_NAMES|SHOW_STATION_NAMES|SHOW_SIGNS|FULL_ANIMATION||FULL_DETAIL|WAYPOINTS", STR_NULL, NULL),
    00297    SDTG_BOOL("news_ticker_sound",                   S, 0, _news_ticker_sound,      true,                    STR_NULL, NULL),
    00298    SDTG_BOOL("fullscreen",                          S, 0, _fullscreen,             false,                   STR_NULL, NULL),
    00299     SDTG_STR("graphicsset",            SLE_STRQ,    S, 0, BaseGraphics::ini_set,   NULL,                    STR_NULL, NULL),
    00300     SDTG_STR("soundsset",              SLE_STRQ,    S, 0, BaseSounds::ini_set,     NULL,                    STR_NULL, NULL),
    00301     SDTG_STR("musicset",               SLE_STRQ,    S, 0, BaseMusic::ini_set,      NULL,                    STR_NULL, NULL),
    00302     SDTG_STR("videodriver",            SLE_STRQ,    S, 0, _ini_videodriver,        NULL,                    STR_NULL, NULL),
    00303     SDTG_STR("musicdriver",            SLE_STRQ,    S, 0, _ini_musicdriver,        NULL,                    STR_NULL, NULL),
    00304     SDTG_STR("sounddriver",            SLE_STRQ,    S, 0, _ini_sounddriver,        NULL,                    STR_NULL, NULL),
    00305     SDTG_STR("blitter",                SLE_STRQ,    S, 0, _ini_blitter,            NULL,                    STR_NULL, NULL),
    00306     SDTG_STR("language",               SLE_STRB,    S, 0, _config_language_file,   NULL,                    STR_NULL, NULL),
    00307   SDTG_CONDLIST("resolution",           SLE_INT, 2, S, 0, _cur_resolution,         "640,480",               STR_NULL, NULL, 0, SL_MAX_VERSION), // workaround for implicit lengthof() in SDTG_LIST
    00308     SDTG_STR("screenshot_format",      SLE_STRB,    S, 0, _screenshot_format_name, NULL,                    STR_NULL, NULL),
    00309     SDTG_STR("savegame_format",        SLE_STRB,    S, 0, _savegame_format,        NULL,                    STR_NULL, NULL),
    00310    SDTG_BOOL("rightclick_emulate",                  S, 0, _rightclick_emulate,     false,                   STR_NULL, NULL),
    00311 #ifdef WITH_FREETYPE
    00312     SDTG_STR("small_font",             SLE_STRB,    S, 0, _freetype.small_font,    NULL,                    STR_NULL, NULL),
    00313     SDTG_STR("medium_font",            SLE_STRB,    S, 0, _freetype.medium_font,   NULL,                    STR_NULL, NULL),
    00314     SDTG_STR("large_font",             SLE_STRB,    S, 0, _freetype.large_font,    NULL,                    STR_NULL, NULL),
    00315     SDTG_VAR("small_size",             SLE_UINT,    S, 0, _freetype.small_size,    8,     0, 72,         0, STR_NULL, NULL),
    00316     SDTG_VAR("medium_size",            SLE_UINT,    S, 0, _freetype.medium_size,   10,    0, 72,         0, STR_NULL, NULL),
    00317     SDTG_VAR("large_size",             SLE_UINT,    S, 0, _freetype.large_size,    16,    0, 72,         0, STR_NULL, NULL),
    00318    SDTG_BOOL("small_aa",                            S, 0, _freetype.small_aa,      false,                   STR_NULL, NULL),
    00319    SDTG_BOOL("medium_aa",                           S, 0, _freetype.medium_aa,     false,                   STR_NULL, NULL),
    00320    SDTG_BOOL("large_aa",                            S, 0, _freetype.large_aa,      false,                   STR_NULL, NULL),
    00321 #endif
    00322     SDTG_VAR("sprite_cache_size",      SLE_UINT,    S, 0, _sprite_cache_size,       4,    1, 64,         0, STR_NULL, NULL),
    00323     SDTG_VAR("player_face",          SLE_UINT32,    S, 0, _company_manager_face,    0,    0, 0xFFFFFFFF, 0, STR_NULL, NULL),
    00324     SDTG_VAR("transparency_options",   SLE_UINT,    S, 0, _transparency_opt,        0,    0, 0x3FF,      0, STR_NULL, NULL),
    00325     SDTG_VAR("transparency_locks",     SLE_UINT,    S, 0, _transparency_lock,       0,    0, 0x3FF,      0, STR_NULL, NULL),
    00326     SDTG_VAR("invisibility_options",   SLE_UINT,    S, 0, _invisibility_opt,        0,    0, 0xFF,       0, STR_NULL, NULL),
    00327     SDTG_STR("keyboard",               SLE_STRB,    S, 0, _keyboard_opt[0],         NULL,                   STR_NULL, NULL),
    00328     SDTG_STR("keyboard_caps",          SLE_STRB,    S, 0, _keyboard_opt[1],         NULL,                   STR_NULL, NULL),
    00329     SDTG_END()
    00330 };
    00331
    00332 static const uint GAME_DIFFICULTY_NUM = 18;
    00333 static uint16 _old_diff_custom[GAME_DIFFICULTY_NUM];
    00334
    00335 /* Most of these strings are used both for gameopt-backward compatability
    00336  * and the settings tables. The rest is here for consistency. */
    00337 static const char *_locale_currencies = "GBP|USD|EUR|YEN|ATS|BEF|CHF|CZK|DEM|DKK|ESP|FIM|FRF|GRD|HUF|ISK|ITL|NLG|NOK|PLN|RON|RUR|SIT|SEK|YTL|SKK|BRL|EEK|custom";
    00338 static const char *_locale_units      = "imperial|metric|si";
    00339 static const char *_town_names        = "english|french|german|american|latin|silly|swedish|dutch|finnish|polish|slovak|norwegian|hungarian|austrian|romanian|czech|swiss|danish|turkish|italian|catalan";
    00340 static const char *_climates          = "temperate|arctic|tropic|toyland";
    00341 static const char *_autosave_interval = "off|daily|weekly|monthly|quarterly|half year|yearly";
    00342 static const char *_roadsides         = "left|right";
    00343 static const char *_savegame_date     = "long|short|iso";
    00344 #ifdef ENABLE_NETWORK
    00345 static const char *_server_langs      = "ANY|ENGLISH|GERMAN|FRENCH|BRAZILIAN|BULGARIAN|CHINESE|CZECH|DANISH|DUTCH|ESPERANTO|FINNISH|HUNGARIAN|ICELANDIC|ITALIAN|JAPANESE|KOREAN|LITHUANIAN|NORWEGIAN|POLISH|PORTUGUESE|ROMANIAN|RUSSIAN|SLOVAK|SLOVENIAN|SPANISH|SWEDISH|TURKISH|UKRAINIAN|AFRIKAANS|CROATIAN|CATALAN|ESTONIAN|GALICIAN|GREEK|LATVIAN";
    00346 #endif /* ENABLE_NETWORK */
    00347
    00348 static const SettingDesc _gameopt_settings[] = {
    00349   /* In version 4 a new difficulty setting has been added to the difficulty settings,
    00350    * town attitude towards demolishing. Needs special handling because some dimwit thought
    00351    * it funny to have the GameDifficulty struct be an array while it is a struct of
    00352    * same-sized members
    00353    * XXX - To save file-space and since values are never bigger than about 10? only
    00354    * save the first 16 bits in the savegame. Question is why the values are still int32
    00355    * and why not byte for example?
    00356    * 'SLE_FILE_I16 | SLE_VAR_U16' in "diff_custom" is needed to get around SlArray() hack
    00357    * for savegames version 0 - though it is an array, it has to go through the byteswap process */
    00358    SDTG_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, SLE_FILE_I16 | SLE_VAR_U16,       C, 0, _old_diff_custom, 17, 0, 0, 0, 0, NULL, STR_NULL, NULL, 0, 3),
    00359    SDTG_GENERAL("diff_custom", SDT_INTLIST, SL_ARR, SLE_UINT16,                       C, 0, _old_diff_custom, 18, 0, 0, 0, 0, NULL, STR_NULL, NULL, 4, SL_MAX_VERSION),
    00360
    00361         SDT_VAR(GameSettings, difficulty.diff_level,       SLE_UINT8,                 0, 0, 3, 0, 3, 0,                                STR_NULL, NULL),
    00362       SDT_OMANY(GameSettings, locale.currency,             SLE_UINT8,                 N, 0, 0, CUSTOM_CURRENCY_ID, _locale_currencies, STR_NULL, NULL, NULL),
    00363       SDT_OMANY(GameSettings, locale.units,                SLE_UINT8,                 N, 0, 1, 2,                  _locale_units,      STR_NULL, NULL, NULL),
    00364   /* There are only 21 predefined town_name values (0-20), but you can have more with newgrf action F so allow these bigger values (21-255). Invalid values will fallback to english on use and (undefined string) in GUI. */
    00365       SDT_OMANY(GameSettings, game_creation.town_name,     SLE_UINT8,                 0, 0, 0, 255, _town_names, STR_NULL, NULL, NULL),
    00366       SDT_OMANY(GameSettings, game_creation.landscape,     SLE_UINT8,                 0, 0, 0, 3,     _climates, STR_NULL, NULL, ConvertLandscape),
    00367     SDT_CONDVAR(GameSettings, game_creation.snow_line,     SLE_FILE_U8 | SLE_VAR_U16, 0,          MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, 0, DEF_SNOWLINE_HEIGHT_OLD * TILE_HEIGHT,      MIN_SNOWLINE_HEIGHT * TILE_HEIGHT, MAX_SNOWLINE_HEIGHT_OLD * TILE_HEIGHT,      0, STR_NULL, NULL),
    00368     SDT_CONDVAR(GameSettings, game_creation.snow_line,     SLE_UINT16,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION, SL_MAX_VERSION, 0, 0, DEF_SNOWLINE_HEIGHT_EXTENDED * TILE_HEIGHT, MIN_SNOWLINE_HEIGHT * TILE_HEIGHT, MAX_SNOWLINE_HEIGHT_EXTENDED * TILE_HEIGHT, 0, STR_NULL, NULL),
    00369     SDT_CONDVAR(GameSettings, game_creation.desert_amount, SLE_UINT8,                 DESERT_SV, SL_MAX_VERSION, 0, 0, DEF_DESERT_AMOUNT, MIN_DESERT_AMOUNT, MAX_DESERT_AMOUNT, 1, STR_NULL, NULL),
    00370     SDT_CONDVAR(GameSettings, game_creation.tree_line,     SLE_FILE_U8 | SLE_VAR_U16, MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 2, MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, 0, DEF_TREELINE_HEIGHT_OLD * TILE_HEIGHT,      MIN_TREELINE_HEIGHT * TILE_HEIGHT, MAX_TREELINE_HEIGHT_OLD * TILE_HEIGHT,      0, STR_NULL, NULL),
    00371     SDT_CONDVAR(GameSettings, game_creation.tree_line,     SLE_UINT16,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION,                            SL_MAX_VERSION, 0, 0, DEF_TREELINE_HEIGHT_EXTENDED * TILE_HEIGHT, MIN_TREELINE_HEIGHT * TILE_HEIGHT, MAX_TREELINE_HEIGHT_EXTENDED * TILE_HEIGHT, 0, STR_NULL, NULL),
    00372    SDT_CONDNULL(1,  0, 22),
    00373    SDTC_CONDOMANY(              gui.autosave,                SLE_UINT8,                 23, SL_MAX_VERSION, S, 0, 3, 6, _autosave_interval, STR_NULL, NULL),
    00374       SDT_OMANY(GameSettings, vehicle.road_side,           SLE_UINT8,                 0, 0, 1, 1, _roadsides, STR_NULL, NULL, NULL),
    00375       SDT_END()
    00376 };
    00377
    00378 /* Some settings do not need to be synchronised when playing in multiplayer.
    00379  * These include for example the GUI settings and will not be saved with the
    00380  * savegame.
    00381  * It is also a bit tricky since you would think that service_interval
    00382  * for example doesn't need to be synched. Every client assigns the
    00383  * service_interval value to the v->service_interval, meaning that every client
    00384  * assigns his value. If the setting was company-based, that would mean that
    00385  * vehicles could decide on different moments that they are heading back to a
    00386  * service depot, causing desyncs on a massive scale. */
    00387 const SettingDesc _settings[] = {
    00388   /***************************************************************************/
    00389   /* Saved settings variables. */
    00390   /* Do not ADD or REMOVE something in this "difficulty.XXX" table or before it. It breaks savegame compatability. */
    00391    SDT_CONDVAR(GameSettings, difficulty.max_no_competitors,                  SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    0,                              0,                  MAX_COMPANIES-1,              1,     STR_NULL,                                               MaxNoAIsChange),
    00392   SDT_CONDNULL(1, 97, 109),
    00393    SDT_CONDVAR(GameSettings, difficulty.number_towns,                        SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NG,    2,                              0,                  4,                            1,     STR_NUM_VERY_LOW,                                       DifficultyChange),
    00394    SDT_CONDVAR(GameSettings, difficulty.industry_density,                    SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NG,    ID_END-1,                       0,                  ID_END-1,                     1,     STR_FUNDING_ONLY,                                       DifficultyChange),
    00395    SDT_CONDVAR(GameSettings, difficulty.max_loan,                            SLE_UINT32,                97,                                    SL_MAX_VERSION,                        0, NS|CR, 300000,                         100000,             500000,                       50000, STR_NULL,                                               DifficultyChange),
    00396    SDT_CONDVAR(GameSettings, difficulty.initial_interest,                    SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NS,    2,                              2,                  4,                            1,     STR_NULL,                                               DifficultyChange),
    00397    SDT_CONDVAR(GameSettings, difficulty.vehicle_costs,                       SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NS,    0,                              0,                  2,                            1,     STR_SEA_LEVEL_LOW,                                      DifficultyChange),
    00398    SDT_CONDVAR(GameSettings, difficulty.competitor_speed,                    SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    2,                              0,                  4,                            1,     STR_AI_SPEED_VERY_SLOW,                                 DifficultyChange),
    00399   SDT_CONDNULL(1, 97, 109),
    00400    SDT_CONDVAR(GameSettings, difficulty.vehicle_breakdowns,                  SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    1,                              0,                  2,                            1,     STR_DISASTER_NONE,                                      DifficultyChange),
    00401    SDT_CONDVAR(GameSettings, difficulty.subsidy_multiplier,                  SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    2,                              0,                  3,                            1,     STR_SUBSIDY_X1_5,                                       DifficultyChange),
    00402    SDT_CONDVAR(GameSettings, difficulty.construction_cost,                   SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NS,    0,                              0,                  2,                            1,     STR_SEA_LEVEL_LOW,                                      DifficultyChange),
    00403    SDT_CONDVAR(GameSettings, difficulty.terrain_type,                        SLE_FILE_U8 | SLE_VAR_U8,  97,                                    MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, NG,    1,                              0,                  3,                            1,     STR_TERRAIN_TYPE_VERY_FLAT,                             DifficultyChange),
    00404    SDT_CONDVAR(GameSettings, difficulty.terrain_type,                        SLE_UINT8,                 MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        0, NG,    1,                              0,                  6,                            1,     STR_TERRAIN_TYPE_FALLEN,                                DifficultyChange),
    00405    SDT_CONDVAR(GameSettings, difficulty.quantity_sea_lakes,                  SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NG,    0,                              0,                  4,                            1,     STR_SEA_LEVEL_VERY_LOW,                                 DifficultyChange),
    00406    SDT_CONDVAR(GameSettings, difficulty.economy,                             SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    0,                              0,                  1,                            1,     STR_ECONOMY_STEADY,                                     DifficultyChange),
    00407    SDT_CONDVAR(GameSettings, difficulty.line_reverse_mode,                   SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    0,                              0,                  1,                            1,     STR_REVERSE_AT_END_OF_LINE_AND_AT_STATIONS,             DifficultyChange),
    00408    SDT_CONDVAR(GameSettings, difficulty.disasters,                           SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    0,                              0,                  1,                            1,     STR_DISASTERS_OFF,                                      DifficultyChange),
    00409    SDT_CONDVAR(GameSettings, difficulty.town_council_tolerance,              SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    0,                              0,                  2,                            1,     STR_CITY_APPROVAL_PERMISSIVE,                           DifficultyNoiseChange),
    00410    SDT_CONDVAR(GameSettings, difficulty.diff_level,                          SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0,  0,    3,                              0,                  3,                            0,     STR_NULL,                                               DifficultyReset),
    00411
    00412   /* There are only 21 predefined town_name values (0-20), but you can have more with newgrf action F so allow these bigger values (21-255). Invalid values will fallback to english on use and (undefined string) in GUI. */
    00413    SDT_CONDOMANY(GameSettings, game_creation.town_name,                        SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NN,    0,                              255,              _town_names,                          STR_NULL,                                                NULL, NULL),
    00414    SDT_CONDOMANY(GameSettings, game_creation.landscape,                        SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NN,    0,                              3,                _climates,                            STR_NULL,                                                NULL, ConvertLandscape),
    00415      SDT_CONDVAR(GameSettings, game_creation.snow_line,                        SLE_FILE_U8 | SLE_VAR_U16, 97,                                    MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, NN,    DEF_SNOWLINE_HEIGHT_OLD * TILE_HEIGHT,      MIN_SNOWLINE_HEIGHT * TILE_HEIGHT, MAX_SNOWLINE_HEIGHT_OLD * TILE_HEIGHT,      0, STR_NULL,          NULL),
    00416      SDT_CONDVAR(GameSettings, game_creation.snow_line,                        SLE_UINT16,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        0, NN,    DEF_SNOWLINE_HEIGHT_EXTENDED * TILE_HEIGHT, MIN_SNOWLINE_HEIGHT * TILE_HEIGHT, MAX_SNOWLINE_HEIGHT_EXTENDED * TILE_HEIGHT, 0, STR_NULL,          NULL),
    00417    SDT_CONDVAR(GameSettings, game_creation.desert_amount,                    SLE_UINT8,                 DESERT_SV,                             SL_MAX_VERSION,                        0, NN,    DEF_DESERT_AMOUNT,                          MIN_DESERT_AMOUNT,                 MAX_DESERT_AMOUNT,                          0, STR_NULL,          NULL),
    00418      SDT_CONDVAR(GameSettings, game_creation.tree_line,                        SLE_FILE_U8 | SLE_VAR_U16, MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 2, MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, NN,    DEF_TREELINE_HEIGHT_OLD * TILE_HEIGHT,      MIN_TREELINE_HEIGHT * TILE_HEIGHT, MAX_TREELINE_HEIGHT_OLD * TILE_HEIGHT,      0, STR_NULL,          NULL),
    00419      SDT_CONDVAR(GameSettings, game_creation.tree_line,                        SLE_UINT16,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        0, NN,    DEF_TREELINE_HEIGHT_EXTENDED * TILE_HEIGHT, MIN_TREELINE_HEIGHT * TILE_HEIGHT, MAX_TREELINE_HEIGHT_EXTENDED * TILE_HEIGHT, 0, STR_NULL,          NULL),
    00420    SDT_CONDOMANY(GameSettings, vehicle.road_side,                              SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        0, NN,    1,                             1,                  _roadsides,                          STR_NULL,                                                CheckRoadSide, NULL),
    00421
    00422 // TODO: savegameversion + 1 and no network.
    00423   SDT_CONDBOOL(GameSettings, construction.allow_more_heightlevels,                                      MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_MORE_HEIGHTLEVELS,                   AfterChangeOfAllowMoreHeightlevels),
    00424       SDT_BOOL(GameSettings, construction.build_on_slopes,                                                                                                                            0, NN,    true,                                                                                    STR_CONFIG_SETTING_BUILDONSLOPES,                       NULL),
    00425    SDT_CONDVAR(GameSettings, construction.command_pause_level,               SLE_UINT8,                 154,                                   BEFORE_ADDING_PATCHES_SL,              0, MS|NN, 1,                             0,                  3,                             1,     STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL,                 NULL),
    00426    SDT_CONDVAR(GameSettings, construction.command_pause_level,               SLE_UINT8,                 KEEP_COMPATIBLE_12_SV,                 SL_MAX_VERSION,                        0, MS|NN, 1,                             0,                  3,                             1,     STR_CONFIG_SETTING_COMMAND_PAUSE_LEVEL,                 NULL),
    00427    SDT_CONDVAR(GameSettings, construction.terraform_per_64k_frames,          SLE_UINT32,                156,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     64 << 16,                      0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00428    SDT_CONDVAR(GameSettings, construction.terraform_per_64k_frames,          SLE_UINT32,                KEEP_COMPATIBLE_14_SV,                 SL_MAX_VERSION,                        0, 0,     64 << 16,                      0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00429    SDT_CONDVAR(GameSettings, construction.terraform_frame_burst,             SLE_UINT16,                156,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     4096,                          0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00430    SDT_CONDVAR(GameSettings, construction.terraform_frame_burst,             SLE_UINT16,                KEEP_COMPATIBLE_14_SV,                 SL_MAX_VERSION,                        0, 0,     4096,                          0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00431    SDT_CONDVAR(GameSettings, construction.clear_per_64k_frames,              SLE_UINT32,                156,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     64 << 16,                      0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00432    SDT_CONDVAR(GameSettings, construction.clear_per_64k_frames,              SLE_UINT32,                KEEP_COMPATIBLE_14_SV,                 SL_MAX_VERSION,                        0, 0,     64 << 16,                      0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00433    SDT_CONDVAR(GameSettings, construction.clear_frame_burst,                 SLE_UINT16,                156,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     4096,                          0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00434    SDT_CONDVAR(GameSettings, construction.clear_frame_burst,                 SLE_UINT16,                KEEP_COMPATIBLE_14_SV,                 SL_MAX_VERSION,                        0, 0,     4096,                          0,                  1 << 30,                       1,     STR_NULL,                                               NULL),
    00435   SDT_CONDBOOL(GameSettings, construction.autoslope,                                                    75,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_AUTOSLOPE,                           NULL),
    00436       SDT_BOOL(GameSettings, construction.extra_dynamite,                                                                                                                             0, 0,     true,                                                                                    STR_CONFIG_SETTING_EXTRADYNAMITE,                       NULL),
    00437    SDT_CONDVAR(GameSettings, construction.max_bridge_length,                 SLE_UINT16,                159,                                   BEFORE_ADDING_PATCHES_SL,              0, NN,    64,                            1,                  2048,                          1,     STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH,                   NULL),
    00438    SDT_CONDVAR(GameSettings, construction.max_bridge_length,                 SLE_UINT16,                KEEP_COMPATIBLE_17_SV,                 SL_MAX_VERSION,                        0, NN,    64,                            1,                  2048,                          1,     STR_CONFIG_SETTING_MAX_BRIDGE_LENGTH,                   NULL),
    00439    SDT_CONDVAR(GameSettings, construction.max_tunnel_length,                 SLE_UINT16,                159,                                   BEFORE_ADDING_PATCHES_SL,              0, NN,    64,                            1,                  2048,                          1,     STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH,                   NULL),
    00440    SDT_CONDVAR(GameSettings, construction.max_tunnel_length,                 SLE_UINT16,                KEEP_COMPATIBLE_17_SV,                 SL_MAX_VERSION,                        0, NN,    64,                            1,                  2048,                          1,     STR_CONFIG_SETTING_MAX_TUNNEL_LENGTH,                   NULL),
    00441   SDT_CONDNULL(1, 0, 158), // construction.longbridges
    00442   SDT_CONDNULL(1, BEFORE_ADDING_PATCHES_SL, KEEP_COMPATIBLE_16_SV), // construction.longbridges
    00443       SDT_BOOL(GameSettings, construction.signal_side,                                                                                                                                N, NN,    true,                                                                                    STR_CONFIG_SETTING_SIGNALSIDE,                          RedrawScreen),
    00444       SDT_BOOL(GameSettings, station.never_expire_airports,                                                                                                                           0, NN,    false,                                                                                   STR_CONFIG_SETTING_NEVER_EXPIRE_AIRPORTS,               NULL),
    00445    SDT_CONDVAR(GameSettings, economy.town_layout,                            SLE_UINT8,                 59,                                    SL_MAX_VERSION,                        0, MS,    TL_ORIGINAL,                   TL_BEGIN,           NUM_TLS - 1,                   1,     STR_CONFIG_SETTING_TOWN_LAYOUT,                         TownFoundingChanged),
    00446   SDT_CONDBOOL(GameSettings, economy.allow_town_roads,                                                  113,                                   SL_MAX_VERSION,                        0, NN,    true,                                                                                    STR_CONFIG_SETTING_ALLOW_TOWN_ROADS,                    NULL),
    00447   SDTG_CONDVAR("daylength_factor", SLE_UINT8, 0, 0, _date_daylength_factor, 1, 1, 255, 1, STR_CONFIG_SETTING_DAYLENGTH_FACTOR, NULL, DAYLENGHT_SL, SL_MAX_VERSION),
    00448    SDT_CONDVAR(GameSettings, economy.found_town,                             SLE_UINT8,                 128,                                   SL_MAX_VERSION,                        0, MS,    TF_FORBIDDEN,                  TF_BEGIN,           TF_END - 1,                    1,     STR_CONFIG_SETTING_TOWN_FOUNDING,                       TownFoundingChanged),
    00449   SDT_CONDBOOL(GameSettings, economy.allow_town_level_crossings,                                        143,                                   SL_MAX_VERSION,                        0, NN,    true,                                                                                    STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS,          NULL),
    00450    SDT_CONDVAR(GameSettings, economy.town_cargo_factor,                      SLE_INT8,                  TOWN_CARGO_FACTOR_SL,                  SL_MAX_VERSION,                        0, 0,     0,                             -16,                8,                             1,     STR_CONFIG_SETTING_TOWN_CARGO_FACTOR,                   NULL),
    00451
    00452        SDT_VAR(GameSettings, vehicle.train_acceleration_model,               SLE_UINT8,                                                                                               0, MS,    0,                             0,                  1,                             1,     STR_CONFIG_SETTING_TRAIN_ACCELERATION_MODEL,            TrainAccelerationModelChanged),
    00453    SDT_CONDVAR(GameSettings, vehicle.roadveh_acceleration_model,             SLE_UINT8,                 139,                                   SL_MAX_VERSION,                        0, MS,    0,                             0,                  1,                             1,     STR_CONFIG_SETTING_ROAD_VEHICLE_ACCELERATION_MODEL,     RoadVehAccelerationModelChanged),
    00454    SDT_CONDVAR(GameSettings, vehicle.train_slope_steepness,                  SLE_UINT8,                 133,                                   SL_MAX_VERSION,                        0, 0,     3,                             0,                  10,                            1,     STR_CONFIG_SETTING_TRAIN_SLOPE_STEEPNESS,               TrainSlopeSteepnessChanged),
    00455    SDT_CONDVAR(GameSettings, vehicle.roadveh_slope_steepness,                SLE_UINT8,                 139,                                   SL_MAX_VERSION,                        0, 0,     7,                             0,                  10,                            1,     STR_CONFIG_SETTING_ROAD_VEHICLE_SLOPE_STEEPNESS,        RoadVehSlopeSteepnessChanged),
    00456       SDT_BOOL(GameSettings, pf.forbid_90_deg,                                                                                                                                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_FORBID_90_DEG,                       NULL),
    00457   SDT_CONDBOOL(GameSettings, pf.back_of_one_way_pbs_waiting_point,                                      BACK_ONE_WAY_SIGNAL_SAFE_WAITING_SL,   SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_BACK_ONE_WAY_PBS_SAFE_WAITING,       NULL),
    00458    SDT_CONDVAR(GameSettings, vehicle.max_train_length,                       SLE_UINT8,                 159,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     7,                             1,                  64,                            1,     STR_CONFIG_SETTING_TRAIN_LENGTH,                        NULL),
    00459    SDT_CONDVAR(GameSettings, vehicle.max_train_length,                       SLE_UINT8,                 KEEP_COMPATIBLE_17_SV,                 SL_MAX_VERSION,                        0, 0,     7,                             1,                  64,                            1,     STR_CONFIG_SETTING_TRAIN_LENGTH,                        NULL),
    00460   SDT_CONDNULL(1, 0, 158), // vehicle.mammoth_trains
    00461   SDT_CONDNULL(1, BEFORE_ADDING_PATCHES_SL, KEEP_COMPATIBLE_16_SV), // vehicle.mammoth_trains
    00462    SDT_CONDVAR(GameSettings, vehicle.smoke_amount,                           SLE_UINT8,                 145,                                   SL_MAX_VERSION,                        0, MS,    1,                             0,                  2,                             0,     STR_CONFIG_SETTING_SMOKE_AMOUNT,                        NULL),
    00463       SDT_BOOL(GameSettings, order.gotodepot,                                                                                                                                         0, 0,     true,                                                                                    STR_CONFIG_SETTING_GOTODEPOT,                           NULL),
    00464       SDT_BOOL(GameSettings, pf.roadveh_queue,                                                                                                                                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_ROAD_VEHICLE_QUEUEING,               NULL),
    00465   SDT_CONDBOOL(GameSettings, pf.new_pathfinding_all,                                                     0,                                    86,                                    0, 0,     false,                                                                                   STR_NULL,                                               NULL),
    00466   SDT_CONDBOOL(GameSettings, pf.yapf.ship_use_yapf,                                                     28,                                    86,                                    0, 0,     false,                                                                                   STR_NULL,                                               NULL),
    00467   SDT_CONDBOOL(GameSettings, pf.yapf.road_use_yapf,                                                     28,                                    86,                                    0, 0,     true,                                                                                    STR_NULL,                                               NULL),
    00468   SDT_CONDBOOL(GameSettings, pf.yapf.rail_use_yapf,                                                     28,                                    86,                                    0, 0,     true,                                                                                    STR_NULL,                                               NULL),
    00469
    00470    SDT_CONDVAR(GameSettings, pf.pathfinder_for_trains,                       SLE_UINT8,                 87,                                    SL_MAX_VERSION,                        0, MS,    2,                             1,                  2,                             1,     STR_CONFIG_SETTING_PATHFINDER_FOR_TRAINS,               NULL),
    00471    SDT_CONDVAR(GameSettings, pf.pathfinder_for_roadvehs,                     SLE_UINT8,                 87,                                    SL_MAX_VERSION,                        0, MS,    2,                             1,                  2,                             1,     STR_CONFIG_SETTING_PATHFINDER_FOR_ROAD_VEHICLES,        NULL),
    00472    SDT_CONDVAR(GameSettings, pf.pathfinder_for_ships,                        SLE_UINT8,                 87,                                    SL_MAX_VERSION,                        0, MS,    2,                             0,                  2,                             1,     STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS,                NULL),
    00473
    00474       SDT_BOOL(GameSettings, vehicle.never_expire_vehicles,                                                                                                                           0, NN,    false,                                                                                   STR_CONFIG_SETTING_NEVER_EXPIRE_VEHICLES,               NULL),
    00475        SDT_VAR(GameSettings, vehicle.max_trains,                             SLE_UINT16,                                                                                              0, 0,     500,                           0,                  5000,                          0,     STR_CONFIG_SETTING_MAX_TRAINS,                          RedrawScreen),
    00476        SDT_VAR(GameSettings, vehicle.max_roadveh,                            SLE_UINT16,                                                                                              0, 0,     500,                           0,                  5000,                          0,     STR_CONFIG_SETTING_MAX_ROAD_VEHICLES,                   RedrawScreen),
    00477        SDT_VAR(GameSettings, vehicle.max_aircraft,                           SLE_UINT16,                                                                                              0, 0,     200,                           0,                  5000,                          0,     STR_CONFIG_SETTING_MAX_AIRCRAFT,                        RedrawScreen),
    00478        SDT_VAR(GameSettings, vehicle.max_ships,                              SLE_UINT16,                                                                                              0, 0,     300,                           0,                  5000,                          0,     STR_CONFIG_SETTING_MAX_SHIPS,                           RedrawScreen),
    00479    SDTG_CONDBOOL(NULL, 0, NN, _old_vds.servint_ispercent, false, STR_NULL, NULL, 0, 119),
    00480   SDTG_CONDVAR(NULL, SLE_UINT16, 0, D0, _old_vds.servint_trains, 150, 5, 800, 0, STR_NULL, NULL, 0, 119),
    00481   SDTG_CONDVAR(NULL, SLE_UINT16, 0, D0, _old_vds.servint_roadveh, 150, 5, 800, 0, STR_NULL, NULL, 0, 119),
    00482   SDTG_CONDVAR(NULL, SLE_UINT16, 0, D0, _old_vds.servint_ships, 360, 5, 800, 0, STR_NULL, NULL, 0, 119),
    00483   SDTG_CONDVAR(NULL, SLE_UINT16, 0, D0, _old_vds.servint_aircraft, 150, 5, 800, 0, STR_NULL, NULL, 0, 119),
    00484       SDT_BOOL(GameSettings, order.no_servicing_if_no_breakdowns,                                                                                                                     0, 0,     true,                                                                                    STR_CONFIG_SETTING_NOSERVICE,                           NULL),
    00485       SDT_BOOL(GameSettings, vehicle.wagon_speed_limits,                                                                                                                              0, NN,    true,                                                                                    STR_CONFIG_SETTING_WAGONSPEEDLIMITS,                    UpdateConsists),
    00486   SDT_CONDBOOL(GameSettings, vehicle.disable_elrails,                                                   38,                                    SL_MAX_VERSION,                        0, NN,    false,                                                                                   STR_CONFIG_SETTING_DISABLE_ELRAILS,                     SettingsDisableElrail),
    00487    SDT_CONDVAR(GameSettings, vehicle.freight_trains,                         SLE_UINT8,                 39,                                    SL_MAX_VERSION,                        0, NN,    1,                             1,                  255,                           1,     STR_CONFIG_SETTING_FREIGHT_TRAINS,                      UpdateConsists),
    00488    SDT_CONDVAR(GUISettings,  ticks_per_minute,                               SLE_UINT8,                 KEEP_COMPATIBLE_20_SV,                 SL_MAX_VERSION,                        0, 0,     74,                            1,                  255,                           1,     STR_CONFIG_SETTING_TICKS_PER_MINUTE,                    InvalidateVehTimetableWindow),
    00489   SDT_CONDBOOL(GameSettings, order.timetabling,                                                         67,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_TIMETABLE_ALLOW,                     NULL),
    00490   SDT_CONDBOOL(GameSettings, order.timetable_automated,                                                 TIMESEP_SV,                            SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_TIMETABLE_AUTOMATED,                 NULL),
    00491   SDT_CONDBOOL(GameSettings, order.timetable_separation,                                                TIMESEP_SV,                            SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_TIMETABLE_SEPARATION,                NULL),
    00492    SDT_CONDVAR(GameSettings, vehicle.plane_speed,                            SLE_UINT8,                 90,                                    SL_MAX_VERSION,                        0, NN,    4,                             1,                  4,                             0,     STR_CONFIG_SETTING_PLANE_SPEED,                         NULL),
    00493   SDT_CONDBOOL(GameSettings, vehicle.dynamic_engines,                                                   95,                                    SL_MAX_VERSION,                        0, NN,    true,                                                                                    STR_CONFIG_SETTING_DYNAMIC_ENGINES,                     ChangeDynamicEngines),
    00494    SDT_CONDVAR(GameSettings, vehicle.plane_crashes,                          SLE_UINT8,                 138,                                   SL_MAX_VERSION,                        0, MS,    2,                             0,                  2,                             1,     STR_CONFIG_SETTING_PLANE_CRASHES,                       NULL),
    00495     SDT_CONDBOOL(GameSettings, vehicle.improved_breakdowns,                                             SL_IB,                                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_IMPROVED_BREAKDOWNS,                 NULL),
    00496
    00497   SDT_CONDNULL(1, 0, 158), // station.join_stations
    00498   SDT_CONDNULL(1, BEFORE_ADDING_PATCHES_SL, KEEP_COMPATIBLE_16_SV), // station.join_stations
    00499    SDTC_CONDBOOL(              gui.sg_full_load_any,                                                      22,                                    92,                                    0, 0,     true,                                                                                    STR_NULL,                                               NULL),
    00500       SDT_BOOL(GameSettings, order.improved_load,                                                                                                                                     0, NN,    true,                                                                                    STR_CONFIG_SETTING_IMPROVEDLOAD,                        NULL),
    00501       SDT_BOOL(GameSettings, order.selectgoods,                                                                                                                                       0, 0,     true,                                                                                    STR_CONFIG_SETTING_SELECTGOODS,                         NULL),
    00502    SDTC_CONDBOOL(              gui.sg_new_nonstop,                                                        22,                                    92,                                    0, 0,     false,                                                                                   STR_NULL,                                               NULL),
    00503   SDT_CONDNULL(1, 0, 158), // station.nonuniform_stations
    00504   SDT_CONDNULL(1, BEFORE_ADDING_PATCHES_SL, KEEP_COMPATIBLE_16_SV), // station.nonuniform_stations
    00505        SDT_VAR(GameSettings, station.station_spread,                         SLE_UINT8,                                                                                               0, 0,     12,                            4,                  64,                            0,     STR_CONFIG_SETTING_STATION_SPREAD,                      InvalidateStationBuildWindow),
    00506       SDT_BOOL(GameSettings, order.serviceathelipad,                                                                                                                                  0, 0,     true,                                                                                    STR_CONFIG_SETTING_SERVICEATHELIPAD,                    NULL),
    00507       SDT_BOOL(GameSettings, station.modified_catchment,                                                                                                                              0, 0,     true,                                                                                    STR_CONFIG_SETTING_CATCHMENT,                           StationCatchmentChanged),
    00508   SDT_CONDBOOL(GameSettings, order.gradual_loading,                                                     40,                                    SL_MAX_VERSION,                        0, NN,    true,                                                                                    STR_CONFIG_SETTING_GRADUAL_LOADING,                     NULL),
    00509   SDT_CONDBOOL(GameSettings, construction.road_stop_on_town_road,                                       47,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD,                   NULL),
    00510   SDT_CONDBOOL(GameSettings, construction.road_stop_on_competitor_road,                                 114,                                   SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD,             NULL),
    00511   SDT_CONDBOOL(GameSettings, station.adjacent_stations,                                                 62,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_ADJACENT_STATIONS,                   NULL),
    00512   SDT_CONDBOOL(GameSettings, economy.station_noise_level,                                               96,                                    SL_MAX_VERSION,                        0, NN,    false,                                                                                   STR_CONFIG_SETTING_NOISE_LEVEL,                         InvalidateTownViewWindow),
    00513   SDT_CONDBOOL(GameSettings, station.distant_join_stations,                                             106,                                   SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_DISTANT_JOIN_STATIONS,               DeleteSelectStationWindow),
    00514
    00515       SDT_BOOL(GameSettings, economy.inflation,                                                                                                                                       0, 0,     true,                                                                                    STR_CONFIG_SETTING_INFLATION,                           NULL),
    00516        SDT_VAR(GameSettings, construction.raw_industry_construction,         SLE_UINT8,                                                                                               0, MS,    0,                            0,                   2,                             0,     STR_CONFIG_SETTING_RAW_INDUSTRY_CONSTRUCTION_METHOD,    InvalidateBuildIndustryWindow),
    00517    SDT_CONDVAR(GameSettings, construction.industry_platform,                 SLE_UINT8,                 148,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     1,                            0,                   4,                             0,     STR_CONFIG_SETTING_INDUSTRY_PLATFORM,                   NULL),
    00518    SDT_CONDVAR(GameSettings, construction.industry_platform,                 SLE_UINT8,                 KEEP_COMPATIBLE_2_SV,                  SL_MAX_VERSION,                        0, 0,     1,                            0,                   4,                             0,     STR_CONFIG_SETTING_INDUSTRY_PLATFORM,                   NULL),
    00519       SDT_BOOL(GameSettings, economy.multiple_industry_per_town,                                                                                                                      0, 0,     false,                                                                                   STR_CONFIG_SETTING_MULTIPINDTOWN,                       NULL),
    00520    SDT_CONDVAR(GameSettings, construction.extra_industry_placement_logic,    SLE_UINT8,                 KEEP_COMPATIBLE_23_SV,                 SL_MAX_VERSION,                        0, NN,    60,                           1,                   255,                           1,     STR_CONFIG_SETTING_EXTRA_INDUSTRY_PLACEMENT_LOGIC,      NULL),
    00521   SDT_CONDNULL(1, 0, 140),
    00522       SDT_BOOL(GameSettings, economy.bribe,                                                                                                                                           0, 0,     true,                                                                                    STR_CONFIG_SETTING_BRIBE,                               RedrawTownAuthority),
    00523   SDT_CONDBOOL(GameSettings, economy.exclusive_rights,                                                  79,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_ALLOW_EXCLUSIVE,                     RedrawTownAuthority),
    00524   SDT_CONDBOOL(GameSettings, economy.fund_roads,                                                        160,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     true,                                                                                    STR_CONFIG_SETTING_ALLOW_FUND_ROAD,                     RedrawTownAuthority),
    00525   SDT_CONDBOOL(GameSettings, economy.fund_roads,                                                        KEEP_COMPATIBLE_18_SV,                 SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_ALLOW_FUND_ROAD,                     RedrawTownAuthority),
    00526   SDT_CONDBOOL(GameSettings, economy.give_money,                                                        79,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_ALLOW_GIVE_MONEY,                    NULL),
    00527    SDT_CONDVAR(GameSettings, game_creation.snow_line_height,                 SLE_FILE_U8 | SLE_VAR_U16, 0,                                     MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, 0,     DEF_SNOWLINE_HEIGHT_OLD,      MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT_OLD,       0,     STR_CONFIG_SETTING_SNOWLINE_HEIGHT,                     NULL),
    00528    SDT_CONDVAR(GameSettings, game_creation.snow_line_height,                 SLE_UINT16,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        0, 0,     DEF_SNOWLINE_HEIGHT_EXTENDED, MIN_SNOWLINE_HEIGHT, MAX_SNOWLINE_HEIGHT_EXTENDED,  0,     STR_CONFIG_SETTING_SNOWLINE_HEIGHT,                     NULL),
    00529    SDT_CONDVAR(GameSettings, game_creation.desert_amount,                    SLE_UINT8,                 DESERT_SV,                             SL_MAX_VERSION,                        0, NN,    DEF_DESERT_AMOUNT,            MIN_DESERT_AMOUNT,   MAX_DESERT_AMOUNT,             0,     STR_CONFIG_SETTING_DESERT_AMOUNT,                       NULL),
    00530    SDT_CONDVAR(GameSettings, game_creation.tree_line_height,                 SLE_FILE_U8 | SLE_VAR_U16, MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 2, MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, 0,     DEF_TREELINE_HEIGHT_OLD,      MIN_TREELINE_HEIGHT, MAX_TREELINE_HEIGHT_OLD,       0,     STR_CONFIG_SETTING_TREELINE_HEIGHT,                     NULL),
    00531    SDT_CONDVAR(GameSettings, game_creation.tree_line_height,                 SLE_UINT16,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        0, 0,     DEF_TREELINE_HEIGHT_EXTENDED, MIN_TREELINE_HEIGHT, MAX_TREELINE_HEIGHT_EXTENDED,  0,     STR_CONFIG_SETTING_TREELINE_HEIGHT,                     NULL),
    00532   SDT_CONDNULL(4, 0, 143),
    00533        SDT_VAR(GameSettings, game_creation.starting_year,                    SLE_INT32,                                                                                               0, NC,    DEF_START_YEAR,               MIN_YEAR,            MAX_YEAR,                      1,     STR_CONFIG_SETTING_STARTING_YEAR,                       NULL),
    00534   SDT_CONDNULL(4, 0, 104),
    00535       SDT_BOOL(GameSettings, economy.smooth_economy,                                                                                                                                  0, 0,     true,                                                                                    STR_CONFIG_SETTING_SMOOTH_ECONOMY,                      InvalidateIndustryViewWindow),
    00536       SDT_BOOL(GameSettings, economy.allow_shares,                                                                                                                                    0, 0,     false,                                                                                   STR_CONFIG_SETTING_ALLOW_SHARES,                        NULL),
    00537    SDT_CONDVAR(GameSettings, economy.feeder_payment_share,                   SLE_UINT8,                 134,                                   SL_MAX_VERSION,                        0, 0,     75,                           0,                    100,                          0,     STR_CONFIG_SETTING_FEEDER_PAYMENT_SHARE,                NULL),
    00538    SDT_CONDVAR(GameSettings, economy.town_growth_rate,                       SLE_UINT8,                 54,                                    SL_MAX_VERSION,                        0, MS,    2,                            0,                    4,                            0,     STR_CONFIG_SETTING_TOWN_GROWTH,                         NULL),
    00539    SDT_CONDVAR(GameSettings, economy.larger_towns,                           SLE_UINT8,                 54,                                    SL_MAX_VERSION,                        0, D0,    4,                            0,                    255,                          1,     STR_CONFIG_SETTING_LARGER_TOWNS,                        NULL),
    00540    SDT_CONDVAR(GameSettings, economy.initial_city_size,                      SLE_UINT8,                 56,                                    SL_MAX_VERSION,                        0, 0,     2,                            1,                    10,                           1,     STR_CONFIG_SETTING_CITY_SIZE_MULTIPLIER,                NULL),
    00541    SDT_CONDVAR(GameSettings, economy.town_growth_cargo,                      SLE_UINT8,                 TOWN_GROWTH_SV,                        SL_MAX_VERSION,                        0, MS,    0,                            0,                    6,                            1,     STR_CONFIG_SETTING_TOWN_GROWTH_CARGO,                   InvalidateTownViewWindow),
    00542    SDT_CONDVAR(GameSettings, economy.town_pop_need_goods,                    SLE_UINT32,                TOWN_GROWTH_SV,                        SL_MAX_VERSION,                        0, 0,     4500,                         500,                  20000,                        500,   STR_CONFIG_SETTING_TOWN_GROWTH_MAX_POP_WO_GOODS,        InvalidateTownViewWindow),
    00543    SDT_CONDVAR(GameSettings, economy.larger_town_growth_cargo,               SLE_UINT8,                 KEEP_COMPATIBLE_21_SV,                 SL_MAX_VERSION,                        0, MS,    0,                            0,                    6,                            1,     STR_CONFIG_SETTING_LARGER_TOWN_GROWTH_CARGO,            InvalidateTownViewWindow),
    00544    SDT_CONDVAR(GameSettings, economy.larger_town_pop_need_goods,             SLE_UINT32,                KEEP_COMPATIBLE_21_SV,                 SL_MAX_VERSION,                        0, 0,     9000,                         500,                  20000,                        500,   STR_CONFIG_SETTING_LARGER_TOWN_GROWTH_MAX_POP_WO_GOODS, InvalidateTownViewWindow),
    00545   SDT_CONDBOOL(GameSettings, economy.mod_road_rebuild,                                                  77,                                    SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_MODIFIED_ROAD_REBUILD,               NULL),
    00546    SDT_CONDVAR(GameSettings, construction.maximum_signal_evaluations,        SLE_UINT16,                PROG_SIGS_SL,                          SL_MAX_VERSION,                        0, 0,     256,                          64,                   4096,                         1,     STR_CONFIG_SETTING_MAX_SIGNAL_EVALUATIONS,              NULL),
    00547
    00548   SDT_CONDBOOL(GameSettings, economy.infrastructure_sharing[0],                                         IS_SL,                                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_SHARING_RAIL,                        CheckSharingRail),
    00549   SDT_CONDBOOL(GameSettings, economy.infrastructure_sharing[1],                                         IS_SL,                                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_SHARING_ROAD,                        CheckSharingRoad),
    00550   SDT_CONDBOOL(GameSettings, economy.infrastructure_sharing[2],                                         IS_SL,                                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_SHARING_WATER,                       CheckSharingWater),
    00551   SDT_CONDBOOL(GameSettings, economy.infrastructure_sharing[3],                                         IS_SL,                                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_SHARING_AIR,                         CheckSharingAir),
    00552    SDT_CONDVAR(GameSettings, economy.sharing_fee[0],                         SLE_UINT,                  IS_SL,                                 SL_MAX_VERSION,                        0, CR,    100,                          0,                    1000000,                      10,    STR_CONFIG_SETTING_SHARING_FEE_RAIL,                    NULL),
    00553    SDT_CONDVAR(GameSettings, economy.sharing_fee[1],                         SLE_UINT,                  IS_SL,                                 SL_MAX_VERSION,                        0, CR,    100,                          0,                    1000000,                      10,    STR_CONFIG_SETTING_SHARING_FEE_ROAD,                    NULL),
    00554    SDT_CONDVAR(GameSettings, economy.sharing_fee[2],                         SLE_UINT,                  IS_SL,                                 SL_MAX_VERSION,                        0, CR,    100,                          0,                    1000000,                      10,    STR_CONFIG_SETTING_SHARING_FEE_WATER,                   NULL),
    00555    SDT_CONDVAR(GameSettings, economy.sharing_fee[3],                         SLE_UINT,                  IS_SL,                                 SL_MAX_VERSION,                        0, CR,    100,                          0,                    1000000,                      10,    STR_CONFIG_SETTING_SHARING_FEE_AIR,                     NULL),
    00556   SDT_CONDBOOL(GameSettings, economy.sharing_payment_in_debt,                                           IS_SL,                                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_SHARING_PAYMENT_IN_DEBT,             NULL),
    00557
    00558   SDT_CONDNULL(1, 0, 106), // previously ai-new setting.
    00559       SDT_BOOL(GameSettings, ai.ai_in_multiplayer,                                                                                                                                    0, 0,     true,                                                                                    STR_CONFIG_SETTING_AI_IN_MULTIPLAYER,                   NULL),
    00560       SDT_BOOL(GameSettings, ai.ai_disable_veh_train,                                                                                                                                 0, 0,     false,                                                                                   STR_CONFIG_SETTING_AI_BUILDS_TRAINS,                    NULL),
    00561       SDT_BOOL(GameSettings, ai.ai_disable_veh_roadveh,                                                                                                                               0, 0,     false,                                                                                   STR_CONFIG_SETTING_AI_BUILDS_ROAD_VEHICLES,             NULL),
    00562       SDT_BOOL(GameSettings, ai.ai_disable_veh_aircraft,                                                                                                                              0, 0,     false,                                                                                   STR_CONFIG_SETTING_AI_BUILDS_AIRCRAFT,                  NULL),
    00563       SDT_BOOL(GameSettings, ai.ai_disable_veh_ship,                                                                                                                                  0, 0,     false,                                                                                   STR_CONFIG_SETTING_AI_BUILDS_SHIPS,                     NULL),
    00564    SDT_CONDVAR(GameSettings, ai.ai_max_opcode_till_suspend,                  SLE_UINT32,                107,                                   SL_MAX_VERSION,                        0, NG,    10000,                       5000,                  250000,                       2500,  STR_CONFIG_SETTING_AI_MAX_OPCODES,                      NULL),
    00565
    00566        SDT_VAR(GameSettings, vehicle.extend_vehicle_life,                    SLE_UINT8,                                                                                               0, 0,     0,                           0,                     100,                          0,     STR_NULL,                                               NULL),
    00567        SDT_VAR(GameSettings, economy.dist_local_authority,                   SLE_UINT8,                                                                                               0, 0,     20,                          5,                     60,                           0,     STR_NULL,                                               NULL),
    00568   SDT_CONDBOOL(GameSettings, pf.reverse_at_signals,                                                     159,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     false,                                                                                   STR_CONFIG_SETTING_REVERSE_AT_SIGNALS,                  NULL),
    00569   SDT_CONDBOOL(GameSettings, pf.reverse_at_signals,                                                     KEEP_COMPATIBLE_17_SV,                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_REVERSE_AT_SIGNALS,                  NULL),
    00570        SDT_VAR(GameSettings, pf.wait_oneway_signal,                          SLE_UINT8,                                                                                               0, 0,     15,                          2,                     255,                          0,     STR_NULL,                                               NULL),
    00571        SDT_VAR(GameSettings, pf.wait_twoway_signal,                          SLE_UINT8,                                                                                               0, 0,     41,                          2,                     255,                          0,     STR_NULL,                                               NULL),
    00572    SDT_CONDVAR(GameSettings, economy.town_noise_population[0],               SLE_UINT16,                96,                                    SL_MAX_VERSION,                        0, 0,     800,                         200,                   65535,                        0,     STR_NULL,                                               NULL),
    00573    SDT_CONDVAR(GameSettings, economy.town_noise_population[1],               SLE_UINT16,                96,                                    SL_MAX_VERSION,                        0, 0,     2000,                        400,                   65535,                        0,     STR_NULL,                                               NULL),
    00574    SDT_CONDVAR(GameSettings, economy.town_noise_population[2],               SLE_UINT16,                96,                                    SL_MAX_VERSION,                        0, 0,     4000,                        800,                   65535,                        0,     STR_NULL,                                               NULL),
    00575
    00576   SDT_CONDBOOL(GameSettings, construction.traffic_lights,                                               TL_SV,                                 SL_MAX_VERSION,                        0, NN,     true,                                                                                   STR_CONFIG_SETTING_TRAFFIC_LIGHTS,                      TLSettingChanged),
    00577   SDT_CONDBOOL(GameSettings, construction.towns_build_traffic_lights,                                   TL_SV,                                 SL_MAX_VERSION,                        0, NN,     true,                                                                                   STR_CONFIG_SETTING_TOWNS_BUILD_TRAFFIC_LIGHTS,          NULL),
    00578   SDT_CONDBOOL(GameSettings, construction.allow_building_tls_in_towns,                                  TL_SV,                                 SL_MAX_VERSION,                        0, NN,     false,                                                                                  STR_CONFIG_SETTING_ALLOW_BUILDING_TLS_ON_TOWN_ROADS,    NULL),
    00579    SDT_CONDVAR(GameSettings, construction.traffic_lights_green_phase,        SLE_UINT8,                 TL_SV,                                 SL_MAX_VERSION,                        0, NN,     2,                           1,                     16,                          1,     STR_CONFIG_SETTING_TRAFFIC_LIGHTS_GREEN_PHASE,          NULL),
    00580    SDT_CONDVAR(GameSettings, construction.max_tlc_size,                      SLE_UINT8,                 TL_SV,                                 SL_MAX_VERSION,                        0, NN,     4,                           1,                     32,                          0,     STR_CONFIG_SETTING_MAX_TRAFFIC_LIGHT_CONSIST_SIZE,      NULL),
    00581    SDT_CONDVAR(GameSettings, construction.max_tlc_distance,                  SLE_UINT8,                 KEEP_COMPATIBLE_24_SV,                 SL_MAX_VERSION,                        0, NN,     1,                           0,                     4,                           0,     STR_CONFIG_SETTING_MAX_TRAFFIC_LIGHT_CONSIST_DISTANCE,  NULL),
    00582
    00583    SDT_CONDVAR(GameSettings, linkgraph.recalc_interval,                      SLE_UINT16,                SL_COMPONENTS,                         SL_MAX_VERSION,                        0, 0,     16,                          1,                     4096,                         1,     STR_CONFIG_SETTING_LINKGRAPH_INTERVAL,                  NULL),
    00584    SDT_CONDVAR(GameSettings, linkgraph.distribution_pax,                     SLE_UINT8,                 SL_COMPONENTS,                         SL_MAX_VERSION,                        0, MS,    DT_SYMMETRIC,                DT_BEGIN,              DT_NUM - 1,                   1,     STR_CONFIG_SETTING_DISTRIBUTION_PAX,                    NULL),
    00585    SDT_CONDVAR(GameSettings, linkgraph.distribution_mail,                    SLE_UINT8,                 SL_COMPONENTS,                         SL_MAX_VERSION,                        0, MS,    DT_SYMMETRIC,                DT_BEGIN,              DT_NUM - 1,                   1,     STR_CONFIG_SETTING_DISTRIBUTION_MAIL,                   NULL),
    00586    SDT_CONDVAR(GameSettings, linkgraph.distribution_express,                 SLE_UINT8,                 SL_COMPONENTS,                         SL_MAX_VERSION,                        0, MS,    DT_ASYMMETRIC,               DT_BEGIN,              DT_NUM - 1,                   1,     STR_CONFIG_SETTING_DISTRIBUTION_EXPRESS,                NULL),
    00587    SDT_CONDVAR(GameSettings, linkgraph.distribution_armoured,                SLE_UINT8,                 SL_COMPONENTS,                         SL_MAX_VERSION,                        0, MS,    DT_ASYMMETRIC,               DT_BEGIN,              DT_NUM - 1,                   1,     STR_CONFIG_SETTING_DISTRIBUTION_ARMOURED,               NULL),
    00588    SDT_CONDVAR(GameSettings, linkgraph.distribution_default,                 SLE_UINT8,                 SL_COMPONENTS,                         SL_MAX_VERSION,                        0, MS,    DT_ASYMMETRIC,               DT_BEGIN,              DT_NUM - 1,                   1,     STR_CONFIG_SETTING_DISTRIBUTION_DEFAULT,                NULL),
    00589    SDT_CONDVAR(GameSettings, linkgraph.accuracy,                             SLE_UINT8,                 SL_DEMANDS,                            SL_MAX_VERSION,                        0, 0,     16,                          2,                     64,                           1,     STR_CONFIG_SETTING_LINKGRAPH_ACCURACY,                  NULL),
    00590    SDT_CONDVAR(GameSettings, linkgraph.demand_distance,                      SLE_UINT8,                 SL_DEMANDS,                            SL_MAX_VERSION,                        0, 0,     90,                          0,                     255,                          5,     STR_CONFIG_SETTING_DEMAND_DISTANCE,                     NULL),
    00591    SDT_CONDVAR(GameSettings, linkgraph.demand_size,                          SLE_UINT8,                 SL_DEMANDS,                            SL_MAX_VERSION,                        0, 0,     90,                          0,                     100,                          5,     STR_CONFIG_SETTING_DEMAND_SIZE,                         NULL),
    00592    SDT_CONDVAR(GameSettings, linkgraph.short_path_saturation,                SLE_UINT8,                 SL_MCF,                                SL_MAX_VERSION,                        0, 0,     80,                          0,                     250,                          5,     STR_CONFIG_SETTING_SHORT_PATH_SATURATION,               NULL),
    00593   SDT_CONDBOOL(GameSettings, linkgraph.no_overload_links,                                               KEEP_COMPATIBLE_22_SV,                 SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_CONFIG_SETTING_NO_OVERLOAD_LINKS,                   NULL),
    00594
    00595    SDT_CONDVAR(GameSettings, pf.wait_for_pbs_path,                           SLE_UINT8,                 100,                                   SL_MAX_VERSION,                        0, 0,     30,                          2,                     255,                          0,     STR_NULL,                                               NULL),
    00596   SDT_CONDBOOL(GameSettings, pf.reserve_paths,                                                          100,                                   SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_NULL,                                               NULL),
    00597    SDT_CONDVAR(GameSettings, pf.path_backoff_interval,                       SLE_UINT8,                 100,                                   SL_MAX_VERSION,                        0, 0,     20,                          1,                     255,                          0,     STR_NULL,                                               NULL),
    00598
    00599        SDT_VAR(GameSettings, pf.opf.pf_maxlength,                            SLE_UINT16,                                                                                              0, 0,     4096,                        64,                    65535,                        0,     STR_NULL,                                               NULL),
    00600        SDT_VAR(GameSettings, pf.opf.pf_maxdepth,                             SLE_UINT8,                                                                                               0, 0,     48,                          4,                     255,                          0,     STR_NULL,                                               NULL),
    00601
    00602        SDT_VAR(GameSettings, pf.npf.npf_max_search_nodes,                    SLE_UINT,                                                                                                0, 0,     10000,                       500,                   100000,                       0,     STR_NULL,                                               NULL),
    00603        SDT_VAR(GameSettings, pf.npf.npf_rail_firstred_penalty,               SLE_UINT,                                                                                                0, 0,     10 * NPF_TILE_LENGTH,        0,                     100000,                       0,     STR_NULL,                                               NULL),
    00604        SDT_VAR(GameSettings, pf.npf.npf_rail_firstred_exit_penalty,          SLE_UINT,                                                                                                0, 0,     100 * NPF_TILE_LENGTH,       0,                     100000,                       0,     STR_NULL,                                               NULL),
    00605        SDT_VAR(GameSettings, pf.npf.npf_rail_lastred_penalty,                SLE_UINT,                                                                                                0, 0,     10 * NPF_TILE_LENGTH,        0,                     100000,                       0,     STR_NULL,                                               NULL),
    00606        SDT_VAR(GameSettings, pf.npf.npf_rail_station_penalty,                SLE_UINT,                                                                                                0, 0,     1 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00607        SDT_VAR(GameSettings, pf.npf.npf_rail_slope_penalty,                  SLE_UINT,                                                                                                0, 0,     1 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00608        SDT_VAR(GameSettings, pf.npf.npf_rail_curve_penalty,                  SLE_UINT,                                                                                                0, 0,     1 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00609        SDT_VAR(GameSettings, pf.npf.npf_rail_depot_reverse_penalty,          SLE_UINT,                                                                                                0, 0,     50 * NPF_TILE_LENGTH,        0,                     100000,                       0,     STR_NULL,                                               NULL),
    00610    SDT_CONDVAR(GameSettings, pf.npf.npf_rail_pbs_cross_penalty,              SLE_UINT,                  100,                                   SL_MAX_VERSION,                        0, 0,     3 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00611    SDT_CONDVAR(GameSettings, pf.npf.npf_rail_pbs_signal_back_penalty,        SLE_UINT,                  100,                                   SL_MAX_VERSION,                        0, 0,     15 * NPF_TILE_LENGTH,        0,                     100000,                       0,     STR_NULL,                                               NULL),
    00612        SDT_VAR(GameSettings, pf.npf.npf_buoy_penalty,                        SLE_UINT,                                                                                                0, 0,     2 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00613        SDT_VAR(GameSettings, pf.npf.npf_water_curve_penalty,                 SLE_UINT,                                                                                                0, 0,     1 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00614        SDT_VAR(GameSettings, pf.npf.npf_road_curve_penalty,                  SLE_UINT,                                                                                                0, 0,     1 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00615        SDT_VAR(GameSettings, pf.npf.npf_crossing_penalty,                    SLE_UINT,                                                                                                0, 0,     3 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00616    SDT_CONDVAR(GameSettings, pf.npf.npf_road_drive_through_penalty,          SLE_UINT,                  47,                                    SL_MAX_VERSION,                        0, 0,     8 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00617    SDT_CONDVAR(GameSettings, pf.npf.npf_road_trafficlight_penalty,           SLE_UINT,                  TL_SV,                                 SL_MAX_VERSION,                        0, 0,     2 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00618    SDT_CONDVAR(GameSettings, pf.npf.npf_road_dt_occupied_penalty,            SLE_UINT,                  130,                                   SL_MAX_VERSION,                        0, 0,     8 * NPF_TILE_LENGTH,         0,                     100000,                       0,     STR_NULL,                                               NULL),
    00619    SDT_CONDVAR(GameSettings, pf.npf.npf_road_bay_occupied_penalty,           SLE_UINT,                  130,                                   SL_MAX_VERSION,                        0, 0,     15 * NPF_TILE_LENGTH,        0,                     100000,                       0,     STR_NULL,                                               NULL),
    00620    SDT_CONDVAR(GameSettings, pf.npf.maximum_go_to_depot_penalty,             SLE_UINT,                  131,                                   SL_MAX_VERSION,                        0, 0,     20 * NPF_TILE_LENGTH,        0,                     1000000,                      0,     STR_NULL,                                               NULL),
    00621
    00622   SDT_CONDBOOL(GameSettings, pf.yapf.disable_node_optimization,                                         28,                                    SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_NULL,                                               NULL),
    00623    SDT_CONDVAR(GameSettings, pf.yapf.max_search_nodes,                       SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     10000,                       500,                   1000000,                      0,     STR_NULL,                                               NULL),
    00624   SDT_CONDBOOL(GameSettings, pf.yapf.rail_firstred_twoway_eol,                                          28,                                    SL_MAX_VERSION,                        0, 0,     false,                                                                                   STR_NULL,                                               NULL),
    00625    SDT_CONDVAR(GameSettings, pf.yapf.rail_firstred_penalty,                  SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     10 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00626    SDT_CONDVAR(GameSettings, pf.yapf.rail_firstred_exit_penalty,             SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     100 * YAPF_TILE_LENGTH,       0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00627    SDT_CONDVAR(GameSettings, pf.yapf.rail_lastred_penalty,                   SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     10 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00628    SDT_CONDVAR(GameSettings, pf.yapf.rail_lastred_exit_penalty,              SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     100 * YAPF_TILE_LENGTH,       0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00629    SDT_CONDVAR(GameSettings, pf.yapf.rail_station_penalty,                   SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     10 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00630    SDT_CONDVAR(GameSettings, pf.yapf.rail_slope_penalty,                     SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     2 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00631    SDT_CONDVAR(GameSettings, pf.yapf.rail_curve45_penalty,                   SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     1 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00632    SDT_CONDVAR(GameSettings, pf.yapf.rail_curve90_penalty,                   SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     6 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00633    SDT_CONDVAR(GameSettings, pf.yapf.rail_depot_reverse_penalty,             SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     50 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00634    SDT_CONDVAR(GameSettings, pf.yapf.rail_crossing_penalty,                  SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     3 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00635    SDT_CONDVAR(GameSettings, pf.yapf.rail_look_ahead_max_signals,            SLE_UINT,                  28,                                    SL_MAX_VERSION,                        0, 0,     10,                           1,                    100,                          0,     STR_NULL,                                               NULL),
    00636    SDT_CONDVAR(GameSettings, pf.yapf.rail_look_ahead_signal_p0,              SLE_INT,                   28,                                    SL_MAX_VERSION,                        0, 0,     500,                          -1000000,             1000000,                      0,     STR_NULL,                                               NULL),
    00637    SDT_CONDVAR(GameSettings, pf.yapf.rail_look_ahead_signal_p1,              SLE_INT,                   28,                                    SL_MAX_VERSION,                        0, 0,     -100,                         -1000000,             1000000,                      0,     STR_NULL,                                               NULL),
    00638    SDT_CONDVAR(GameSettings, pf.yapf.rail_look_ahead_signal_p2,              SLE_INT,                   28,                                    SL_MAX_VERSION,                        0, 0,     5,                            -1000000,             1000000,                      0,     STR_NULL,                                               NULL),
    00639    SDT_CONDVAR(GameSettings, pf.yapf.rail_pbs_cross_penalty,                 SLE_UINT,                  100,                                   SL_MAX_VERSION,                        0, 0,     3 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00640    SDT_CONDVAR(GameSettings, pf.yapf.rail_pbs_station_penalty,               SLE_UINT,                  100,                                   SL_MAX_VERSION,                        0, 0,     8 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00641    SDT_CONDVAR(GameSettings, pf.yapf.rail_pbs_signal_back_penalty,           SLE_UINT,                  100,                                   SL_MAX_VERSION,                        0, 0,     15 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00642    SDT_CONDVAR(GameSettings, pf.yapf.rail_doubleslip_penalty,                SLE_UINT,                  100,                                   SL_MAX_VERSION,                        0, 0,     1 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00643    SDT_CONDVAR(GameSettings, pf.yapf.rail_longer_platform_penalty,           SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     8 * YAPF_TILE_LENGTH,         0,                    20000,                        0,     STR_NULL,                                               NULL),
    00644    SDT_CONDVAR(GameSettings, pf.yapf.rail_longer_platform_per_tile_penalty,  SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     0 * YAPF_TILE_LENGTH,         0,                    20000,                        0,     STR_NULL,                                               NULL),
    00645    SDT_CONDVAR(GameSettings, pf.yapf.rail_shorter_platform_penalty,          SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     40 * YAPF_TILE_LENGTH,        0,                    20000,                        0,     STR_NULL,                                               NULL),
    00646    SDT_CONDVAR(GameSettings, pf.yapf.rail_shorter_platform_per_tile_penalty, SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     0 * YAPF_TILE_LENGTH,         0,                    20000,                        0,     STR_NULL,                                               NULL),
    00647    SDT_CONDVAR(GameSettings, pf.yapf.road_slope_penalty,                     SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     2 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00648    SDT_CONDVAR(GameSettings, pf.yapf.road_curve_penalty,                     SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     1 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00649    SDT_CONDVAR(GameSettings, pf.yapf.road_crossing_penalty,                  SLE_UINT,                  33,                                    SL_MAX_VERSION,                        0, 0,     3 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00650    SDT_CONDVAR(GameSettings, pf.yapf.road_trafficlight_penalty,              SLE_UINT,                  TL_SV,                                 SL_MAX_VERSION,                        0, 0,     2 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00651    SDT_CONDVAR(GameSettings, pf.yapf.road_stop_penalty,                      SLE_UINT,                  47,                                    SL_MAX_VERSION,                        0, 0,     8 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00652    SDT_CONDVAR(GameSettings, pf.yapf.road_stop_occupied_penalty,             SLE_UINT,                  130,                                   SL_MAX_VERSION,                        0, 0,     8 * YAPF_TILE_LENGTH,         0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00653    SDT_CONDVAR(GameSettings, pf.yapf.road_stop_bay_occupied_penalty,         SLE_UINT,                  130,                                   SL_MAX_VERSION,                        0, 0,     15 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00654    SDT_CONDVAR(GameSettings, pf.yapf.maximum_go_to_depot_penalty,            SLE_UINT,                  131,                                   SL_MAX_VERSION,                        0, 0,     20 * YAPF_TILE_LENGTH,        0,                    1000000,                      0,     STR_NULL,                                               NULL),
    00655
    00656    SDT_CONDVAR(GameSettings, game_creation.land_generator,                   SLE_UINT8,                 30,                                    SL_MAX_VERSION,                        0, MS,    1,                            0,                    1,                            0,     STR_CONFIG_SETTING_LAND_GENERATOR,                      NULL),
    00657    SDT_CONDVAR(GameSettings, game_creation.oil_refinery_limit,               SLE_UINT8,                 30,                                    SL_MAX_VERSION,                        0, 0,     32,                           12,                   48,                           0,     STR_CONFIG_SETTING_OIL_REF_EDGE_DISTANCE,               NULL),
    00658    SDT_CONDVAR(GameSettings, game_creation.tgen_smoothness,                  SLE_FILE_U8 | SLE_VAR_U8,  30,                                    MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, 0, MS,    1,                            0,                    3,                            0,     STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN,                NULL),
    00659    SDT_CONDVAR(GameSettings, game_creation.tgen_smoothness,                  SLE_UINT8,                 MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        0, MS,    1,                            0,                    6,                            0,     STR_CONFIG_SETTING_ROUGHNESS_OF_TERRAIN,                NULL),
    00660        SDT_VAR(GameSettings, game_creation.variety,                          SLE_UINT8,                                                                                               S, 0,     0,                            0,                    5,                            0,     STR_NULL,                                               NULL),
    00661    SDT_CONDVAR(GameSettings, game_creation.generation_seed,                  SLE_UINT32,                30,                                    SL_MAX_VERSION,                        0, 0,     GENERATE_NEW_SEED,            0,                    UINT32_MAX,                   0,     STR_NULL,                                               NULL),
    00662    SDT_CONDVAR(GameSettings, game_creation.tree_placer,                      SLE_UINT8,                 30,                                    SL_MAX_VERSION,                        0, MS,    2,                            0,                    2,                            0,     STR_CONFIG_SETTING_TREE_PLACER,                         NULL),
    00663        SDT_VAR(GameSettings, game_creation.heightmap_rotation,               SLE_UINT8,                                                                                               S, MS,    0,                            0,                    1,                            0,     STR_CONFIG_SETTING_HEIGHTMAP_ROTATION,                  NULL),
    00664    SDT_CONDVAR(GameSettings, game_creation.se_flat_world_height,             SLE_FILE_U8 | SLE_VAR_U32, 0,                                     MORE_HEIGHTLEVEL_SAVEGAME_VERSION - 1, S, 0,     1,                            0,                    15,                           0,     STR_CONFIG_SETTING_SE_FLAT_WORLD_HEIGHT,                NULL),
    00665    SDT_CONDVAR(GameSettings, game_creation.se_flat_world_height,             SLE_UINT32,                MORE_HEIGHTLEVEL_SAVEGAME_VERSION,     SL_MAX_VERSION,                        S, 0,     1,                            0,                    255,                          0,     STR_CONFIG_SETTING_SE_FLAT_WORLD_HEIGHT,                NULL),
    00666
    00667        SDT_VAR(GameSettings, game_creation.map_x,                            SLE_UINT8,                                                                                               S, 0,     8,                            MIN_MAP_SIZE_BITS,    MAX_MAP_SIZE_BITS,            0,     STR_NULL,                                               NULL),
    00668        SDT_VAR(GameSettings, game_creation.map_y,                            SLE_UINT8,                                                                                               S, 0,     8,                            MIN_MAP_SIZE_BITS,    MAX_MAP_SIZE_BITS,            0,     STR_NULL,                                               NULL),
    00669   SDT_CONDBOOL(GameSettings, construction.freeform_edges,                                               111,                                   SL_MAX_VERSION,                        0, 0,     true,                                                                                    STR_CONFIG_SETTING_ENABLE_FREEFORM_EDGES,               CheckFreeformEdges),
    00670    SDT_CONDVAR(GameSettings, game_creation.water_borders,                    SLE_UINT8,                 111,                                   SL_MAX_VERSION,                        0, 0,     15,                           0,                    16,                           0,     STR_NULL,                                               NULL),
    00671    SDT_CONDVAR(GameSettings, game_creation.custom_town_number,               SLE_UINT16,                115,                                   SL_MAX_VERSION,                        0, 0,     1,                            1,                    5000,                         0,     STR_NULL,                                               NULL),
    00672    SDT_CONDVAR(GameSettings, construction.extra_tree_placement,              SLE_UINT8,                 132,                                   SL_MAX_VERSION,                        0, MS,    2,                            0,                    2,                            0,     STR_CONFIG_SETTING_EXTRA_TREE_PLACEMENT,                NULL),
    00673    SDT_CONDVAR(GameSettings, construction.tree_placement_drag_limit,         SLE_UINT8,                 TREEDRAG_SV,                           SL_MAX_VERSION,                        0, 0,    20,                           20,                   128,                          0,     STR_CONFIG_SETTING_TREE_PLACEMENT_DRAG_LIMIT,           NULL),
    00674    SDT_CONDVAR(GameSettings, construction.ingame_tree_line_height,           SLE_UINT8,                 INGAME_TREELINE_SV,                    SL_MAX_VERSION,                        0, 0,     DEF_TREELINE_HEIGHT_EXTENDED, MIN_TREELINE_HEIGHT,  MAX_TREELINE_HEIGHT_EXTENDED, 0,     STR_CONFIG_SETTING_INGAME_TREELINE_HEIGHT,              NULL),
    00675    SDT_CONDVAR(GameSettings, construction.tree_growth_rate,                  SLE_UINT8,                 TREE_GROWTH_RATE_SL,                   SL_MAX_VERSION,                        0, MS,    0,                            0,                    3,                            1,     STR_CONFIG_SETTING_TREE_GROWTH,                         NULL),
    00676    SDT_CONDVAR(GameSettings, game_creation.custom_sea_level,                 SLE_UINT8,                 149,                                   BEFORE_ADDING_PATCHES_SL,              0, 0,     1,                            2,                    90,                           0,     STR_NULL,                                               NULL),
    00677    SDT_CONDVAR(GameSettings, game_creation.custom_sea_level,                 SLE_UINT8,                 KEEP_COMPATIBLE_4_SV,                  SL_MAX_VERSION,                        0, 0,     1,                            2,                    90,                           0,     STR_NULL,                                               NULL),
    00678
    00679    SDT_CONDOMANY(GameSettings, locale.currency,                                SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        N, 0,     0,                            CUSTOM_CURRENCY_ID,  _locale_currencies,                   STR_NULL, RedrawScreen,                                 NULL),
    00680    SDT_CONDOMANY(GameSettings, locale.units,                                   SLE_UINT8,                 97,                                    SL_MAX_VERSION,                        N, 0,     1,                            2, _locale_units,                                          STR_NULL, RedrawScreen,                                 NULL),
    00681    SDT_CONDSTR(GameSettings, locale.digit_group_separator,                   SLE_STRQ,                  118,                                   SL_MAX_VERSION,                        N, 0,     NULL,                                                                                    STR_NULL, RedrawScreen),
    00682    SDT_CONDSTR(GameSettings, locale.digit_group_separator_currency,          SLE_STRQ,                  118,                                   SL_MAX_VERSION,                        N, 0,     NULL,                                                                                    STR_NULL, RedrawScreen),
    00683    SDT_CONDSTR(GameSettings, locale.digit_decimal_separator,                 SLE_STRQ,                  126,                                   SL_MAX_VERSION,                        N, 0,     NULL,                                                                                    STR_NULL, RedrawScreen),
    00684
    00685   /***************************************************************************/
    00686   /* Unsaved setting variables. */
    00687    SDTC_OMANY(gui.autosave,                      SLE_UINT8,  S, 0,        3,                    6,   _autosave_interval,    STR_NULL,                                            NULL),
    00688     SDTC_BOOL(gui.threaded_saves,                            S, 0,        true,                                             STR_NULL,                                            NULL),
    00689    SDTC_OMANY(gui.date_format_in_default_names,  SLE_UINT8,  S, MS,       0,                    2,   _savegame_date,        STR_CONFIG_SETTING_DATE_FORMAT_IN_SAVE_NAMES,        NULL),
    00690     SDTC_BOOL(gui.vehicle_speed,                             S, 0,        true,                                             STR_CONFIG_SETTING_VEHICLESPEED,                     NULL),
    00691     SDTC_BOOL(gui.show_finances,                             S, 0,        true,                                             STR_CONFIG_SETTING_SHOWFINANCES,                     NULL),
    00692     SDTC_BOOL(gui.autoscroll,                                S, 0,        false,                                            STR_CONFIG_SETTING_AUTOSCROLL,                       NULL),
    00693     SDTC_BOOL(gui.reverse_scroll,                            S, 0,        false,                                            STR_CONFIG_SETTING_REVERSE_SCROLLING,                NULL),
    00694     SDTC_BOOL(gui.smooth_scroll,                             S, 0,        false,                                            STR_CONFIG_SETTING_SMOOTH_SCROLLING,                 NULL),
    00695     SDTC_BOOL(gui.left_mouse_btn_scrolling,                  S, 0,        false,                                            STR_CONFIG_SETTING_LEFT_MOUSE_BTN_SCROLLING,         NULL),
    00696     SDTC_BOOL(gui.measure_tooltip,                           S, 0,        true,                                             STR_CONFIG_SETTING_MEASURE_TOOLTIP,                  NULL),
    00697      SDTC_VAR(gui.errmsg_duration,               SLE_UINT8,  S, 0,        5,                    0,        20,            0, STR_CONFIG_SETTING_ERRMSG_DURATION,                  NULL),
    00698      SDTC_VAR(gui.hover_delay,                   SLE_UINT8,  S, D0,       2,                    1,        5,             0, STR_CONFIG_SETTING_HOVER_DELAY,                      NULL),
    00699      SDTC_VAR(gui.toolbar_pos,                   SLE_UINT8,  S, MS,       1,                    0,        2,             0, STR_CONFIG_SETTING_TOOLBAR_POS,                      v_PositionMainToolbar),
    00700      SDTC_VAR(gui.statusbar_pos,                 SLE_UINT8,  S, MS,       1,                    0,        2,             0, STR_CONFIG_SETTING_STATUSBAR_POS,                    v_PositionStatusbar),
    00701      SDTC_VAR(gui.window_snap_radius,            SLE_UINT8,  S, D0,       10,                   1,        32,            0, STR_CONFIG_SETTING_SNAP_RADIUS,                      NULL),
    00702      SDTC_VAR(gui.window_soft_limit,             SLE_UINT8,  S, D0,       20,                   5,        255,           1, STR_CONFIG_SETTING_SOFT_LIMIT,                       NULL),
    00703     SDTC_BOOL(gui.population_in_label,                       S, 0,        true,                                             STR_CONFIG_SETTING_POPULATION_IN_LABEL,              PopulationInLabelActive),
    00704     SDTC_BOOL(gui.population_in_label_coloured,              S, 0,        true,                                             STR_CONFIG_SETTING_POPULATION_IN_LABEL_COLOURED,     PopulationInLabelActive),
    00705     SDTC_BOOL(gui.link_terraform_toolbar,                    S, 0,        false,                                            STR_CONFIG_SETTING_LINK_TERRAFORM_TOOLBAR,           NULL),
    00706      SDTC_VAR(gui.smallmap_land_colour,          SLE_UINT8,  S, MS,       0,                    0,        2,             0, STR_CONFIG_SETTING_SMALLMAP_LAND_COLOUR,             RedrawSmallmap),
    00707     SDTC_BOOL(gui.smallmap_flood_warning,                    S, 0,        false,                                            STR_CONFIG_SETTING_SMALLMAP_FLOOD_WARNING,           RedrawSmallmap),
    00708      SDTC_VAR(gui.linkgraph_companies,           SLE_UINT8,  S, MS,       0,                    0,        1,             0, STR_CONFIG_SETTING_SMALLMAP_LINKGRAPH_COMPANIES,     RedrawSmallmap),
    00709
    00710      SDTC_VAR(gui.liveries,                      SLE_UINT8,  S, MS,       2,                    0,        2,             0, STR_CONFIG_SETTING_LIVERIES,                         InvalidateCompanyLiveryWindow),
    00711     SDTC_BOOL(gui.prefer_teamchat,                           S, 0,        false,                                            STR_CONFIG_SETTING_PREFER_TEAMCHAT,                  NULL),
    00712      SDTC_VAR(gui.scrollwheel_scrolling,         SLE_UINT8,  S, MS,       0,                    0,        2,             0, STR_CONFIG_SETTING_SCROLLWHEEL_SCROLLING,            NULL),
    00713      SDTC_VAR(gui.scrollwheel_multiplier,        SLE_UINT8,  S, 0,        5,                    1,        15,            1, STR_CONFIG_SETTING_SCROLLWHEEL_MULTIPLIER,           NULL),
    00714     SDTC_BOOL(gui.pause_on_newgame,                          S, 0,        false,                                            STR_CONFIG_SETTING_PAUSE_ON_NEW_GAME,                NULL),
    00715      SDTC_VAR(gui.advanced_vehicle_list,         SLE_UINT8,  S, MS,       1,                    0,        2,             0, STR_CONFIG_SETTING_ADVANCED_VEHICLE_LISTS,           NULL),
    00716     SDTC_BOOL(gui.timetable_in_ticks,                        S, 0,        false,                                            STR_CONFIG_SETTING_TIMETABLE_IN_TICKS,               InvalidateVehTimetableWindow),
    00717     SDTC_BOOL(gui.time_in_minutes,                           S, 0,        false,                                            STR_CONFIG_SETTING_TIME_IN_MINUTES,                  InvalidateVehTimetableWindow),
    00718      SDTC_VAR(gui.ticks_per_minute,              SLE_UINT8,  S, NC,       74,                   1,        255,           0, STR_CONFIG_SETTING_TICKS_PER_MINUTE,                 RedrawScreen),
    00719      SDTC_VAR(gui.date_with_time,                SLE_UINT8,  S, MS,       0,                    0,        3,             1, STR_CONFIG_SETTING_DATE_WITH_TIME,                   RedrawScreen),
    00720     SDTC_BOOL(gui.timetable_arrival_departure,               S, 0,        true,                                             STR_CONFIG_SETTING_TIMETABLE_SHOW_ARRIVAL_DEPARTURE, InvalidateVehTimetableWindow),
    00721      SDTC_VAR(gui.max_departures,                SLE_UINT8,  S, NC,       10,                   1,        30,            1, STR_CONFIG_MAX_DEPARTURES,                           NULL),
    00722      SDTC_VAR(gui.max_departure_time,            SLE_UINT16, S, NC,       120,                  30,       240,           1, STR_CONFIG_MAX_DEPARTURE_TIME,                       NULL),
    00723      SDTC_VAR(gui.departure_calc_frequency,      SLE_UINT16, S, NC,       10,                   1,        120,           1, STR_CONFIG_DEPARTURE_CALC_FREQUENCY,                 NULL),
    00724     SDTC_BOOL(gui.departure_show_vehicle,                    S, 0,        false,                                            STR_CONFIG_DEPARTURE_VEHICLE_NAME,                   NULL),
    00725     SDTC_BOOL(gui.departure_show_group,                      S, 0,        false,                                            STR_CONFIG_DEPARTURE_GROUP_NAME,                     NULL),
    00726     SDTC_BOOL(gui.departure_show_company,                    S, 0,        true,                                             STR_CONFIG_DEPARTURE_COMPANY_NAME,                   NULL),
    00727     SDTC_BOOL(gui.departure_show_vehicle_type,               S, 0,        false,                                            STR_CONFIG_DEPARTURE_VEHICLE_TYPE,                   NULL),
    00728     SDTC_BOOL(gui.departure_show_vehicle_color,              S, 0,        false,                                            STR_CONFIG_DEPARTURE_VEHICLE_COLOR,                  NULL),
    00729     SDTC_BOOL(gui.departure_larger_font,                     S, 0,        false,                                            STR_CONFIG_DEPARTURE_LARGER_FONT,                    NULL),
    00730     SDTC_BOOL(gui.departure_destination_type,                S, 0,        false,                                            STR_CONFIG_DEPARTURE_DESTINATION_TYPE,               NULL),
    00731     SDTC_BOOL(gui.departure_show_both,                       S, 0,        false,                                            STR_CONFIG_DEPARTURE_SHOW_BOTH,                      NULL),
    00732     SDTC_BOOL(gui.departure_only_passengers,                 S, 0,        false,                                            STR_CONFIG_DEPARTURE_ONLY_PASSENGERS,                NULL),
    00733      SDTC_VAR(gui.departure_conditionals,         SLE_UINT8, S, MS,       0,        0,          2,                       0, STR_CONFIG_DEPARTURE_CONDITIONALS,                   RedrawScreen),
    00734     SDTC_BOOL(gui.quick_goto,                                S, 0,        false,                                            STR_CONFIG_SETTING_QUICKGOTO,                        NULL),
    00735     SDTC_BOOL(gui.departure_show_all_stops,                  S, 0,        false,                                            STR_CONFIG_DEPARTURE_SHOW_ALL_STOPS,                 NULL),
    00736      SDTC_VAR(gui.loading_indicators,             SLE_UINT8, S, MS,       1,                    0,        2,             0, STR_CONFIG_SETTING_LOADING_INDICATORS,               RedrawScreen),
    00737      SDTC_VAR(gui.default_rail_type,              SLE_UINT8, S, MS,       0,                    0,        2,             0, STR_CONFIG_SETTING_DEFAULT_RAIL_TYPE,                NULL),
    00738     SDTC_BOOL(gui.enable_signal_gui,                         S, 0,        true,                                             STR_CONFIG_SETTING_ENABLE_SIGNAL_GUI,                CloseSignalGUI),
    00739      SDTC_VAR(gui.coloured_news_year,             SLE_INT32, S, NC,       2000,                 MIN_YEAR, MAX_YEAR,      1, STR_CONFIG_SETTING_COLOURED_NEWS_YEAR,               NULL),
    00740      SDTC_VAR(gui.drag_signals_density,           SLE_UINT8, S, 0,        4,                    1,        20,            0, STR_CONFIG_SETTING_DRAG_SIGNALS_DENSITY,             DragSignalsDensityChanged),
    00741      SDTC_VAR(gui.semaphore_build_before,         SLE_INT32, S, NC,       1950,                 MIN_YEAR, MAX_YEAR,      1, STR_CONFIG_SETTING_SEMAPHORE_BUILD_BEFORE_DATE,      ResetSignalVariant),
    00742     SDTC_BOOL(gui.vehicle_income_warn,                       S, 0,        true,                                             STR_CONFIG_SETTING_WARN_INCOME_LESS,                 NULL),
    00743      SDTC_VAR(gui.order_review_system,            SLE_UINT8, S, MS,       2,                    0,        2,             0, STR_CONFIG_SETTING_ORDER_REVIEW,                     NULL),
    00744     SDTC_BOOL(gui.lost_vehicle_warn,                         S, 0,        true,                                             STR_CONFIG_SETTING_WARN_LOST_VEHICLE,                NULL),
    00745     SDTC_BOOL(gui.disable_unsuitable_building,               S, 0,        true,                                             STR_CONFIG_SETTING_DISABLE_UNSUITABLE_BUILDING,      RedrawScreen),
    00746     SDTC_BOOL(gui.new_nonstop,                               S, 0,        false,                                            STR_CONFIG_SETTING_NONSTOP_BY_DEFAULT,               NULL),
    00747      SDTC_VAR(gui.stop_location,                  SLE_UINT8, S, MS,       2,                    0,        2,             1, STR_CONFIG_SETTING_STOP_LOCATION,                    NULL),
    00748     SDTC_BOOL(gui.keep_all_autosave,                         S, 0,        false,                                            STR_NULL,                                            NULL),
    00749     SDTC_BOOL(gui.autosave_on_exit,                          S, 0,        false,                                            STR_NULL,                                            NULL),
    00750      SDTC_VAR(gui.max_num_autosaves,              SLE_UINT8, S, 0,        16,                   0,        255,           0, STR_NULL,                                            NULL),
    00751     SDTC_BOOL(gui.bridge_pillars,                            S, 0,        true,                                             STR_NULL,                                            NULL),
    00752     SDTC_BOOL(gui.auto_euro,                                 S, 0,        true,                                             STR_NULL,                                            NULL),
    00753      SDTC_VAR(gui.news_message_timeout,           SLE_UINT8, S, 0,        2,                    1,        255,           0, STR_NULL,                                            NULL),
    00754     SDTC_BOOL(gui.show_track_reservation,                    S, 0,        false,                                            STR_CONFIG_SETTING_SHOW_TRACK_RESERVATION,           RedrawScreen),
    00755      SDTC_VAR(gui.default_signal_type,            SLE_UINT8, S, MS,       1,                    0,        2,             1, STR_CONFIG_SETTING_DEFAULT_SIGNAL_TYPE,              NULL),
    00756      SDTC_VAR(gui.cycle_signal_types,             SLE_UINT8, S, MS,       2,                    0,        2,             1, STR_CONFIG_SETTING_CYCLE_SIGNAL_TYPES,               NULL),
    00757      SDTC_VAR(gui.station_numtracks,              SLE_UINT8, S, 0,        1,                    1,        7,             0, STR_NULL,                                            NULL),
    00758      SDTC_VAR(gui.station_platlength,             SLE_UINT8, S, 0,        5,                    1,        7,             0, STR_NULL,                                            NULL),
    00759     SDTC_BOOL(gui.station_dragdrop,                          S, 0,        true,                                             STR_NULL,                                            NULL),
    00760     SDTC_BOOL(gui.station_show_coverage,                     S, 0,        false,                                            STR_NULL,                                            NULL),
    00761     SDTC_BOOL(gui.persistent_buildingtools,                  S, 0,        true,                                             STR_CONFIG_SETTING_PERSISTENT_BUILDINGTOOLS,         NULL),
    00762     SDTC_BOOL(gui.expenses_layout,                           S, 0,        false,                                            STR_CONFIG_SETTING_EXPENSES_LAYOUT,                  RedrawScreen),
    00763
    00764 /* For the dedicated build we'll enable dates in logs by default. */
    00765 #ifdef DEDICATED
    00766     SDTC_BOOL(gui.show_date_in_logs,                         S, 0,        true,                                             STR_NULL,                                            NULL),
    00767 #else
    00768     SDTC_BOOL(gui.show_date_in_logs,                         S, 0,        false,                                            STR_NULL,                                            NULL),
    00769 #endif
    00770      SDTC_VAR(gui.developer,                     SLE_UINT8,  S, 0,        1,                    0,        2,             0, STR_NULL,                                            NULL),
    00771     SDTC_BOOL(gui.newgrf_developer_tools,                    S, 0,        false,                                            STR_NULL,                                            InvalidateNewGRFChangeWindows),
    00772     SDTC_BOOL(gui.ai_developer_tools,                        S, 0,        false,                                            STR_NULL,                                            NULL),
    00773     SDTC_BOOL(gui.scenario_developer,                        S, 0,        false,                                            STR_NULL,                                            InvalidateNewGRFChangeWindows),
    00774     SDTC_BOOL(gui.newgrf_show_old_versions,                  S, 0,        false,                                            STR_NULL,                                            NULL),
    00775 SDTC_VAR(gui.newgrf_default_palette,               SLE_UINT8,  S, MS,       1,                    0,        1,             1, STR_CONFIG_SETTING_NEWGRF_DEFAULT_PALETTE,           UpdateNewGRFConfigPalette),
    00776      SDTC_VAR(gui.console_backlog_timeout,       SLE_UINT16, S, 0,        100,                  10,       65500,         0, STR_NULL,                                            NULL),
    00777      SDTC_VAR(gui.console_backlog_length,        SLE_UINT16, S, 0,        100,                  10,       65500,         0, STR_NULL,                                            NULL),
    00778      SDTC_VAR(gui.station_gui_group_order,       SLE_UINT8,  S, 0,        0,                    0,        5,             1, STR_NULL,                                            NULL),
    00779      SDTC_VAR(gui.station_gui_sort_by,           SLE_UINT8,  S, 0,        0,                    0,        1,             1, STR_NULL,                                            NULL),
    00780      SDTC_VAR(gui.station_gui_sort_order,        SLE_UINT8,  S, 0,        0,                    0,        1,             1, STR_NULL,                                            NULL),
    00781 #ifdef ENABLE_NETWORK
    00782      SDTC_VAR(gui.network_chat_box_width,        SLE_UINT16, S, 0,        620,                  200,      65535,         0, STR_NULL,                                            NULL),
    00783      SDTC_VAR(gui.network_chat_box_height,       SLE_UINT8,  S, 0,        25,                   5,        255,           0, STR_NULL,                                            NULL),
    00784      SDTC_VAR(gui.network_chat_timeout,          SLE_UINT16, S, 0,        20,                   1,        65535,         0, STR_NULL,                                            NULL),
    00785
    00786      SDTC_VAR(network.sync_freq,                 SLE_UINT16,    C|S,NO,   100,                  0,        100,           0, STR_NULL,                                            NULL),
    00787      SDTC_VAR(network.frame_freq,                SLE_UINT8,     C|S,NO,   0,                    0,        100,           0, STR_NULL,                                            NULL),
    00788      SDTC_VAR(network.commands_per_frame,        SLE_UINT16, S, NO,       2,                    1,        65535,         0, STR_NULL,                                            NULL),
    00789      SDTC_VAR(network.max_commands_in_queue,     SLE_UINT16, S, NO,       16,                   1,        65535,         0, STR_NULL,                                            NULL),
    00790      SDTC_VAR(network.bytes_per_frame,           SLE_UINT16, S, NO,       8,                    1,        65535,         0, STR_NULL,                                            NULL),
    00791      SDTC_VAR(network.bytes_per_frame_burst,     SLE_UINT16, S, NO,       256,                  1,        65535,         0, STR_NULL,                                            NULL),
    00792      SDTC_VAR(network.max_join_time,             SLE_UINT16, S, NO,       500,                  0,        32000,         0, STR_NULL,                                            NULL),
    00793     SDTC_BOOL(network.pause_on_join,                         S, NO,       true,                                             STR_NULL,                                            NULL),
    00794      SDTC_VAR(network.server_port,               SLE_UINT16, S, NO,       NETWORK_DEFAULT_PORT, 0,        65535,         0, STR_NULL,                                            NULL),
    00795      SDTC_VAR(network.server_admin_port,         SLE_UINT16, S, NO,       NETWORK_ADMIN_PORT,   0,        65535,         0, STR_NULL,                                            NULL),
    00796     SDTC_BOOL(network.server_admin_chat,                     S, NO,       true,                                             STR_NULL,                                            NULL),
    00797     SDTC_BOOL(network.server_advertise,                      S, NO,       false,                                            STR_NULL,                                            NULL),
    00798      SDTC_VAR(network.lan_internet,              SLE_UINT8,  S, NO,       0,                    0,        1,             0, STR_NULL,                                            NULL),
    00799      SDTC_STR(network.client_name,               SLE_STRB,   S, 0,        NULL,                                             STR_NULL,                                            UpdateClientName),
    00800      SDTC_STR(network.server_password,           SLE_STRB,   S, NO,       NULL,                                             STR_NULL,                                            UpdateServerPassword),
    00801      SDTC_STR(network.rcon_password,             SLE_STRB,   S, NO,       NULL,                                             STR_NULL,                                            UpdateRconPassword),
    00802      SDTC_STR(network.admin_password,            SLE_STRB,   S, NO,       NULL,                                             STR_NULL,                                            NULL),
    00803      SDTC_STR(network.default_company_pass,      SLE_STRB,   S, 0,        NULL,                                             STR_NULL,                                            NULL),
    00804      SDTC_STR(network.server_name,               SLE_STRB,   S, NO,       NULL,                                             STR_NULL,                                            NULL),
    00805      SDTC_STR(network.connect_to_ip,             SLE_STRB,   S, 0,        NULL,                                             STR_NULL,                                            NULL),
    00806      SDTC_STR(network.network_id,                SLE_STRB,   S, NO,       NULL,                                             STR_NULL,                                            NULL),
    00807     SDTC_BOOL(network.autoclean_companies,                   S, NO,       false,                                            STR_NULL,                                            NULL),
    00808      SDTC_VAR(network.autoclean_unprotected,     SLE_UINT8,  S, D0|NO,    12,                   0,        240,           0, STR_NULL,                                            NULL),
    00809      SDTC_VAR(network.autoclean_protected,       SLE_UINT8,  S, D0|NO,    36,                   0,        240,           0, STR_NULL,                                            NULL),
    00810      SDTC_VAR(network.autoclean_novehicles,      SLE_UINT8,  S, D0|NO,    0,                    0,        240,           0, STR_NULL,                                            NULL),
    00811      SDTC_VAR(network.max_companies,             SLE_UINT8,  S, NO,       15,                   1,        MAX_COMPANIES, 0, STR_NULL,                                            UpdateClientConfigValues),
    00812      SDTC_VAR(network.max_clients,               SLE_UINT8,  S, NO,       25,                   2,        MAX_CLIENTS,   0, STR_NULL,                                            NULL),
    00813      SDTC_VAR(network.max_spectators,            SLE_UINT8,  S, NO,       15,                   0,        MAX_CLIENTS,   0, STR_NULL,                                            UpdateClientConfigValues),
    00814      SDTC_VAR(network.restart_game_year,         SLE_INT32,  S, D0|NO|NC, 0,                    MIN_YEAR, MAX_YEAR,      1, STR_NULL,                                            NULL),
    00815      SDTC_VAR(network.min_active_clients,        SLE_UINT8,  S, NO,       0,                    0,        MAX_CLIENTS,   0, STR_NULL,                                            NULL),
    00816    SDTC_OMANY(network.server_lang,               SLE_UINT8,  S, NO,       0,                    35,   _server_langs,        STR_NULL,                                            NULL),
    00817     SDTC_BOOL(network.reload_cfg,                            S, NO,       false,                                            STR_NULL,                                            NULL),
    00818      SDTC_STR(network.last_host,                 SLE_STRB,   S, 0,        "",                                               STR_NULL,                                            NULL),
    00819      SDTC_VAR(network.last_port,                 SLE_UINT16, S, 0,        0,                    0,        UINT16_MAX,    0, STR_NULL,                                            NULL),
    00820     SDTC_BOOL(network.no_http_content_downloads,             S, 0,        false,                                            STR_NULL,                                            NULL),
    00821 #endif /* ENABLE_NETWORK */
    00822
    00823   /*
    00824    * Since the network code (CmdChangeSetting and friends) use the index in this array to decide
    00825    * which setting the server is talking about all conditional compilation of this array must be at the
    00826    * end. This isn't really the best solution, the settings the server can tell the client about should
    00827    * either use a seperate array or some other form of identifier.
    00828    */
    00829
    00830 #ifdef __APPLE__
    00831   /* We might need to emulate a right mouse button on mac */
    00832    SDTC_VAR(gui.right_mouse_btn_emulation,                 SLE_UINT8, S, MS,    0,      0,   2,       0, STR_CONFIG_SETTING_RIGHT_MOUSE_BTN_EMU,   NULL),
    00833 #endif
    00834
    00835    /* Copy & Paste related patch options */
    00836    SDTC_VAR(gui.cp_paste_speed,                            SLE_UINT8, S, 0,     5,      1,   255,     1, STR_CONFIG_PATCHES_CP_PASTE_SPEED,        NULL),
    00837
    00838   SDT_END()
    00839 };
    00840
    00841 static const SettingDesc _company_settings[] = {
    00842      SDT_BOOL(CompanySettings, engine_renew,                          0, PC,    false,                   STR_CONFIG_SETTING_AUTORENEW_VEHICLE,     NULL),
    00843       SDT_VAR(CompanySettings, engine_renew_months,       SLE_INT16,  0, PC,    6,      -12, 12,      0, STR_CONFIG_SETTING_AUTORENEW_MONTHS,      NULL),
    00844       SDT_VAR(CompanySettings, engine_renew_money,        SLE_UINT,   0, PC|CR, 100000, 0,   2000000, 0, STR_CONFIG_SETTING_AUTORENEW_MONEY,       NULL),
    00845      SDT_BOOL(CompanySettings, renew_keep_length,                     0, PC,    false,                   STR_NULL,                                 NULL),
    00846      SDT_BOOL(CompanySettings, vehicle.servint_ispercent,             0, PC,    false,                   STR_CONFIG_SETTING_SERVINT_ISPERCENT,     CheckInterval),
    00847       SDT_VAR(CompanySettings, vehicle.servint_trains,    SLE_UINT16, 0, PC|D0, 150,    5,   800,     0, STR_CONFIG_SETTING_SERVINT_TRAINS,        InvalidateDetailsWindow),
    00848       SDT_VAR(CompanySettings, vehicle.servint_roadveh,   SLE_UINT16, 0, PC|D0, 150,    5,   800,     0, STR_CONFIG_SETTING_SERVINT_ROAD_VEHICLES, InvalidateDetailsWindow),
    00849       SDT_VAR(CompanySettings, vehicle.servint_ships,     SLE_UINT16, 0, PC|D0, 360,    5,   800,     0, STR_CONFIG_SETTING_SERVINT_SHIPS,         InvalidateDetailsWindow),
    00850       SDT_VAR(CompanySettings, vehicle.servint_aircraft,  SLE_UINT16, 0, PC|D0, 100,    5,   800,     0, STR_CONFIG_SETTING_SERVINT_AIRCRAFT,      InvalidateDetailsWindow),
    00851       SDT_END()
    00852 };
    00853
    00854 static const SettingDesc _currency_settings[] = {
    00855      SDT_VAR(CurrencySpec, rate,      SLE_UINT16, S, 0, 1,         0,        UINT16_MAX, 0, STR_NULL, NULL),
    00856      SDT_CHR(CurrencySpec, separator,             S, 0, ".",                                STR_NULL, NULL),
    00857      SDT_VAR(CurrencySpec, to_euro,   SLE_INT32,  S, 0, 0,         MIN_YEAR, MAX_YEAR,   0, STR_NULL, NULL),
    00858      SDT_STR(CurrencySpec, prefix,    SLE_STRBQ,  S, 0, NULL,                               STR_NULL, NULL),
    00859      SDT_STR(CurrencySpec, suffix,    SLE_STRBQ,  S, 0, " credits",                         STR_NULL, NULL),
    00860      SDT_END()
    00861 };
    00862
    00863 /* Undefine for the shortcut macros above */
    00864 #undef S
    00865 #undef C
    00866 #undef N
    00867
    00868 #undef D0
    00869 #undef NC
    00870 #undef MS
    00871 #undef NO
    00872 #undef CR