RimWorld

RimWorld

RT Power Switch
125 Comments
0。0 1 Apr @ 3:31am 
ResearchTabDef need two Tags
<generalTitle></generalTitle>
<generalDescription></generalDescription>
zecorezecron 7 Feb @ 12:47am 
There's a mod called power logic that should allow something like that. You can limit how far along the wires it will scan for batteries.
Darian Stephens 5 Feb @ 8:37pm 
@青丘白狐殿下
Did you ever find a mod which can do that?
I want to do the exact same thing, but haven't found any mods which can.
青丘白狐殿下 5 Nov, 2024 @ 10:34am 
Unless the batteries are centralized and placed in one place, then split into multiple wires (and connected to switches), and each wire is individually set to open/close when the remaining percentage of battery storage is different, this mod can be used normally
Otherwise, this mod will fail due to connecting the entire power grid. I originally intended to create a separate network for a special battery in the nuclear power plant mod to take special care of it, but unfortunately, this mod cannot achieve this
(Translation machine)
Tagaris 10 Jul, 2024 @ 12:35pm 
Thanks for the response. I believe I'm now understanding what's going on. I had presumed that the probing direction would split the network and only consider one side. But it's simply probing the full network of that side (including everything on the opposite site), hence the flickering.

I'm trying to build a setup "if the main battery is empty, don't power up the secondary network". This doesn't seems to work if the secondary network also contains batteries, because when the switch is on they are part of the whole network, regardless of the probing direction.
Ratysz  [author] 10 Jul, 2024 @ 10:48am 
@Tagaris: Seems to me that is exactly what's going on, and it's not "not intended" - it's how RimWorld power networks always worked. I'm not doing anything special there.
Tagaris 10 Jul, 2024 @ 9:04am 
I used this a long time ago, but now I don't grasp the system anymore.

I have a power switch between two networks. Both networks contain batteries. I have it set to observe the western network, turn on at 70% and shut off at 50%.

It turns on at 70%, but then flickers between off and on because it connected to empty batteries in the eastern network. It seems like the batteries on the eastern network do count towards the western network if the switch is on, which is probably not intended.

This flickers:
https://imgur.com/a/ol6PeCL
wolf.of.the.7.seas 8 May, 2024 @ 6:47am 
This is a cool mod only wished I could find something similar for other pipes such as chem fuel and helixien gas
The Bard of Hearts 20 Apr, 2024 @ 1:00pm 
thanks for the mod work!
os 20 Apr, 2024 @ 11:49am 
thank kind sir
Ratysz  [author] 20 Apr, 2024 @ 11:19am 
Updated to 1.5; as always: let me know if anything breaks.
Seta 11 Apr, 2024 @ 6:54pm 
Thank you for your work. it's impossible to have batteries without this mod, can't wait for it to work on 1.5
Ratysz  [author] 8 Feb, 2024 @ 9:02am 
@Bard: Nope, unless it's the only battery in the network.
Bard 7 Feb, 2024 @ 1:38pm 
would this allow swwitching based on the power content of a SPECIFIC battery?
Reithan 13 Sep, 2023 @ 12:41am 
I would love an option to trigger the switch on/off based on available grid power rather than available battery storage. It looks like that number is already being calculated in the HUD, so perhaps just another toggle?

Also, what is the use case for when you set the first number lower than the second?
I understand HOW it works, but I can't think of WHAT to use it for?
mman 4 Jul, 2023 @ 3:29pm 
fuses and this amazing please keep updated moving forward fuses should be in vanilla by now
TacocaT 2 Jun, 2023 @ 8:57pm 
Thanks for this and fuses/breakers, such infuriating gaps in vanilla electricity but you got us covered <3
HAZRAD 19 Apr, 2023 @ 12:29pm 
Nice nice nice!
hottt3 26 Feb, 2023 @ 10:11am 
Thanks!
Ratysz  [author] 26 Feb, 2023 @ 10:01am 
@hottt3: Using this mod you can, for example, have a non-critical power-hungry device automatically disconnect itself when batteries are running low, or set up a backup battery bank that automatically kicks in when it's needed and keeps itself topped up when it's not.
hottt3 25 Feb, 2023 @ 10:46pm 
Thanks for the mod! Please, somebody explain to a newbie, why should I want to use it? What if I don't use it?
Darkhymn 7 Nov, 2022 @ 9:24pm 
That you're still doing this brings me joy, these mods are essential qol improvements that I've been using for a very long time.
Onyx 6 Nov, 2022 @ 10:33am 
Thanks for the update! I've been a long time user of other RT mods but I just stumbled across this one and it looks pretty useful.
Ratysz  [author] 21 Oct, 2022 @ 5:58pm 
Updated for 1.4, let me know if there are any issues.
Izin Mystra 17 Oct, 2022 @ 9:39am 
Just a thought... Timer for the power options?

