diff --git a/(1) Community Patch/Core Files/Core Values/CoreDefines.sql b/(1) Community Patch/Core Files/Core Values/CoreDefines.sql index 68a42e475c..8e3af5643b 100644 --- a/(1) Community Patch/Core Files/Core Values/CoreDefines.sql +++ b/(1) Community Patch/Core Files/Core Values/CoreDefines.sql @@ -664,6 +664,7 @@ INSERT INTO Defines (Name, Value) SELECT 'TECH_NEED_MODIFIER_PER_TECH_BELOW_MEDI INSERT INTO Defines (Name, Value) SELECT 'CITY_SIZE_NEED_MODIFIER', 0; -- Modifier to needs per citizen in the city. Disabled by default. -100 = -1%. INSERT INTO Defines (Name, Value) SELECT 'EMPIRE_SIZE_NEED_MODIFIER_CITIES', 500; -- Modifier to needs per non-puppet city in the empire, excluding the capital. Scales with map size. Default is 500 (+5%). Does not support negative values. INSERT INTO Defines (Name, Value) SELECT 'EMPIRE_SIZE_NEED_MODIFIER_POP', 125; -- Modifier to needs per citizen in the empire, excluding those in puppet cities. Scales with map size. Default is 125 (+1% per 8 citizens). Does not support negative values. +INSERT INTO Defines (Name, Value) SELECT 'EMPIRE_SIZE_NEED_MODIFIER_CAP', 100000; -- Cap to total Empire Size Modifier for Needs. (1 = 1%) -- Unhappiness from Other Sources INSERT INTO Defines (Name, Value) SELECT 'UNHAPPINESS_PER_STARVING_POP', 1.0; -- Unhappiness point per starving citizen. (rounded down) diff --git a/CvGameCoreDLL_Expansion2/CvCity.cpp b/CvGameCoreDLL_Expansion2/CvCity.cpp index 189a594080..b2e91c3361 100644 --- a/CvGameCoreDLL_Expansion2/CvCity.cpp +++ b/CvGameCoreDLL_Expansion2/CvCity.cpp @@ -20658,7 +20658,7 @@ int CvCity::GetEmpireSizeModifier() const iEmpireMod *= GET_PLAYER(getOwner()).isHuman() ? 100 + GET_PLAYER(getOwner()).getHandicapInfo().getEmpireSizeUnhappinessMod() : 100 + GET_PLAYER(getOwner()).getHandicapInfo().getEmpireSizeUnhappinessMod() + GC.getGame().getHandicapInfo().getAIEmpireSizeUnhappinessMod(); iEmpireMod /= 100; - return std::max(iEmpireMod, 0); + return range(iEmpireMod, 0, /*100000*/ GD_INT_GET(EMPIRE_SIZE_NEED_MODIFIER_CAP)); } int CvCity::GetReducedEmpireSizeModifier(bool bForceRecalc, bool bCityOnly) const diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.cpp b/CvGameCoreDLL_Expansion2/CvGlobals.cpp index c9b96524f3..8dc78bcd79 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.cpp +++ b/CvGameCoreDLL_Expansion2/CvGlobals.cpp @@ -1497,6 +1497,7 @@ CvGlobals::CvGlobals() : GD_INT_INIT(CITY_SIZE_NEED_MODIFIER, 0), GD_INT_INIT(EMPIRE_SIZE_NEED_MODIFIER_CITIES, 500), GD_INT_INIT(EMPIRE_SIZE_NEED_MODIFIER_POP, 125), + GD_INT_INIT(EMPIRE_SIZE_NEED_MODIFIER_CAP, 100000), GD_INT_INIT(UNHAPPINESS_PER_SPECIALIST, 100), GD_INT_INIT(UNHAPPINESS_PER_X_PUPPET_CITIZENS, 4), GD_INT_INIT(WAR_WEARINESS_POPULATION_PERCENT_CAP, 34), @@ -6329,6 +6330,7 @@ void CvGlobals::cacheGlobals() GD_INT_CACHE(CITY_SIZE_NEED_MODIFIER); GD_INT_CACHE(EMPIRE_SIZE_NEED_MODIFIER_CITIES); GD_INT_CACHE(EMPIRE_SIZE_NEED_MODIFIER_POP); + GD_INT_CACHE(EMPIRE_SIZE_NEED_MODIFIER_CAP); GD_INT_CACHE(UNHAPPINESS_PER_SPECIALIST); GD_INT_CACHE(UNHAPPINESS_PER_X_PUPPET_CITIZENS); GD_INT_CACHE(WAR_WEARINESS_POPULATION_PERCENT_CAP); diff --git a/CvGameCoreDLL_Expansion2/CvGlobals.h b/CvGameCoreDLL_Expansion2/CvGlobals.h index 2f27caf127..59c170a0ee 100644 --- a/CvGameCoreDLL_Expansion2/CvGlobals.h +++ b/CvGameCoreDLL_Expansion2/CvGlobals.h @@ -2088,6 +2088,7 @@ class CvGlobals GD_INT_MEMBER(CITY_SIZE_NEED_MODIFIER); // VP GD_INT_MEMBER(EMPIRE_SIZE_NEED_MODIFIER_CITIES); // VP GD_INT_MEMBER(EMPIRE_SIZE_NEED_MODIFIER_POP); // VP + GD_INT_MEMBER(EMPIRE_SIZE_NEED_MODIFIER_CAP); // VP GD_INT_MEMBER(UNHAPPINESS_PER_SPECIALIST); // VP GD_INT_MEMBER(UNHAPPINESS_PER_X_PUPPET_CITIZENS); // VP GD_INT_MEMBER(WAR_WEARINESS_POPULATION_PERCENT_CAP); // VP