Ludeon Forums

RimWorld => Releases => Mods => Outdated => Topic started by: Texel on February 21, 2017, 04:22:08 PM

Title: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on February 21, 2017, 04:22:08 PM

Name: RePower - Machine Idling and Power Rebalancing (http://steamcommunity.com/sharedfiles/filedetails/?id=865000054)

(http://cloud-3.steamusercontent.com/ugc/171537921635977985/6EFB7C372A4E2CFEFEDF12B19A38BCE5F074D8C7/)(http://cloud-3.steamusercontent.com/ugc/171537921635984740/3E2F6758D4A4FB6F9CE81FAB00FCE936BDDB61A0/)

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 (https://ludeon.com/forums/index.php?topic=30734.msg314232#msg314232)


STEAM WORKSHOP (http://steamcommunity.com/sharedfiles/filedetails/?id=865000054)
NON-STEAM DOWNLOAD (https://drive.google.com/uc?export=download&id=0B8LJdB0n23A6U1RMQkJOSmJ2NE0)

Steam Profile: Texel (http://steamcommunity.com/id/Texel-)

(http://i.imgur.com/9L4f8u7.png) (https://ludeon.com/forums/index.php?topic=28066)

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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: drakulux on February 21, 2017, 05:06:04 PM
Wooo hooo!!!!! tnx
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Seiryuu on February 21, 2017, 05:39:49 PM
Exactly what my 50ish colonists' colony needed! Thanks!
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Igan on February 21, 2017, 06:44:56 PM
This along the minimap is the thing that I most miss about CCL.

Thank you!
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on February 21, 2017, 06:53:41 PM
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 :)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Seiryuu on February 21, 2017, 08:51:44 PM
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??
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 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?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on February 22, 2017, 05:41:50 AM
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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Canute on February 22, 2017, 07:09:22 AM
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 ! :-)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: CathDubh on February 22, 2017, 01:40:24 PM
New colony only?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on February 22, 2017, 02:18:00 PM
Quote from: CathDubh on February 22, 2017, 01:40:24 PM
New colony only?

Works with saves, and doesn't cause any issue if removed.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: faltonico on February 22, 2017, 04:47:33 PM
Quote from: Canute on February 22, 2017, 07:09:22 AM
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 ! :-)
I would find it very useful though, if the base consumption values of all the things remained the same, because i do have to turn off some stuff that i'm not using to save power.
Would you consider adding the core buildings into the xml file as well like you did with the EPOE ones?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: jrobinson3k1 on February 22, 2017, 07:31:47 PM
Is there a way to auto-expand this mod to affect other mod buildings? For example, things that don't have a pre-defined idle/active power consumption default to 10W idle and 4x normal usage watts.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: qxevtnulu on February 22, 2017, 09:38:06 PM
Error report: It cannot unzip the file in the link of "NON-STEAM DOWNLOAD".
Thanks. Your idea is great.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on February 22, 2017, 10:45:44 PM
Quote from: qxevtnulu on February 22, 2017, 09:38:06 PM
Error report: It cannot unzip the file in the link of "NON-STEAM DOWNLOAD".
Thanks. Your idea is great.

Uh-Oh, it should be an LMZA Compressed .zip. Have you tried opening it in 7zip? (Does anyone else have this problem?)

Quote from: jrobinson3k1 on February 22, 2017, 07:31:47 PM
Is there a way to auto-expand this mod to affect other mod buildings? For example, things that don't have a pre-defined idle/active power consumption default to 10W idle and 4x normal usage watts.

This is a tricky one. Not all worktables consume power, so if I search out all Building_Worktable's I wouldn't necessarily find them all, then the structural issue the way I modify the power level on a table hides the original power values, making it a tad trickier.

Again, if there are any mod benches/etc you'd like to see support on, it's pretty easy to have it look for other benches and I'd happily add other mod support if anyone has recommendations.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: drakulux on February 23, 2017, 03:42:31 AM
Quote from: Texel on February 22, 2017, 10:45:44 PM
Quote from: qxevtnulu on February 22, 2017, 09:38:06 PM
Error report: It cannot unzip the file in the link of "NON-STEAM DOWNLOAD".
Thanks. Your idea is great.

Uh-Oh, it should be an LMZA Compressed .zip. Have you tried opening it in 7zip? (Does anyone else have this problem?)

Quote from: jrobinson3k1 on February 22, 2017, 07:31:47 PM
Is there a way to auto-expand this mod to affect other mod buildings? For example, things that don't have a pre-defined idle/active power consumption default to 10W idle and 4x normal usage watts.

This is a tricky one. Not all worktables consume power, so if I search out all Building_Worktable's I wouldn't necessarily find them all, then the structural issue the way I modify the power level on a table hides the original power values, making it a tad trickier.

Again, if there are any mod benches/etc you'd like to see support on, it's pretty easy to have it look for other benches and I'd happily add other mod support if anyone has recommendations.

As i generally mod my modded rimworld for mods to work together what about searching for building_worktable that have electricity consumption value, if it does a function to replace the value with you own values?  I do coding too but not sure how much you can achieve here, i am on the web development area.

Basically if no power consumption def that n to  mod doesnt affect the table, also problem is balance too, not all worktables use equal values hand have to be fine tuned manually with logic behind it, hopefully this is something mod authors can add to their mods where if a player doesnt have this mod it can use a default value, but if this mod is detected then it uses different values set by the author?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on February 23, 2017, 05:36:55 AM
Quote from: Texel on February 22, 2017, 10:45:44 PM
Quote from: qxevtnulu on February 22, 2017, 09:38:06 PM
Error report: It cannot unzip the file in the link of "NON-STEAM DOWNLOAD".
Thanks. Your idea is great.

Uh-Oh, it should be an LMZA Compressed .zip. Have you tried opening it in 7zip? (Does anyone else have this problem?)

I have the same problem using WinRar .. I will try 7zip ..

===============

7zip did the Trick :) Thanx
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: ruyan on February 23, 2017, 05:52:16 AM
Here's my patch for Rah's Bionics and Surgery Expansion (https://ludeon.com/forums/index.php?topic=28731.0), formerly known as EPOE Hardcore.
Thanks for the mod, great idea!

*edit*
So I had some time on my hands and did some more "patches" for the pack I'm using... For simplicity I uploaded them to Github here (https://github.com/ruyanve/Rimworld-RePower/tree/master). If anyone has any wishes what mods to support, let me know, I'm on a run ;-)
So far I added:
- Vegetable Garden
- Electric Stonecutting
- RBSE
- Deep Core Drill
- DTC Weapons

[attachment deleted by admin due to age]
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Trigon on February 27, 2017, 02:44:37 AM
I've played my first serious colony with this mod and I've gotta say. I actually really enjoy this mod. It's such a simple thing but it's made power management more enjoyable.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on March 01, 2017, 03:59:20 PM
Quote from: ruyan on February 23, 2017, 05:52:16 AM
Here's my patch for Rah's Bionics and Surgery Expansion (https://ludeon.com/forums/index.php?topic=28731.0), formerly known as EPOE Hardcore.
Thanks for the mod, great idea!

*edit*
So I had some time on my hands and did some more "patches" for the pack I'm using... For simplicity I uploaded them to Github here (https://github.com/ruyanve/Rimworld-RePower/tree/master). If anyone has any wishes what mods to support, let me know, I'm on a run ;-)
So far I added:
- Vegetable Garden
- Electric Stonecutting
- RBSE
- Deep Core Drill
- DTC Weapons

Would it be alright to include your support files with the main download/steam?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: ruyan on March 02, 2017, 04:38:08 AM
That's what I made them for! :-)
I am not sure about the power consumption balancing, but I tried to make them fit with other workbenches and stuff.

*edit* Added support for EPOE2, TiberiumRim and Misc_Robots... will add more over time
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Codexehow on March 02, 2017, 09:07:51 PM
Really nice mod, thanks.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Der Failer on March 03, 2017, 08:46:56 PM
Quote from: ruyan on March 02, 2017, 04:38:08 AM
That's what I made them for! :-)
I am not sure about the power consumption balancing, but I tried to make them fit with other workbenches and stuff.

*edit* Added support for EPOE2, TiberiumRim and Misc_Robots... will add more over time
Thanks for proving these files, i spotted one little flaw though. The Tiberium Research Bench is set as a <poweredWorkbench> when is should be <poweredReservable>.

@Texel Big thanks for bringing back my favorite CCL feature (assuming you actually got if from there). :)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: jpinard on March 04, 2017, 12:04:22 AM
Quote from: Texel on February 22, 2017, 05:41:50 AM
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.

Cool thanks!
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Wishmaster on March 06, 2017, 05:07:26 PM
I really like the mod.
I was tired to see my machines consuming power at night for nothing, had to use a Powerswitch and do some micromangement to save power, and micromangement is bad.

If have a suggestion though.
For making compatibility easier, why would not dynamically assign power consumption rate, based on how much they basically consume ?
Then you won't have to implement specific compatibility for every mod.

Also what do you think about applying such a rework with the nutrient paste dispenser ? It creates the same issue as other machines.
But I know It's a difficult case since it's an instant use, unlike work benches.

I have made a mod that allows to force the NPD to dispense meals.
But for balance purposes, it will draw a certain amount of power from network on every produced meals (15wd).

The other solution could be to make it "active" for a certain time after its last use. While active, it will consume more power.

Please let me know what do you think about this.

Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Awe on March 11, 2017, 09:01:49 AM
Many thanks.
A bit easier life at early and mid colony, while mature colonies start to consume a lot of power. Imho weapon and component benches consumption is too high.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on March 11, 2017, 02:52:41 PM
Quote from: Awe on March 11, 2017, 09:01:49 AM
Many thanks.
A bit easier life at early and mid colony, while mature colonies start to consume a lot of power. Imho weapon and component benches consumption is too high.

It's all balanced around a "4x costs", so in theory, if your using more than 1/4th of the time, it's going to be costlier than vanilla. The vast majority of crafting station's aren't used like that, but you may be right, making a single component will drain out a whole battery and this may be too much. What would be more reasonable? (Given how late game component making is, is it really too crippling?)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Awe on March 11, 2017, 08:57:00 PM
Quote from: Texel on March 11, 2017, 02:52:41 PM
Quote from: Awe on March 11, 2017, 09:01:49 AM
Many thanks.
A bit easier life at early and mid colony, while mature colonies start to consume a lot of power. Imho weapon and component benches consumption is too high.

It's all balanced around a "4x costs", so in theory, if your using more than 1/4th of the time, it's going to be costlier than vanilla. The vast majority of crafting station's aren't used like that, but you may be right, making a single component will drain out a whole battery and this may be too much. What would be more reasonable? (Given how late game component making is, is it really too crippling?)

At my last game 2x component benches works from early morning to late evening a lot of days in row. Need a hundreds components to make some weapons, implants and, finally, ship to 20 mans colony.  ::) Not sure about others, but im rarely build a big solar/wind arrays if i have a 3 geothermals near, like in this game.

So, about running cost - lowering to 3x would be nice. :)

