[A16] Repower - Machine Idling and Power Rebalancing

Started by Texel, February 21, 2017, 04:22:08 PM

Previous topic - Next topic


SpaceDorf

Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

lperkins2

Got the source code for your unofficial update?  Even a diff against the last official version would be great, I want to make some changes.

Ristelle

Source for Jastro's unofficial update: Box

I also made a version which brings some of the values of the power usage down to something more realistic. 500W for opening a autodoor is too much.Patched
Tidal Wave!

Exende

Exception ticking Watch: System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.StatWorker.GetBaseValueFor (Verse.BuildableDef) <0x0001d>
at (wrapper dynamic-method) RimWorld.StatWorker.GetValueUnfinalized_Patch1 (object,RimWorld.StatRequest,bool) <0x000a2>
at RimWorld.StatWorker.GetValue (RimWorld.StatRequest,bool) <0x000be>
at RimWorld.StatWorker.GetValue (Verse.Thing,bool) <0x00042>
at (wrapper dynamic-method) RimWorld.StatExtension.GetStatValue_Patch1 (Verse.Thing,RimWorld.StatDef,bool) <0x00034>
at RePower.JobDriver_WatchBuildingPostfix._WatchTickAction (RimWorld.JobDriver_WatchBuilding) <0x000b5>
at (wrapper dynamic-method) RimWorld.JobDriver_WatchBuilding.WatchTickAction_Patch1 (object) <0x000e9>
at RimWorld.JobDriver_PlayHorseshoes.WatchTickAction () <0x000a5>
at RimWorld.JobDriver_WatchBuilding/<MakeNewToils>c__Iterator0/<MakeNewToils>c__AnonStorey1.<>m__1 () <0x0001d>
at (wrapper dynamic-method) Verse.AI.JobDriver.DriverTick_Patch1 (object) <0x0024d>
at Verse.AI.Pawn_JobTracker.JobTrackerTick () <0x00242>
at Verse.Pawn.Tick () <0x00155>
at Verse.TickList.Tick () <0x002c6>

Verse.Log:Error(String)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()


got this error with the horseshoe

PreDiabetic

This mod should be baseline in main game. I only power on my electric stove (IRL) when I need otherwise it doesn't consume power at all.

Fatsack

Got this bug while playing, had your mod named.   

Exception ticking Kort: System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.StatWorker.GetBaseValueFor (Verse.BuildableDef) <0x0001d>
at (wrapper dynamic-method) RimWorld.StatWorker.GetValueUnfinalized_Patch1 (object,RimWorld.StatRequest,bool) <0x0009f>
at RimWorld.StatWorker.GetValue (RimWorld.StatRequest,bool) <0x000be>
at RimWorld.StatWorker.GetValue (Verse.Thing,bool) <0x00042>
at (wrapper dynamic-method) RimWorld.StatExtension.GetStatValue_Patch2 (Verse.Thing,RimWorld.StatDef,bool) <0x0004b>
at RePower.JobDriver_WatchBuildingPostfix._WatchTickAction (RimWorld.JobDriver_WatchBuilding) <0x000b5>
at (wrapper dynamic-method) RimWorld.JobDriver_WatchBuilding.WatchTickAction_Patch1 (object) <0x000e9>
at RimWorld.JobDriver_PlayHorseshoes.WatchTickAction () <0x000a5>
at RimWorld.JobDriver_WatchBuilding/<MakeNewToils>c__Iterator0/<MakeNewToils>c__AnonStorey1.<>m__1 () <0x0001d>
at (wrapper dynamic-method) Verse.AI.JobDriver.DriverTick_Patch1 (object) <0x0024d>
at Verse.AI.Pawn_JobTracker.JobTrackerTick () <0x00242>
at (wrapper dynamic-method) Verse.Pawn.Tick_Patch1 (object) <0x00155>
at Verse.TickList.Tick () <0x002c6>

Verse.Log:Error(String)
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate_Patch0(Object)
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

Harry_Dicks

Quote from: Fatsack on March 04, 2018, 12:46:02 AM
Got this bug while playing, had your mod named.   

-snip-

I am an error log scrub, and really don't know what I'm looking at. But by glancing over that, it appears to me it has something to do with the pawn having trouble viewing the horseshoes game and/or interacting with this viewing experience. For my own sake, could you please show me how this is related to this mod?

Fatsack

at RePower.JobDriver_WatchBuildingPostfix._WatchTickAction

so the RePower mod has a class file JobDriver_WatchBuildingPostfix that has a method WatchTickAction that is in the stack trace.   Since this is the only modification file mentioned in the stack trace and the fact this does not occur in vanilla without the mod, troubleshooting reasoning points to that method in this mod being the problem.

BulletDelivery

This is the fix for JobDriver_WatchBuildingPostfix error. Since the source code wasn't available, I had to decompile the dll file, make changes, and compile it.

The source of the problem is the duplicated code in the mod's postfix methods. This resulted in the same code effectively being executed twice which caused NullReferenceException under certain circumstances and prevent pawns from watching TVs.

Replace RePower.dll file in the mod's assembly folder with the one below.
https://www.dropbox.com/s/n2tn3t4nos74txl/RePower.dll?dl=0

Telarin

I wanted to add support for More Vanilla Turrets. Took a look at the example file provided, and it seemed pretty straightforward, however, it doesn't seem to work directly for turrets. I'm guessing since they are unmanned, the game has no way to know when they are in use or not in use. Are there any extra settings not shown in the example file that I can use to make this work?


NubsPixel

Unofficial Update for B19:
Steam Workshop

Or see attachments.

Note:
Will remove upon request by original modder.

[attachment deleted due to age]

Jiro