Power Plants: Difference between revisions
From sc2k-reverse
Jump to navigationJump to search
No edit summary |
+added my full interpretation of the code |
||
Line 1: | Line 1: | ||
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 | '''Func Location:''' <code>004679B6</code> | ||
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. | |||
{| class="wikitable sortable" | {| class="wikitable sortable" | ||
|+ Power Plants | |+ Power Plants | ||
Line 7: | 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 || | | [[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 | ||
Line 23: | Line 25: | ||
| [[File:206.gif|128x69px]] || Fusion Power Plant || 0x00CE || 2050 || 40000 || 2500 ||555 || 8880 || 2 | | [[File:206.gif|128x69px]] || Fusion Power Plant || 0x00CE || 2050 || 40000 || 2500 ||555 || 8880 || 2 | ||
|} | |} | ||
==Wind== | |||
'''Location:''' <code>00467AD7</code> | |||
<syntaxhighlight lang="cpp"> | |||
case 0xC8: //Wind Power | |||
VariableOutput = (bWeatherWind / 8) + 1; | |||
Total += (rand() % VariableOutput + dwMapALTM[Tile_X][Tile_Y] & 31)) / 2; | |||
break; | |||
</syntaxhighlight> | |||
==Solar== | |||
'''Location:''' <code>00467B29</code> | |||
<syntaxhighlight lang="cpp"> | |||
case 0xCC: //Solar Power | |||
VariableOutput = (100 - bWeatherHeat) / 10; | |||
Total += rand() % VariableOutput + 5; | |||
break; | |||
</syntaxhighlight> |
Revision as of 03:05, 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 - bWeatherHeat) / 10;
Total += rand() % VariableOutput + 5;
break;