Giter Site home page Giter Site logo

repowerreborn's Introduction

RePowerReborn

Rebalance power consumption based on when an object is in use.
Original mod by Texel, updated to RimWorld 1.0 by NubsPixel, now continued by me (EbonJaeger).

Generally speaking, power consumers will use substantially reduced power when not in use, and substantially more power when in use. Power consumption will accordingly vary wildly based on usage, rather than the vanilla behaviour of simply how many worktables or doors you have.

Dependencies

Hugslib

Affected Buildings

  • Electric Tailoring Bench (10W Idle, 500W Active)
  • Electric Smithy (10W Idle, 1000W Active)
  • Machining Table (10W Idle, 1400W Active)
  • Electric Stove (10W Idle, 1000W Active)
  • Electric Smelter (400W Idle, 4500W Active)
  • Biofuel Refinery (10W Idle, 1800W Active)
  • Fabrication Bench (10W Idle, 1800W Active)
  • Electric Crematorium (200W Idle, 750W Active)
  • Multi-Analyzer (10W Idle, 600W Active) (Active when an associated research table is in use)
  • Vitals Monitor (10W Idle, 1000W Active) (Active when the associated medical bed is in use)
  • HiTech Research Bench (100W Idle, 1000W Active)
  • AutoDoor (5W Idle, 500W Active) (Active when open, but not blocked or held)
  • Televisions (10W Idle, 400W Active) (Active when being watched)
  • Deep Drill (10W Idle, 500W Active)
  • Hydroponics Basin (10W Idle, 75W Active) (Active when something is planted in it)

repowerreborn's People

Contributors

ebonjaeger avatar jellypowered avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

repowerreborn's Issues

Sunlamp and hydroponics basin compatibility?

Hello! Thank you for continuing this mod, I have tried to enable repower for two in game items, and am not getting the expected results. I haven't dug through the game code to even see if this is possible, perhaps you have some ideas?

I have a Efficent utilities so the sunlamp when active costs 500w in my game. I attempted to mirror that with the following defs.

<RePower.RePowerDef>
	<!-- Hydroponics Basin to support low power mode when not active -->
	<defName>RePowerHydroponicsBasin</defName>
	<targetDef>HydroponicsBasin</targetDef>
	<lowPower>-10</lowPower>
	<highPower>-75</highPower>
	<poweredWorkbench>false</poweredWorkbench>
	<poweredReservable>true</poweredReservable>
</RePower.RePowerDef>

<RePower.RePowerDef>
	<!-- Sunlamp to support low power mode when not active-->
	<defName>RePowerSunLamp</defName>
	<targetDef>SunLamp</targetDef>
	<lowPower>-10</lowPower>
	<highPower>-500</highPower>
	<poweredWorkbench>false</poweredWorkbench>
	<poweredReservable>true</poweredReservable>
</RePower.RePowerDef>

However, regardless of the time of day, the above additions to the RePowerVanillaBuildings.xml only work to limit the power consumption to 10w. When the sunlamp turns on, it does not increase the consumption to 500w as intended.

Open for suggestions, I tried setting both of them to

	<poweredWorkbench>true</poweredWorkbench>
	<poweredReservable>false</poweredReservable>

but same results.

Perhaps adding a check for "scheduled on/off"
As the core sunlamp def has this little bit in it,

  <li Class="CompProperties_Schedule">
        <!-- Match plant growing times -->
        <startTime>0.25</startTime>
        <endTime>0.8</endTime>
        <offMessage>Off for plant resting period</offMessage>
      </li>

Maybe adding an option such as:

	<poweredWorkbench>false</poweredWorkbench>
	<poweredReservable>false</poweredReservable>
        <poweredScheduled>true</poweredScheduled>  <!-- Only used for powered items with a schedule!-->

Thanks for your thoughts!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.