From 52572cafa62b1ab2f095f8a6d7db23f5d0fa618e Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Wed, 7 Nov 2018 19:06:39 +0100 Subject: Add: Option for population-linear town cargo generation Introduce a new default algorithm for town cargo generation (passengers and mail), and a game setting to choose between the new and original algorithm. The original town cargo generation algorithm has the property of the generated amount relating to the square of each building's population, meaning large towns easily produce more cargo than can realistically be transported. The problem is excessive cargo is amplified if playing with cargodist. The new algorithm introduced instead has a linear relation to the population. The result is that smaller towns will produce slightly more cargo, while the largest towns will produce about a fourth of what they would with the original algorithm. Existing savegames will use the original algorithm, while new games will default to the new algorithm. --- src/table/settings.ini | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/table') diff --git a/src/table/settings.ini b/src/table/settings.ini index 5bb2c73aa..c2faa43ca 100644 --- a/src/table/settings.ini +++ b/src/table/settings.ini @@ -618,6 +618,21 @@ def = true str = STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS strhelp = STR_CONFIG_SETTING_ALLOW_TOWN_LEVEL_CROSSINGS_HELPTEXT +[SDT_VAR] +base = GameSettings +var = economy.town_cargogen_mode +type = SLE_UINT8 +from = SLV_TOWN_CARGOGEN +guiflags = SGF_MULTISTRING +def = TCGM_BITCOUNT +min = TCGM_BEGIN +max = TCGM_END - 1 +interval = 1 +str = STR_CONFIG_SETTING_TOWN_CARGOGENMODE +strhelp = STR_CONFIG_SETTING_TOWN_CARGOGENMODE_HELPTEXT +strval = STR_CONFIG_SETTING_TOWN_CARGOGENMODE_ORIGINAL +cat = SC_ADVANCED + ; link graph [SDT_VAR] -- cgit v1.2.3-54-g00ecf