PS Also, light edition without increased running cost nice too. All this dances around switching unnecessary equipment only for power saving. So no point at increasing running cost. You can do zero power cost at unused equipment and standard power cost at used, just manually. But noone want to do such amounts of micromanagement and peoples come here to look for reasonable ways of resolving this problem. (without ruining balance)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Wishmaster on March 12, 2017, 02:42:54 PM
This seems to conflict with AllowTool for some reasons: game will crash on startup with both mods loaded, no matter in which order.

edit: Windows 7
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 死亡领主鸩毒 on March 12, 2017, 02:52:47 PM
Quote from: Wishmaster on March 12, 2017, 02:42:54 PM
This seems to conflict with AllowTool for some reasons: game will crash on startup with both mods loaded, no matter in which order.


U sure ? im using this two together too and dont have any crash problems so far.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Wishmaster on March 12, 2017, 04:02:07 PM
Absolutely.
Even with only those two mods loaded plus HugsList. The games closes, no message, no restart just crash.
I have the latest version of both.

More relevant information: I'm under Windows 7, not using steam.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: 死亡领主鸩毒 on March 12, 2017, 05:17:29 PM
Quote from: Wishmaster on March 12, 2017, 04:02:07 PM
Absolutely.
Even with only those two mods loaded plus HugsList. The games closes, no message, no restart just crash.
I have the latest version of both.

