[A16] Repower - Machine Idling and Power Rebalancing

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

Previous topic - Next topic

Texel


Description
Rebalance power consumption based on when an object is in use.

Generally speaking, power consumers will use substantially reduced power when not in use, and substantively 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.


Effected 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)
Refinery (10W Idle, 1800W Active)
Component Assembly 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)


Mod support:
Requires Hugslib.
Support for EPOE is included, EPOE is not required
Template for additional mod support is provided
Rah's Bionics and Surgery Expansion


License
Feel free to include in modpacks.
The source for the mod is included in the downloads, if you want to make a compatibility update please base it on example defs provide rather than modifying the source.
The source is written in such a way where you should be able to accomplish almost anything you'd want in as a separate mod, so please seek permission before distributing the source with your mod.


Seiryuu

Exactly what my 50ish colonists' colony needed! Thanks!

Igan

Does it support EPOE Hardcore benches? I don't know if the two that are there are the same compared to the normal EPOE.

Trigon

Correct me if I'm wrong, but this mod also changes the power consumption to be quite significantly higher. Often four times higher. Is this adequately balanced with their idle consumption being pretty low? In any case this definitely makes batteries much more important.

Igan

This along the minimap is the thing that I most miss about CCL.

Thank you!

SpaceDorf

Quote from: Igan on February 21, 2017, 06:44:56 PM
This along the minimap is the thing that I most miss about CCL.

Thank you!

You said it man, five seconds earlier than me :)
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

Seiryuu

Quote from: Trigon on February 21, 2017, 06:03:12 PM
Correct me if I'm wrong, but this mod also changes the power consumption to be quite significantly higher. Often four times higher. Is this adequately balanced with their idle consumption being pretty low? In any case this definitely makes batteries much more important.

Wait, i noticed that too. If that's true, can you lower the active numbers??

jpinard

What kind of impact does this have on performance?  Seems like it might be quite a bit extra strain computationally?

lazuli42

Quote from: Seiryuu on February 21, 2017, 08:51:44 PM
Wait, i noticed that too. If that's true, can you lower the active numbers??

I suggest you try the mod as-is before you ask for the values changed. I think you'll find that even with higher active power drain you'll need to generate far less power than you normally need.

faltonico

Quote from: lazuli42 on February 21, 2017, 10:01:28 PM
Quote from: Seiryuu on February 21, 2017, 08:51:44 PM
Wait, i noticed that too. If that's true, can you lower the active numbers??

I suggest you try the mod as-is before you ask for the values changed. I think you'll find that even with higher active power drain you'll need to generate far less power than you normally need.
I don't think it would be much useful if you are not using batteries. I personally avoid them like a plague.

Texel

Quote from: Igan on February 21, 2017, 05:42:14 PM
Does it support EPOE Hardcore benches? I don't know if the two that are there are the same compared to the normal EPOE.

I'm not sure, the benches I included by default were:
Table Bionics
Table Simple Prosthetic
Table Surrogate
Upgrade Station

Please give me any defName you'd like you see added.

Quote from: Trigon on February 21, 2017, 06:03:12 PM
Correct me if I'm wrong, but this mod also changes the power consumption to be quite significantly higher. Often four times higher. Is this adequately balanced with their idle consumption being pretty low? In any case this definitely makes batteries much more important.

No, that's correct, this mod does substantively increase power consumption on machines when in use. It is generally adequately balanced, for smaller colonies in particular running off of a single solar panel and battery is much more plausible. When you get to larger colonies, ask yourself if more than 1/4th of workbenches are in use at any time, and you'll see it'll probably reduce the power consumption.

The only real 'Gotcha' with the numbers is since batteries are only 50% efficient (as in vanilla), power generation is ultimately doubled when running off charge, but that said with the lower idle costs you'll be saving a substantial amount of power at night.

Quote from: jpinard on February 21, 2017, 09:10:42 PM
What kind of impact does this have on performance?  Seems like it might be quite a bit extra strain computationally?

Relatively minor, rather than adding new ticking comps to buildings, instead the mod caches everything like crazy.
It'll only check for new buildings to modify power on every few hours, when a building is placed or removed, or when the map is loaded.
From there, workbenches (being the bulk of the effected buildings) notify on use has been detoured (Thanks Hugslib) to track what is in use, where the other objects use the map's existing reservation list.
For televisions, a another detour is used to intercept whenever a pawn is watching a building, which saves expensive area searches or iteration.
In short, the mod doesn't do anything fancy with values that were not already nicely cached or exposed.

Quote from: faltonico on February 22, 2017, 02:47:55 AM
Quote from: lazuli42 on February 21, 2017, 10:01:28 PM
Quote from: Seiryuu on February 21, 2017, 08:51:44 PM
Wait, i noticed that too. If that's true, can you lower the active numbers??

I suggest you try the mod as-is before you ask for the values changed. I think you'll find that even with higher active power drain you'll need to generate far less power than you normally need.
I don't think it would be much useful if you are not using batteries. I personally avoid them like a plague.

If your running without any batteries, yeah, that'd be the one situation where this mod probably isn't for you. Still, if you use fueled generators or geothermal, you'll get pretty good mileage? My personal playstyle is almost always large windfarms and battery banks for reliable power, and for folks who play with batteries this mod will generally decrease the amount of power generation you'll need overall.

Canute

Quote from: faltonico on February 22, 2017, 02:47:55 AM
Quote from: lazuli42 on February 21, 2017, 10:01:28 PM
Quote from: Seiryuu on February 21, 2017, 08:51:44 PM
Wait, i noticed that too. If that's true, can you lower the active numbers??

I suggest you try the mod as-is before you ask for the values changed. I think you'll find that even with higher active power drain you'll need to generate far less power than you normally need.
I don't think it would be much useful if you are not using batteries. I personally avoid them like a plague.
When you just use fixed power output generators you don't need batteries, but then you don't need this mod too, you just build another generator.

It is only useful for people who use windturbines,solar panells, batteries, fuses and solar shielding ! :-)


Texel