RimWorld
Advanced Power Plus
Modding: allow to use basePowerConsumption to rebalance
New version of advanced solar ignores basePowerConsumption just like stock. Is there way to adjust solar output using xml patch?

Details: all other stock power generators seem to read their max output from property <li Class="CompProperties_Power"><basePowerConsumption> (example from CompPowerPlantWind.cs: return base.PowerOutput / (-base.Props.basePowerConsumption * 1.5f);)
Stock solar power class is only exception: it hardcodes value "private const float FullSunPower = 1700f;" and ignores value in ThingDef making rebalancing difficult.

Previously your modded class allowed one to make patches like this:
<Operation Class="PatchOperationReplace"> <xpath>/Defs/ThingDef[defName="SolarGenerator"]/comps/li[@Class="CompProperties_Power"]</xpath> <value> <!-- <li Class="CompProperties_Power"> <compClass>CompPowerPlantSolar</compClass> <basePowerConsumption>-1</basePowerConsumption> <transmitsPower>true</transmitsPower> </li> 1700 W is hardcoded so let's switch to mod --> <li Class="CompProperties_Power"> <compClass>sd_adv_powergen.sd_adv_powergen_CompAdvPowerPlantSolar</compClass> <basePowerConsumption>-1000</basePowerConsumption> <transmitsPower>true</transmitsPower> </li> </value> </Operation>

But new version for 1.4 hardcodes 3400 :(.
< >
1-5 van 5 reacties weergegeven
Miguel V-DF  [ontwikkelaar] 29 okt 2022 om 9:36 
I got it. I am very busy right now, but when I can I will try to make it open to xml patching. In the meantime, can you use https://gtm.steamproxy.vip/sharedfiles/filedetails/?id=1084452457 to see if you can edit the energy output ingame at least?
Thanks for suggestion, it is interesting tool. Unfortunately, it allows to modify only construction resource cost and pathing of buildings, but not their power requirement/output.
There is pull request to fix this issue: https://github.com/Meltup/Advanced-Power-Plus/pull/2
Miguel V-DF  [ontwikkelaar] 8 sep 2023 om 13:59 
Origineel geplaatst door Klein:
There is pull request to fix this issue: https://github.com/Meltup/Advanced-Power-Plus/pull/2
Oh, I will take a look and test it and if I find no problems and conflicts with other mods I will merge it, thanks anyway!
Miguel V-DF  [ontwikkelaar] 29 nov 2023 om 2:40 
And I never got around to it, sorry, I will download Rimworld again and check it out
< >
1-5 van 5 reacties weergegeven
Per pagina: 1530 50