User:NotAnyoneSpecial: Difference between revisions
No edit summary |
No edit summary |
||
Line 40: | Line 40: | ||
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. This 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 |
Revision as of 05:01, 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
Sum 2x2 cell = [last_cycle + traffic/5 + all 4 inside tiles RawPollution + 200 for each Radioactive] average around / Pollution divisor
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. This 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