RimWorld

RimWorld

Advanced Power Plus
Klein 28. okt. 2022 kl. 7:20
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 :(.
< >
Viser 1-5 af 5 kommentarer
Miguel V-DF  [udvikler] 29. okt. 2022 kl. 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?
Klein 1. nov. 2022 kl. 12:38 
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.
Klein 8. sep. 2023 kl. 5:58 
There is pull request to fix this issue: https://github.com/Meltup/Advanced-Power-Plus/pull/2
Miguel V-DF  [udvikler] 8. sep. 2023 kl. 13:59 
Oprindeligt skrevet af 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  [udvikler] 29. nov. 2023 kl. 2:40 
And I never got around to it, sorry, I will download Rimworld again and check it out
< >
Viser 1-5 af 5 kommentarer
Per side: 1530 50