Power Plants: Difference between revisions
From sc2k-reverse
Jump to navigationJump to search
caught my error. |
mNo edit summary |
||
Line 37: | Line 37: | ||
<syntaxhighlight lang="cpp"> | <syntaxhighlight lang="cpp"> | ||
case 0xCC: //Solar Power | case 0xCC: //Solar Power | ||
VariableOutput = (100 - | VariableOutput = (100 - bWeatherHumidity) / 10; | ||
Total += rand() % VariableOutput + 5; | Total += rand() % VariableOutput + 5; | ||
break; | break; | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 03:50, 18 March 2025
Func Location: 004679B6
Despite the listed nominal output of each power plant their true output is measured in "tiles powered" per individual power plant tile. In addition to this counter-intuitively the power plant itself "consumes" some of the electricity it generates at the same rate that all tiles do, meaning that while the full output of a Coal Power plant is 704, it's effective output is actually 688 due to the 16 tiles immediately consumed by the power plant.
Wind
Location: 00467AD7
case 0xC8: //Wind Power
VariableOutput = (bWeatherWind / 8) + 1;
Total += (rand() % VariableOutput + dwMapALTM[Tile_X][Tile_Y] & 31)) / 2;
break;
Solar
Location: 00467B29
case 0xCC: //Solar Power
VariableOutput = (100 - bWeatherHumidity) / 10;
Total += rand() % VariableOutput + 5;
break;