Skip to content

Commit

Permalink
Reducing level 5 office and overall density in light of game mechanics
Browse files Browse the repository at this point in the history
  • Loading branch information
WhitefangGreytail committed Jan 25, 2024
1 parent 187f337 commit 4003b59
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Patches/WG_IndustrialAISystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static bool GetFittingWorkers_Prefix(ref int __result, BuildingData building, Bu
if (spaceMultiplier >= 4) // High density
{
baseMultiplier = 25f; // Was 2.5, but absorbing the 10 previously multiplied in spaceMultiplier
levelMultiplier = -2.5f; // Slight reduction (Also aborbing the 10 previously multiplied in spaceMultiplier)
levelMultiplier = -1f; // Any change must also aborbing the 10 previously multiplied in spaceMultiplier
// Implicit floor in the divide 2
// Overwrite the space multiplier entirely with pseudo height calc
spaceMultiplier = (math.min((building.m_LotSize.x + building.m_LotSize.y) / 2, DataStore.maxOfficeBooster) - 1);
Expand All @@ -41,7 +41,7 @@ static bool GetFittingWorkers_Prefix(ref int __result, BuildingData building, Bu
}
}
else if (lotArea > 36) {
// Signature buildings
// Signature Industrial buildings
baseMultiplier = 2.25f; // Won't give the same multipler as vanilla, feels okay for this number
levelMultiplier = 0f;
}
Expand Down
11 changes: 9 additions & 2 deletions Patches/WG_ZoneProperties.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,23 @@ public static BuildingPropertyData GetBuildingPropertyData(ZoneProperties __inst
// Reduce residentialProperties to lower if constrained to a short building by tweaking the multiplier by lot size
// Smaller buildings are difficult to make tall
baseNum = 1.75f;
levelBooster = 0.05f;
levelBooster = 0.025f;
residentialProperties = math.min((buildingPrefab.m_LotWidth + buildingPrefab.m_LotDepth) / 2, 6f);

// TODO - Cap signature buildings?
if (lotSize > 36)
{
// Gently scale down the value for very large buildings
lotSize = lotSize / math.log10(lotSize);
}
break;
// No default
}

num = (baseNum + (levelBooster * level)) * lotSize * residentialProperties;
if (num > 1000)
{
// Gently scale down the value for very large buildings
// Scale further down
num /= math.log10(num);
}

Expand Down
Binary file modified WorkerCalc.xlsx
Binary file not shown.

0 comments on commit 4003b59

Please sign in to comment.