Dono about you, but i have a workshop that kinda doesn't need power overnight! LOL
Pjosip 21 Feb, 2022 @ 11:37pm 
It would be nifty if there was an option to turn the switch on if it detects no power in probe direction, that way I could set up emergency power storage for my base :D
Ratysz  [author] 14 Nov, 2021 @ 7:42am 
@TTV Darkeyv: Could be that you've changed your power networks' battery capacities in such a way that the settings you had on the switch previously now send it into an endless loop; RimWorld power networks fully combine into a single one when bridged by a switch, pooling their battery capacities. Or the network the switch is looking at has no batteries - not sure though, been a while since I playtested the mod, don't remember all the edge cases.
Domino 14 Nov, 2021 @ 6:25am 
Hmm, this mod was working perfectly for me just a week or two ago (I had a switch set up with an EMI shield from your other mod to turn on at a low power as a backup power source for it and then turn back off after it got back up to 15%), but now with the same exact setup, my switch just rapidly flicks on and off repeatedly after it automatically turns on. Could it be because of one of the battery mods I added? [SYR] Metallic Batteries, specifically. I can't imagine anything else I added would mess with it in such a weird way.
The Bard of Hearts 18 Oct, 2021 @ 12:31am 
I think there's a mod called Power Logic that plays nicely enough with this mod. Could try that.
Ratysz  [author] 17 Oct, 2021 @ 12:18pm 
@LODE: This mod is all about power storage, not power availability, because that's how I like it. I won't change this, so if you want that then you need a different mod. I don't have a recommendation.
LODE 17 Oct, 2021 @ 11:29am 
Is there no way this mod can allow batteries to be disconnected from the network and only turn them on when the network falls below a certain available (not STORED) power level? Why must i monitor "batteries" , when what i really want to do is keep batteries offline until they 1) detect the network's AVAILABLE (not STORED) power and 2) when there is available excess power and my batteries need to charge. I don't understand why the obfuscated storage networks are federated and the available/excess power is ignored
The Bard of Hearts 8 Oct, 2021 @ 2:51am 
Wait... Switches are vanilla aren't they.... >.> ... I've been using this mod since forever ago. My brain just assumed you MADE the switches. LMAO.
The Bard of Hearts 8 Oct, 2021 @ 2:44am 
It only happens on the power switches. So without your mod the issue wouldn't exist. lol. But thats cool.
Ratysz  [author] 8 Oct, 2021 @ 12:52am 
@The Bard of Hearts: No, not a clue. And, again, my mod has nothing to do with this - I'm almost certain this, whatever it is, would continue happen in your game if you removed my mods from it.
The Bard of Hearts 7 Oct, 2021 @ 10:55pm 
Any ideas as to what kind of mod could be making the presence of your switches draw in a conduit over them that doesn't exist?
Ratysz  [author] 5 Oct, 2021 @ 2:43am 
@The Bard of Hearts: I have no idea what you're talking about. Sounds like something not caused by my mod in any way.
The Bard of Hearts 4 Oct, 2021 @ 10:18pm 
For whatever reason, it seems that my switches are being drawn below an imaginary cord. I imagine this is part of how the switch lumps through the hoops to function with the game, but is suppose to be drawn below the conveniently shaped switch. Any way to fix this that you know of? :steamthumbsup:
man_of_belief 28 Aug, 2021 @ 12:49am 
Thanks for making this mode by the way
Ratysz  [author] 27 Aug, 2021 @ 1:24am 
@Thundercraft: I remember playing with both just fine; the way my mod is implemented is very non-intrusive. There will be a behavior conflict if you enable settings from both on the same switch, though.
Thundercraft 26 Aug, 2021 @ 9:48pm 
Q: Is there a potential for conflict with Haplo_X1's PowerSwitch mod? I ask because both mods seem to modify the vanilla Power Switch item (instead of adding a new, separate Switch item that can be built). And both seem to add a settings tab for the same device.
ShiftyLookingCow 8 Aug, 2021 @ 10:42am 
@Mandrid I think I used something like what you're describing in the past; it was called "Parallel Power Grid" or something along those lines (ha, lines).
Seta 7 Aug, 2021 @ 4:48pm 
It was the wrong direction, sorry for this, and thank you!
Ratysz  [author] 7 Aug, 2021 @ 3:59pm 
@Seta: Did you correctly configure the probe direction?
Seta 7 Aug, 2021 @ 2:43pm 
Hello, thank you so much for this mod, but sadly only the shutdown trigger is working, not the turn on, i put 70% to turn on, 98% to shut off. Btw im using 1.3
Ratysz  [author] 30 Jul, 2021 @ 12:34am 
@Mandrid: I'm fairly sure I've seen something like that somewhere... At the very least, it should be doable. But, unfortunately, I indeed have neither the time nor the desire to work on that myself.
Mandrid 29 Jul, 2021 @ 10:05pm 
Hey RT, I love your mods! Always making the game easier and more functional!

Could I make a mod request? I hope it is a simple one...

Is there a way to cross power lines without having them connect? Kind of a power junction, where a north wire can go south, and a west wire can go east, but they do not connect, letting you pass wires over each other without connecting the networks. I would love the poop out of a mod like that!

Wish I could do what you do. >< Thanks for being great, RT, even if you say no or don't have time. ;-) We love ya dude!
Proxyer 19 Jul, 2021 @ 7:10am 
Nice!! Thank you!
Ratysz  [author] 19 Jul, 2021 @ 5:31am 
Updated, now compatible with RimWorld 1.3.

As always, let me know of any issues.
Damon_Vi 21 Feb, 2021 @ 11:17am 
yep, that's the one. love that one. should be added to the base game since it's such a simple yet functional add.
fredericktpjohnstone 9 Jan, 2021 @ 8:22am 
@Damon_Vi @afterthought.btw I think the mod you guys want/are thinking of is Backup Power https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2084493662