[1.2] PowerSwitch

Started by Haplo, April 10, 2014, 03:31:29 PM

Previous topic - Next topic

Maladapted

#285
Quote from: harpo99999 on September 03, 2017, 03:12:04 AM
Quote from: Maladapted on September 03, 2017, 02:05:54 AM
Anyone got the zip for powerswitch 16.2? The nexus downloads don't work.
did you try the yellowish text just above the nexus link? (this starts a download for me
Yeah, all I get is a small white box with a red frame and gray top that says "An error occurred". Happens logged in, logged out, Chrome, Firefox, with and without ad blockers and on different mods. I assumed it was Nexus having a problem.

Edit: Turns out it's a known issue with nexus and old downloads. You have to remove the "s" from "https"

NemesisN

There is literally no explanation how this works

So I place my power switch and connect it with conduct circuit to a lamp, I select auto detection switch when someone walks in, but the light does not turn off it stays turned on, so I go ahead and turn off the lamp manually and then my colonist walks in and the lamp does not turn on. So wtf am I suppose to do ?

The timer switch I select the timer option but that is it nothing happens during the default time set and I can't set the timer to time I want there is no option but clicking and selecting different types of automatic switch and nothing literally happens
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

Haplo

For your problem with the lamp:
You need to add a single power conduit to the switch and connect the lamp to the line, not to the switch itself.
If you watch the connection when the switch turns off, you'll see that it automatically reconnects otherwise to the next available power conduit. So you always need a setup for the switch like this:  - - x-   Lamp
The same for the timer most likely. But it turns only on/off on the hour set. Not in between. So you may have to wait a day :)

NemesisN

Quote from: Haplo on October 12, 2017, 11:11:25 AM
For your problem with the lamp:
You need to add a single power conduit to the switch and connect the lamp to the line, not to the switch itself.
If you watch the connection when the switch turns off, you'll see that it automatically reconnects otherwise to the next available power conduit. So you always need a setup for the switch like this:  - - x-   Lamp

The same for the timer most likely. But it turns only on/off on the hour set. Not in between. So you may have to wait a day :)

can you post a screenshot of your switch connected to a lamp or something and connected to a power source that will trigger automatic switch ON when colonist enters the room and switch OFF when colonist leaves the room

Because here is what I figured out so far....the colonist or enemy needs to be near the switch not the object you want to be automatically turned ON in order for the switch to react. That means I need to place a switch behind every single lamp and try to connect them with conduit without them touching other conduit and that is very difficult when you have room to room (2 or more rooms next to each other) especially in prison where I wan't the power turned on in cell just when there is a prisoner in it...its hard for me to manually just keep switching on and off each cell once I get a prisoner in it.

Other thing is that you have a default set radius for the switch to active when the colonist is in that set radius and I can't configure it myself. Only what I can configure is the timer one. That means if the default radius is 100 the colonist that just walks around the park near a 100 radius from the switch will activate lights in a room where nobody is in and waste my power.
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

Haplo

The range should be: Inside a room: The full room; outside: 7 cells

NemesisN

Quote from: Haplo on October 13, 2017, 02:20:18 PM
The range should be: Inside a room: The full room; outside: 7 cells

so the switch needs to be inside the room ?
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

wedekit

Quote from: NemesisN on October 13, 2017, 09:20:43 AM
Can you post a screenshot of your switch connected to a lamp or something and connected to a power source that will trigger automatic switch ON when colonist enters the room and switch OFF when colonist leaves the room

Because here is what I figured out so far....the colonist or enemy needs to be near the switch not the object you want to be automatically turned ON in order for the switch to react. That means I need to place a switch behind every single lamp and try to connect them with conduit without them touching other conduit and that is very difficult when you have room to room (2 or more rooms next to each other) especially in prison where I wan't the power turned on in cell just when there is a prisoner in it...its hard for me to manually just keep switching on and off each cell once I get a prisoner in it.

Other thing is that you have a default set radius for the switch to active when the colonist is in that set radius and I can't configure it myself. Only what I can configure is the timer one. That means if the default radius is 100 the colonist that just walks around the park near a 100 radius from the switch will activate lights in a room where nobody is in and waste my power.

Here, I was in a position to post a screenshot of how I have it set up for both room and turrets.



So for all the bedrooms (at the top of the pic) I have them all set to the motion detection (green pawn button). As you can see, they all have one tile of power conduit on the other side of the power switch, all unattached to anything but the power switch. The lamps (or whatever you want) have to be attached to that little slither of power conduit and not to the other side of it. Otherwise it will just stay powered. 