More relevant information: I'm under Windows 7, not using steam.

Well thats odd then im running with 117 mods enabled currently and i never saw such crash. But best luck then fixing it.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: jimthenoob on March 12, 2017, 05:58:58 PM
I'm pretty new to this, but how hard would it be to mod something like the improvised turret to take more energy while firing as apposed to just scanning for targets. If this mod had that functionality I would be all over it.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: oreganor on March 13, 2017, 07:04:52 AM
Texel, attached are the .xml files that add support for the workbenches of the following Mods (All are balanced around 3x cost):

Mending (https://ludeon.com/forums/index.php?topic=22894.0):
- Mending Table
- Recycle Table

Remote Explosives (https://ludeon.com/forums/index.php?topic=17285.0):
- Explosives Workbench
- I left Remote Detonation Control out of Repower because, even if it's accessed as a workbench, its use is puntual and thus the requirement of manually depowering it if you want to save power makes a lot of sense as a kind of "pre-arming" sequence... Such as you have to do IRL when dealing with ANY kind of remote triggering of live explosives.


If any of you want to start using them ASAP, without waiting for Texel authorization/incorporation/tweaking... Just drop them into the "Defs" folder of this mod.

[attachment deleted by admin due to age]
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on March 13, 2017, 09:30:37 AM
Quote from: Wishmaster on March 12, 2017, 04:02:07 PM
Absolutely.
Even with only those two mods loaded plus HugsList. The games closes, no message, no restart just crash.
I have the latest version of both.

More relevant information: I'm under Windows 7, not using steam.

I do to .. no problems .. I have between 120-150 active mods.
In my mod-order the allow tool is before the repower mod.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: leestriter on March 13, 2017, 04:56:09 PM
For some reason I can't get the zip file to extract. I suppose that probably isn't your fault but I was excited to use the mod. I've never had this issue I use 7zip.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Tgr on March 13, 2017, 05:02:45 PM
I think a dynamic version, that's 50% power of all items which require power while in use, and 150% power when in use, would still be balanced, and mod-friendly.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: ZLF on March 28, 2017, 04:05:12 AM
The mod is great and very useful for me.
But I need some help when I add a def xml to support the Lockable Doors mod. The lockable autodoor is always idle, never become active. Is there any solution?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Asteru on April 17, 2017, 01:40:54 AM
i'm messing around adding some other things to work with repower, and had a question to make sure i understand and do it properly. For things like turrets and SAL Autocrafters, which don't have someone interact, and aren't workbenches, do i simply just make both poweredWorkbench and poweredReservable to false since they're neither. I'm not sure if it requires one of them to be true to function properly, or if thats a legit option. Would that even work and have repower function with them having an idle power with the low power i'm setting and use the high power when they actually go active?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Texel on April 27, 2017, 12:35:16 AM
Quote from: rwurgley on April 17, 2017, 01:40:54 AM
i'm messing around adding some other things to work with repower, and had a question to make sure i understand and do it properly. For things like turrets and SAL Autocrafters, which don't have someone interact, and aren't workbenches, do i simply just make both poweredWorkbench and poweredReservable to false since they're neither. I'm not sure if it requires one of them to be true to function properly, or if thats a legit option. Would that even work and have repower function with them having an idle power with the low power i'm setting and use the high power when they actually go active?

There isn't really a logic for which to determine when a turret is "idle" that I could determine, nor do I know enough about how SAL autocrafters work :(
If you set both to false, it'll just override that objects power usage to the idle at all times. Sorry about that.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: fmauNeko on May 29, 2017, 05:14:01 PM
Hello,
I've been looking into patching this to A17, so I quickly threw the joined patch together, I can get the mod to compile and load without error, but haven't had time to test it.
Feel free to use it if it works, or laugh at me if I did something stupid !

[attachment deleted by admin due to age]
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Juujika on June 04, 2017, 11:44:00 PM
Quote from: fmauNeko on May 29, 2017, 05:14:01 PM
Hello,
I've been looking into patching this to A17, so I quickly threw the joined patch together, I can get the mod to compile and load without error, but haven't had time to test it.
Feel free to use it if it works, or laugh at me if I did something stupid !
Thank You, i will try it at this week. Still have to wait couple mods to updated before i can start a new game.
Its so annoying to click power off every time when they stop using devices and i dont want to spam batteries etc.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: drakulux on June 12, 2017, 07:26:22 PM
Quote from: fmauNeko on May 29, 2017, 05:14:01 PM
Hello,
I've been looking into patching this to A17, so I quickly threw the joined patch together, I can get the mod to compile and load without error, but haven't had time to test it.
Feel free to use it if it works, or laugh at me if I did something stupid !
How do you open/use the .patch file?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: drakulux on June 14, 2017, 05:51:12 AM
Not spamming, just really want this mod. Also If any modders can say what updating this mod would entail, I could attempt to do it myself (as long as it is just correcting vars and stuff not writing new code)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: hiepbg on June 14, 2017, 06:51:32 AM
Quote from: drakulux on June 14, 2017, 05:51:12 AM
Not spamming, just really want this mod. Also If any modders can say what updating this mod would entail, I could attempt to do it myself (as long as it is just correcting vars and stuff not writing new code)

Can you post the update version? I want to use it :D
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on June 19, 2017, 04:20:41 PM
I got it compiled too and on first glance it seems to be working.

For those who don't know what to do:
Basically the .patch file from this (https://ludeon.com/forums/index.php?topic=30734.msg336861#msg336861) post by fmauNeko needs to be applied to the source code files of this mod via git apply. (git apply didn't really want to work for me this time so I just did it manually with some Notepad++ magic)
You can open the .patch in a text editor of your choice and it just tells you what lines to change where. Basically '-' means line deleted '+' means added. '@@'-lines give you which lines and the ones without '-' or '+' are just for reference.

Once you've changed that you only have to
c:\Windows\Microsoft.NET\Framework\v4.0.30319\csc.exe /t:library /out:RePower.dll /r:0Harmony.dll,Assembly-CSharp.dll,HugsLib.dll,UnityEngine.dll RePowerDef.cs RePower.cs
to compile.

Now copy the created RePower.dll to the Assemblies folder and the mod to the Mods folder of Rimworld.

Edit 1: Minor typos
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on June 22, 2017, 12:50:23 PM
If it is still working without problems, how about sharing a little ?
:-)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: wwWraith on June 22, 2017, 08:07:41 PM
drakulux, I've tried your dll but without success:
ReflectionTypeLoadException getting types in assembly RePower: System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded.
  at (wrapper managed-to-native) System.Reflection.Assembly:GetTypes (bool)
  at System.Reflection.Assembly.GetTypes () [0x00000] in <filename unknown>:0
  at Verse.ModAssemblyHandler.AssemblyIsUsable (System.Reflection.Assembly asm) [0x00000] in <filename unknown>:0

Loader exceptions:
   => System.TypeLoadException: Could not load type 'HugsLib.ModBase' from assembly 'HugsLib, Version=0.16.0.0, Culture=neutral, PublicKeyToken=null'.

Looks like it tries to use HugsLib from A16, but I use its last A17 version of course.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on June 26, 2017, 04:22:12 PM
I am quite hesitant to upload this because I basicly did none of the work, but I guess for the sake of getting this mod to the none-techies, I will leave this here.
Remember that the actual work was done by the mod author Texel (https://ludeon.com/forums/index.php?action=profile;u=27281) and fmauNeko (https://ludeon.com/forums/index.php?action=profile;u=76208) by writing the patch.
If any of you two wants this gone, I will of course immediately comply.

[attachment deleted by admin due to age]
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: JustALittleCrazyTalk on June 26, 2017, 06:50:25 PM
Quote from: be_cracked on June 26, 2017, 04:22:12 PM
I am quite hesitant to upload this because I basicly did none of the work, but I guess for the sake of getting this mod to the none-techies, I will leave this here.
Remember that the actual work was done by the mod author Texel (https://ludeon.com/forums/index.php?action=profile;u=27281) and fmauNeko (https://ludeon.com/forums/index.php?action=profile;u=76208) by writing the patch.
If any of you two wants this gone, I will of course immediately comply.

And the techies that aren't using Windows (seriously why do Windows programmers keep using .NET instead of mono?), thanks.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on June 26, 2017, 07:12:29 PM
Quote from: JustALittleCrazyTalk on June 26, 2017, 06:50:25 PM
Quote from: be_cracked on June 26, 2017, 04:22:12 PM
I am quite hesitant to upload this because I basicly did none of the work, but I guess for the sake of getting this mod to the none-techies, I will leave this here.
Remember that the actual work was done by the mod author Texel (https://ludeon.com/forums/index.php?action=profile;u=27281) and fmauNeko (https://ludeon.com/forums/index.php?action=profile;u=76208) by writing the patch.
If any of you two wants this gone, I will of course immediately comply.

And the techies that aren't using Windows (seriously why do Windows programmers keep using .NET instead of mono?), thanks.

Well, .NET is the native way to go for Windows. But .NET-Core is like the official version of Mono and supposed to become the standard, so this should get better soon.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on June 27, 2017, 01:02:36 PM
Well, there are techies and there are techies.

Thank you be_cracked

Texel and fmauNeko included.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: vaguiners on July 03, 2017, 07:47:32 PM
someone pls post the compiled mod for a17
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: faltonico on July 04, 2017, 03:16:36 AM
THANKS A LOT TO be_cracked!!
Now I don't have to worry about flicking all of my benches when not in use! I set them all to 0 zero idle power consumption and base game power consumption when working, I can have autoflickable benches instead power rebalancing!
Of course also thanks to the author, for releasing his code, very appreciated indeed!.

You should all be turning off your electric appliances when not in use IRL!
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on July 05, 2017, 12:53:06 PM
Quote from: vaguiners on July 03, 2017, 07:47:32 PM
someone pls post the compiled mod for a17

I did. (https://ludeon.com/forums/index.php?topic=30734.msg347058#msg347058)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on July 05, 2017, 12:54:33 PM
Quote from: faltonico on July 04, 2017, 03:16:36 AM
THANKS A LOT TO be_cracked!!
Now I don't have to worry about flicking all of my benches when not in use! I set them all to 0 zero idle power consumption and base game power consumption when working, I can have autoflickable benches instead power rebalancing!
Of course also thanks to the author, for releasing his code, very appreciated indeed!.

You should all be turning off your electric appliances when not in use IRL!

Again I'd like to remind you that Texel (https://ludeon.com/forums/index.php?action=profile;u=27281) and fmauNeko (https://ludeon.com/forums/index.php?action=profile;u=76208) are the ones you should thank!
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: faltonico on July 05, 2017, 05:10:31 PM
Quote from: be_cracked on July 05, 2017, 12:54:33 PM
Quote from: faltonico on July 04, 2017, 03:16:36 AM
THANKS A LOT TO be_cracked!!
Now I don't have to worry about flicking all of my benches when not in use! I set them all to 0 zero idle power consumption and base game power consumption when working, I can have autoflickable benches instead power rebalancing!
Of course also thanks to the author, for releasing his code, very appreciated indeed!.

You should all be turning off your electric appliances when not in use IRL!

Again I'd like to remind you that Texel (https://ludeon.com/forums/index.php?action=profile;u=27281) and fmauNeko (https://ludeon.com/forums/index.php?action=profile;u=76208) are the ones you should thank!
Well thanks a lot to Texel (https://ludeon.com/forums/index.php?action=profile;u=27281) and fmauNeko (https://ludeon.com/forums/index.php?action=profile;u=76208)!
But without you i wouldn't have been able to compile it, so thanks to you too xD
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on July 06, 2017, 10:30:40 AM
I'm glad you managed to compile it yourself. It's always good to have more people understand this stuff^^

And I just want to make sure it does not look like I want to steal anybodies credit, because such stuff is really low.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: faltonico on July 08, 2017, 05:54:45 PM
While testing another mod i bumped into this:
StatRequest for null thing.
Followed immediately by:
Exception in Tick (pawn=Sulle, job=WaitMaintainPosture, CurToil=3): System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.StatWorker.GetBaseValueFor (Verse.BuildableDef) <0x0001d>
at RimWorld.StatWorker.GetValueUnfinalized (RimWorld.StatRequest,bool) <0x00022>
at RimWorld.StatWorker.GetValue (RimWorld.StatRequest,bool) <0x0003d>
at RimWorld.StatWorker.GetValue (Verse.Thing,bool) <0x00042>
at RimWorld.StatExtension.GetStatValue (Verse.Thing,RimWorld.StatDef,bool) <0x0002b>
at RePower.repowerHook/JobDriver_WatchBuilding_WatchTickAction_Patch._WatchTickAction (RimWorld.JobDriver_WatchBuilding) <0x000c8>
at (wrapper dynamic-method) RimWorld.JobDriver_WatchBuilding.WatchTickAction_Patch1 (object) <0x000ea>
at RimWorld.JobDriver_PlayHorseshoes.WatchTickAction () <0x00096>
at RimWorld.JobDriver_WatchBuilding/<MakeNewToils>c__Iterator1D.<>m__61 () <0x00017>
at Verse.AI.JobDriver.DriverTick () <0x002a3>
lastJobGiver=, curJob.def=WaitMaintainPosture, curDriver=Verse.AI.JobDriver_WaitMaintainPosture

When one of my pawns was using a horseshoe pin. Is it trying to check if it has current? xD

I don't know if it could happen in the original unmodified mod though.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: LiteEmUp on July 25, 2017, 01:31:03 PM
so anyone likely was able t oconvert this from a16 to a17?? care to share pls!! lol
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on July 25, 2017, 01:39:33 PM
Quote from: be_cracked on July 05, 2017, 12:53:06 PM
Quote from: vaguiners on July 03, 2017, 07:47:32 PM
someone pls post the compiled mod for a17

I did. (https://ludeon.com/forums/index.php?topic=30734.msg347058#msg347058)

theres the link ..
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: alex-7902 on October 01, 2017, 05:56:49 AM
Quote from: SpaceDorf on July 25, 2017, 01:39:33 PM
Quote from: be_cracked on July 05, 2017, 12:53:06 PM
Quote from: vaguiners on July 03, 2017, 07:47:32 PM
someone pls post the compiled mod for a17

I did. (https://ludeon.com/forums/index.php?topic=30734.msg347058#msg347058)

theres the link ..


I have one instead of the link [attachment deleted by admin due to age]?You can throw off the converted link.
You can throw off the converted link. To not moderated the moderator. Sry for english say thanks to
Google translator
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on October 01, 2017, 06:23:58 AM
Yeap.

That happened, the Forum Server was running low on storage, so Ludeon deleted some older Attachments ..
This mod is not the only one that suffered.

Let me check my Notes ... there it is

[attachment deleted by admin: too old]
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: alex-7902 on October 01, 2017, 08:30:13 AM
I downloaded RePower A17 On the Yandex disk https://yadi.sk/d/qNSY_hM43NNAxz
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Ruptga on November 18, 2017, 06:10:35 PM
Is there any chance a wizard could update this again, or make their own version?  It's pretty great.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: be_cracked on November 18, 2017, 07:58:16 PM
Quote from: Ruptga on November 18, 2017, 06:10:35 PM
Is there any chance a wizard could update this again, or make their own version?  It's pretty great.

I agree. Sadly I do not have the time right now to do it.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: notfood on November 19, 2017, 04:57:03 AM
mmmm this implementation looks awful registerSpecialPowerTrader/registerWorkTable hardcoded is no good.

I'll see if I can pull out the HardcoreSK implementation.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Ruptga on November 19, 2017, 09:50:15 AM
Quote from: notfood on November 19, 2017, 04:57:03 AM
mmmm this implementation looks awful registerSpecialPowerTrader/registerWorkTable hardcoded is no good.

I'll see if I can pull out the HardcoreSK implementation.
I don't know what that means, but it sounds awesome. <3
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on November 20, 2017, 03:58:44 AM
Quote from: notfood on November 19, 2017, 04:57:03 AM
mmmm this implementation looks awful registerSpecialPowerTrader/registerWorkTable hardcoded is no good.

I'll see if I can pull out the HardcoreSK implementation.

Yes Please  ;)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: vaguiners on November 21, 2017, 03:17:32 AM
csc RePower.cs /r:UnityEngine.dll /r:System.dll /r:UnityEngine.dll /r:0Harmony.dll /r:HugsLib.dll /r:Assembly-CSharp.dl
l
Microsoft (R) Visual C# Compiler version 1.3.1.60616
Copyright (C) Microsoft Corporation. All rights reserved.

RePower.cs(60,28): error CS1061: 'Pawn_DrawTracker' does not contain a definition for 'rotator' and no extension method 'rotator' accepting a first argument of type 'Pawn_DrawTracker' could be found (are you missing a using directive or an assembly reference?)
RePower.cs(163,27): error CS0246: The type or namespace name 'RePowerDef' could not be found (are you missing a using directive or an assembly reference?)
RePower.cs(314,41): error CS1061: 'ReservationManager' does not contain a definition for 'IsReserved' and no extension method 'IsReserved' accepting a first argument of type 'ReservationManager' could be found (are you missing a using directive or an assembly reference?)
RePower.cs(345,50): error CS1061: 'ReservationManager' does not contain a definition for 'IsReserved' and no extension method 'IsReserved' accepting a first argument of type 'ReservationManager' could be found (are you missing a using directive or an assembly reference?)
RePower.cs(361,54): error CS1061: 'ReservationManager' does not contain a definition for 'IsReserved' and no extension method 'IsReserved' accepting a first argument of type 'ReservationManager' could be found (are you missing a using directive or an assembly reference?)
error CS5001: Program does not contain a static 'Main' method suitable for an entry point
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Jastro on December 12, 2017, 11:11:45 PM
B18 unofficial update
Steam (http://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=1230058694)
Dropbox (https://www.dropbox.com/s/ypt2dxwkxqqwxug/RePower%20B18.rar?dl=0)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Shotgunfrenzy on December 13, 2017, 04:30:38 AM
Thank You!!!
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: neozargos on December 17, 2017, 09:52:57 AM
We need THIS for B18
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: SpaceDorf on December 18, 2017, 04:38:54 AM
Quote from: Jastro on December 12, 2017, 11:11:45 PM
B18 unofficial update
Steam (http://steamcommunity.com/sharedfiles/filedetails/?edit=true&id=1230058694)
Dropbox (https://www.dropbox.com/s/ypt2dxwkxqqwxug/RePower%20B18.rar?dl=0)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: lperkins2 on January 04, 2018, 04:45:05 PM
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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Ristelle on January 06, 2018, 09:32:15 AM
Source for Jastro's unofficial update: Box (https://app.box.com/s/9o1mcela6k1bhyra53yl8raozx0fey3s)

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 (https://app.box.com/s/5g3ml5j63wmbq21otaqciobo00s57vn8)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Exende on January 08, 2018, 09:28:38 PM
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
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: PreDiabetic on January 10, 2018, 05:04:35 AM
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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Fatsack on March 04, 2018, 12:46:02 AM
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()
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Harry_Dicks on March 04, 2018, 09:37:22 AM
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?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Fatsack on March 04, 2018, 05:17:26 PM
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.
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: BulletDelivery on March 15, 2018, 09:54:13 PM
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 (https://www.dropbox.com/s/n2tn3t4nos74txl/RePower.dll?dl=0)
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Telarin on March 19, 2018, 07:42:05 AM
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?
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: vaguiners on July 31, 2018, 04:00:14 AM
1.0 pls
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: NubsPixel on September 04, 2018, 07:42:10 AM
Unofficial Update for B19:
Steam Workshop (https://steamcommunity.com/sharedfiles/filedetails/?id=1503118650)

Or see attachments.

Note:
Will remove upon request by original modder.

[attachment deleted due to age]
Title: Re: [A16] Repower - Machine Idling and Power Rebalancing
Post by: Jiro on November 11, 2018, 12:22:37 PM
Will the b19 unofficial work okay with 1.0?