Power Plants: Difference between revisions
From sc2k-reverse
Jump to navigationJump to search
+added my full interpretation of the code |
Looked at table at [004E99E8] - the "common wisdom" was wrong |
||
(4 intermediate revisions by the same user not shown) | |||
Line 9: | Line 9: | ||
| [[File:207.gif|128x106px]] || Coal Power Plant || 0x00CF|| 1900 || 4000 || 200 || 44 || 704 || 50 | | [[File:207.gif|128x106px]] || Coal Power Plant || 0x00CF|| 1900 || 4000 || 200 || 44 || 704 || 50 | ||
|- | |- | ||
| [[File:198.gif|32x32px]] [[File:199.gif|32x32px]] || Hydro Power Plant|| 0x00C6, 0x00C7 || 1900 || 400 || 20 || 40 || 40 || 0 | |style="text-align:center;"| [[File:198.gif|32x32px]] [[File:199.gif|32x32px]] || Hydro Power Plant|| 0x00C6, 0x00C7 || 1900 || 400 || 20 || 40 || 40 || 0 | ||
|- | |- | ||
| [[File:202.gif|128x115px]] || Oil Power Plant || 0x00CA || 1900 || 6600 || 220 ||48 || 768 || 25 | | [[File:202.gif|128x115px]] || Oil Power Plant || 0x00CA || 1900 || 6600 || 220 ||48 || 768 || 25 | ||
|- | |- | ||
| [[File:201.gif|128x115px]] || Natural Gas Power Plant || 0x00C9 || | | [[File:201.gif|128x115px]] || Natural Gas Power Plant || 0x00C9 ||1940 || 2000 || 50 || 11 || 176 || 10 | ||
|- | |- | ||
| [[File:203.gif|128x115px]] || Nuclear Power Plant || 0x00CB || | | [[File:203.gif|128x115px]] || Nuclear Power Plant || 0x00CB ||1950 || 15000 || 500 || 111 || 1776 || 2 | ||
|- | |- | ||
| [[File:200.gif|32x48px]] || Wind Power Plant || 0x00C8 || 1970 || 100 || 4 || * || * || 0 | |style="text-align:center;"| [[File:200.gif|32x48px]] || Wind Power Plant || 0x00C8 || 1970 || 100 || 4 || * || * || 0 | ||
|- | |- | ||
| [[File:204.gif|128x115px]] || Solar Power Plant || 0x00CC ||1980 || 1300 || 50 || * || * || 0 | | [[File:204.gif|128x115px]] || Solar Power Plant || 0x00CC ||1980 || 1300 || 50 || * || * || 0 | ||
Line 30: | Line 30: | ||
case 0xC8: //Wind Power | case 0xC8: //Wind Power | ||
VariableOutput = (bWeatherWind / 8) + 1; | VariableOutput = (bWeatherWind / 8) + 1; | ||
Total += (rand() % VariableOutput + dwMapALTM[Tile_X][Tile_Y] & 31)) / 2; | Total += (rand() % VariableOutput + (dwMapALTM[Tile_X][Tile_Y] & 31)) / 2; | ||
break; | break; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
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> |
Latest revision as of 04:10, 19 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;