User:NotAnyoneSpecial: Difference between revisions
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 34: | Line 34: | ||
Sum 2x2 Cell = Population Density- (Police Power / 2) - (Land Value / 4) + +64 for Legalized Gambling (16 x 4 tiles per parcel/cell) | Sum 2x2 Cell = Population Density- (Police Power / 2) - (Land Value / 4) + +64 for Legalized Gambling (16 x 4 tiles per parcel/cell) | ||
===Pollution=== | ===Pollution=== | ||
Sum 2x2 cell = [ | neighboringDirections is: 1 for each valid direction plus the tile itself for "averaging", usually 5 except on edges.<br>Pollution Divisor is: 4 - wIndustrialMixPollutionBonus [-1 to 2] + wSewerBonus[0 or 1] + PollutionControls[0 or 1] | ||
Sum 2x2 cell = 2 x ([last_cycle_polluteVal + XTRF_Map/5 + RawPollution <nowiki>[</nowiki>[[Pollution Table|TileID]]<nowiki>]</nowiki> for each tile + 200 for each Radioactive]) / (neighboringDirections+PollutionDivisor) | |||
===Density=== | ===Density=== | ||
Sum 4x4 cell = TileDensity/10 [1,2,3,4] or non-RCI=2 (Density: "20 Sims"/tile) or Arcology=12 (Density: "120 Sims"/tile) | Sum 4x4 cell = TileDensity/10 [1,2,3,4] or non-RCI=2 (Density: "20 Sims"/tile) or Arcology=12 (Density: "120 Sims"/tile) | ||
Line 40: | Line 42: | ||
Sum 4x4 cell = 127 -/+ Pop Change in DensityVal | Sum 4x4 cell = 127 -/+ Pop Change in DensityVal | ||
===OVERRIDE FIX=== | ===OVERRIDE FIX=== | ||
Apply {{memoryLocation|@0046AAAE}} | |||
The temporary "ResCom_beauty" array isn't properly cleared/reinitalized and is left in a dirty state after processing the pollution simulator or from last crime sim. This properly force clears the whole array. | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
jmp 0046B68E | jmp 0046B68E //JUMP TO SOMEWHERE OUTSIDE FUNCTION. | ||
mov ebp,[ebx*4+004CC4F0] | mov ebp,[ebx*4+004CC4F0] //dwMapXBLD | ||
movsx edi,si | movsx edi,si | ||
mov ecx,[ebx*4+004CC6F8] | mov ecx,[ebx*4+004CC6F8] //dwNaturalBeauty_ResCom | ||
mov word ptr [ecx+edi*2],0000 | mov word ptr [ecx+edi*2],0000 | ||
JMP 0046AAB5 | JMP 0046AAB5 //JUMP BACK INTO FUNCTION. | ||
</syntaxhighlight> | </syntaxhighlight> | ||
<hr> | |||
Apply {{memoryLocation|@0046AADF}} | |||
This array is at the wrong scale, it should be 1/4thed. This whole part of the simulation is completely bugged and nonfunctional. All Zoned tiles should start with a 40 ($41,000 per acre) base for every tile above lower income homes (0x70) which is all development. | |||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
mov word ptr [ecx+edi*2], | mov word ptr [ecx+edi*2],0028 //literally doesn't work in almost all cases because operating it's "out of bounds" at 128x128 not 32x32 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
===Load Func=== | ===Load Func=== | ||
00433A50 | 00433A50 |
Latest revision as of 07:34, 29 March 2025
Hello world!
Construction 2 | |
---|---|
![]() | |
TileID | 0xC3 |
Zoning Type | None |
Something | 0xABCD |
public scratchpad (needs formal writeup)


Per Zone Formulas
General structure: BaseBeauty + CityCenter_Bonus + ZoneSpecialBonus (Res: Low Pop Density, Com: High Pop Density, Ind: No Density Restriction) - Pollute - Crime
Res
2x2 cell Residential Land Value & No zone (0046AE09) = (64-CC_Dist)/2 - ( Pollution / 5 ) - ( Crime / 3 ) + +21 for (64>Population Density) + NaturalBeauty_ResCom
Com
2x2 cell Commercial Land Value (0046AEF9) = 64-CC_Dist - ( Pollution / 4 ) - ( Crime / 3 ) + (Population Density / 3) + NaturalBeauty_ResCom
Ind
2x2 cell Industrial Land Value (0046AFE7) = (64-CC_Dist)/4 - ( Pollution / 16 ) - ( Crime / 4 ) + +21 for dense industry + NaturalBeauty_Ind
NaturalBeauty_ResCom
Sum 4x4 cell =
- IsTile case select?
- for each BigPark tile: +40
- for each Tree tile&SmallPark: +20
- for each rubble&radioactivity: -20
- for each bare land: +4,
- for each TerrainSlope: +12,
- for each Tile receiving water: +4,
- for each surface water: +12,
then average around, include itself (5 but less if on edges) Bugged! seems to include wrong maps.
NaturalBeauty_Industrial
Sum 4x4 cell =
- for each Tile receiving water: +4,
- for each surface water: +12,
then average around, include itself (5 but less if on edges) Bugged! seems to include wrong maps.
Crimes
Sum 2x2 Cell = Population Density- (Police Power / 2) - (Land Value / 4) + +64 for Legalized Gambling (16 x 4 tiles per parcel/cell)
Pollution
neighboringDirections is: 1 for each valid direction plus the tile itself for "averaging", usually 5 except on edges.
Pollution Divisor is: 4 - wIndustrialMixPollutionBonus [-1 to 2] + wSewerBonus[0 or 1] + PollutionControls[0 or 1]
Sum 2x2 cell = 2 x ([last_cycle_polluteVal + XTRF_Map/5 + RawPollution [TileID] for each tile + 200 for each Radioactive]) / (neighboringDirections+PollutionDivisor)
Density
Sum 4x4 cell = TileDensity/10 [1,2,3,4] or non-RCI=2 (Density: "20 Sims"/tile) or Arcology=12 (Density: "120 Sims"/tile)
ROG
Sum 4x4 cell = 127 -/+ Pop Change in DensityVal
OVERRIDE FIX
Apply Location:@0046AAAE
The temporary "ResCom_beauty" array isn't properly cleared/reinitalized and is left in a dirty state after processing the pollution simulator or from last crime sim. This properly force clears the whole array.
jmp 0046B68E //JUMP TO SOMEWHERE OUTSIDE FUNCTION.
mov ebp,[ebx*4+004CC4F0] //dwMapXBLD
movsx edi,si
mov ecx,[ebx*4+004CC6F8] //dwNaturalBeauty_ResCom
mov word ptr [ecx+edi*2],0000
JMP 0046AAB5 //JUMP BACK INTO FUNCTION.
Apply Location:@0046AADF
This array is at the wrong scale, it should be 1/4thed. This whole part of the simulation is completely bugged and nonfunctional. All Zoned tiles should start with a 40 ($41,000 per acre) base for every tile above lower income homes (0x70) which is all development.
mov word ptr [ecx+edi*2],0028 //literally doesn't work in almost all cases because operating it's "out of bounds" at 128x128 not 32x32
Load Func
00433A50