As you can see in my pawn Mie's room, the power switch "opens up" and draws a blue line (power current). It'll also close off again automatically (without needing a pawn to flick it) when she wakes up and leaves. I use this same format for setting up my hospital room. Lights, TV, and vitals machines are all attached to a power switch set to motion detection.

Just as a tip, the invisible power conduits also included in this mod are great for when you have to draw them outside of walls and into rooms. You only see them when the power tab is open. I wouldn't mind invisible power switches too, tbh.


Anyways, at the bottom is how I tend to set up my turrets. The turrets are all technically outside. My power switch is inside. It's set to detect nearby enemies. When I hover over the icon I think it says 137 range or something. When an enemy is nearby, the power switch will automatically set itself to be "flicked." So it falls on the player to make sure they have dedicated flickers (specifically non combatants as you'll likely have your combatants drafted). However, in my experiences, it doesn't detect aggressive/manhunting animals as enemies, so they won't trigger the power switch to set itself to be flicked. I found that out when I had a stampede of manhunting bears.

But the main points are that the enemy detection doesn't automatically turn on and off like the room motion sensor setting. Also, the power switch does detect enemies through obstacles, since my power switch is clearly inside my base.

If the mod isn't working like this for you then there may be some kind of conflict with another mod, etc. Haplo would be the authority to ask on that one.

Hope this was helpful. 

NemesisN

#292
wedekit thank you for the screenshot it helps a lot and it should be posted on main top post as a example

Kinda shame I have to place switches all around the base looks just ugly but what can you do

Suggestion: Mabye re-code the switch so the object triggers the switch when the colonist is near the object that is connected to conduit which is connected to a switch....it would solve placing switches all around....1 switch would be able to control multiple rooms (in current state colonist needs to be near the switch and not the object for the switch to be triggered, very confusing for someone who first time uses the mod)
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

Canute

You will need lamps with integrated motion sensor.
I know there was a mod with this feature, but can't find it and don't know if it is for A17.

If you just want lamps that don't use power, you can try the ones from Industrial Age
https://ludeon.com/forums/index.php?topic=26078.0
Fueled with wax, or nofuel with gas.


wedekit

#294
Quote from: NemesisN on October 13, 2017, 06:03:28 PM
wedekit thank you for the screenshot it helps a lot and it should be posted on main top post as a example

Kinda shame I have to place switches all around the base looks just ugly but what can you do

Suggestion: Mabye re-code the switch so the object triggers the switch when the colonist is near the object that is connected to conduit which is connected to a switch....it would solve placing switches all around....1 switch would be able to control multiple rooms (in current state colonist needs to be near the switch and not the object for the switch to be triggered, very confusing for someone who first time uses the mod)

No problem, glad I could help. If Haplo wants to use the image as an example in the OP I say go for it. Documentation in general isn't a strong suit in this modding community, so it's something to get used to. I basically learned XML (which is fairly elementary and easy to learn) and eventually a bit of C# just to get to the bottom of Rimworld mods and what they are coded to do.

You could probably accomplish the "one switch" instead of dozens with some careful/strategic power conduit placement, but you'd have to probably also design your base to accommodate. Meaning lots of planning. You could also look into the Power Logic mod, which adds circuitry type objects/structures to make complex circuitry (not unlike red dust from Minecraft). AND, OR, XOR, floor/weight sensors, temperature sensors, etc. options. I'm not good at coming up with stuff like that from scratch, so I couldn't help you much with designing anything.

One of the structures in Power Logic is a little satellite that can send signals across the map to activate receivers. So placing them on the edge and set to trigger when they detects enemies. Then a receiver attached to turrets will activate them all when the "enemy signal" reaches it. It's very versatile. The tradeoff is that you'll have a lot of clutter/"ugly" structures spread out everywhere. It's why I tend not to use any of the stuff from Power Logic.

wreckcelsior

Great mod Haplo, one of my must-haves... I just have a quick question regarding the 'enemy on' switch.

Is there any way to have it automatically turn on rather than have one of my morons have to go and switch it on?... i.e. work like the auto 'colonist on' switch most popularly used for lamps... Even if it just instructions for something I could do myself.

Enemy enters field, guns are switched on, mayhem ensues... wheeeeeee.

thanks in advance for any/all help
cheers.

harpo99999

haplo,any idea when the power switch will be updated to b18?

Haplo

It took a while, but finally I remembered to update the forum :-[

So finally here it is:
The B18 version of PowerSwitch

harpo99999

thank you for the update, btw I still think that the autoswitch for pawn in room should be in the base game and not need to be modded in as it gratly improves the management of the colony

Johnny_Bandit

So I've noticed that manhunter packs don't set off the enemy detection, is that suppose to be like that?