Ludeon Forums

RimWorld => Mods => Releases => Topic started by: Haplo on April 10, 2014, 03:31:29 PM

Title: [1.2] PowerSwitch
Post by: Haplo on April 10, 2014, 03:31:29 PM
PowerSwitch



Description:
This mod expands the available power switch with a few automatic functions.
It also adds hidden conduits with improved statistics.

You start with a simple power switch, which can switch the power transmission through it on and off.
The additional features need to be researched.
After you've done your tinkering you'll have the following functions available:
-Manual switching
-An automatic pawn in room switch on
-An automatic pawn nearby switch on
-An automatic enemy found switch on
-An automatic enemy found switch off
-Timed switching (programable)
    Repeat clicking on the UI to change the times.
    The set times are shown in the description

-Hidden power conduits are also available through research

Modder:

Download:

Pre-Beta 19 versions can be found on
(http://static-3.nexusmods.com/15/images/101/1-1394454241.png) (http://www.nexusmods.com/rimworld/mods/21/?)


Screens:
(https://s5.postimg.org/tvggtgbt3/Rim_World_Forum_Power_Switch.jpg)


How to install:
- Unzip the contents and place them in your RimWorld/Mods folder.
- Activate the mod in the mod menu in the game.


Issues/Notes:
-Additional features need to be researched.
-Don't connect a consumer (lamp, turret,..) directly to the switch.
When it is switched off, the consumer will automaticly reconnect to the next available transmitter.
So add a power conduit or a wall and let it connect there instead.

If you find a bug or think that something should be changed, please don't hesitate to tell me.


Description:
- Manual On/Off: Base functionability, available from the start
- Pawn Detection in Room: Available after research with the normal switch. Detects, if an Pawn (human, animal) is in the room
- Pawn Detection within 7 squares: Available after research. Normal pawn detection mode for wall switches. Normal switches can be switched between this mode and the pawn in room mode by repeatedly pressing the selection button.
- Enemy detection (within 1/3 of the map): Available after research. Available modes: Switch on when detected and switch off when detected.
- Timer: Available after research: Switches on and off at specified times. Time is initially set to 19h->On and 5h->Off. This can be changed by pressing the buttons repeatedly.


Credits:
- Special thanks to iame6162013 (http://ludeon.com/forums/index.php?action=profile;u=3934) for the wonderful idea of the invisible wires.


Permissions:
This mod and it's source code is released under the Creative Commons License Attribution-ShareAlike 4.0
Ludeon has an exception clause. ;)
For more info about it take a look into the About folder.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Zack_Wester on April 10, 2014, 04:30:42 PM
Looks so good downloading it.
Also can you make an power Line version of the cable you know an Utility pole? cos it fells kind of odd when I build rooms as small houses separated from each other and I have to put the power line of the floor/ground.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 10, 2014, 04:46:00 PM
Hmm, right now I'll rather not do that.
I know of a mod thats at work right now, that makes something like that.
You just have to wait a few days/weeks but what I know, it looks really promising :)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: rsdworker on April 10, 2014, 05:01:46 PM
nice :) i like it a automatic switches
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Psyckosama on April 11, 2014, 03:13:51 AM
Is a time of day switch possible?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 11, 2014, 03:34:20 AM
I think so. I haven't tried it yet because it has already four buttons, but i don't really see a problem with it.
Maybe I'll take a look into it. What times of day do you prefer? (As I most likely have to program them into the dll. Still haven't worked out a way to transfer a new data value from the XML to the code)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: ousire on April 11, 2014, 10:43:03 PM
I think a time of day switch would be best so it would send power at night. The only time I can think of where power depends on what time of day it is would be for stuff like sun lamps. When it's day out, you don't need the lamps on after all. At night time though, that's when you would want to turn on all the lamps to grow crops and turn on any outdoor lights for any colonists out at night.

As it is, it's quite easy to manually toggle all your grow lights by wiring them to a single on/off switch, so I don't have any real complaints for this mod. This is something I think we've all been wishing for a long time!
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Zack_Wester on April 12, 2014, 05:14:02 AM
Quote from: ousire on April 11, 2014, 10:43:03 PM
I think a time of day switch would be best so it would send power at night. The only time I can think of where power depends on what time of day it is would be for stuff like sun lamps. When it's day out, you don't need the lamps on after all. At night time though, that's when you would want to turn on all the lamps to grow crops and turn on any outdoor lights for any colonists out at night.

As it is, it's quite easy to manually toggle all your grow lights by wiring them to a single on/off switch, so I don't have any real complaints for this mod. This is something I think we've all been wishing for a long time!

You know that could be useful later down the line like when some one desids to build an working computer in game.
Just look at Minecraft.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: StorymasterQ on April 13, 2014, 11:08:52 PM
http://xkcd.com/505/ (http://xkcd.com/505/)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Vas on April 15, 2014, 04:22:39 AM
If it looked better than a green/red dot, I might consider using it.  :P
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: confusedwings on April 15, 2014, 05:02:39 AM
I like this mod i'm only missing 1 part...

Is it possible to add a 'sun sensor'?
This thing would activite when there is not enough sun (for example it wil let power true to a sun lamp when the sun is to weak to let plants grow.)

A other option but think this would be to hard to make is a 'Timer Switch'.
With this item you can select for every hour if it's turned on or of...

sorry i make spelling mistakes i'm not english but i try to do so
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 15, 2014, 06:30:06 AM
@StorymasterQ: Nice Comic  ;D

@Vas: I'm no designer. So if you feel that it could look better, how about I provide the source psd-files and you make me some better looking ones? ;)

@confusedwings: I am thinking about doing the day/night Switch. It would Switch Off at 5 and On at 19. Hmm, maybe a selectable timer is possible.. I'll have to try it..
Alternatively I could try to detect if it is lit or not, but that would maybe do a on/off-Loop when in range of a lamp..

But first I have to try, if the GUI accepts more than four Inputs now..
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: jamieg on April 15, 2014, 10:55:58 AM
love how last week this was just a manuel switch.... soon it will be a super computer thats built to lower your electric bills :p
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: confusedwings on April 16, 2014, 06:05:32 PM
Hmm... i was just reading the post of JAMIEG and was thinking... maybe this 'timer' needs to be researched en then a kind of pc needs to be build...

If it is possible to name lights you could even use that computer to edit every light in your game in a central point... offcourse that point would use power on his own ^^ nothing is for free :p

if 'personal' timing of lights is possible it should also needs to be researched :p

sorry for my english... again if i make mistakes...
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 17, 2014, 01:23:25 AM
I'm with you with the research part. Not so much with a central computer needed.
If you take a look at the timers used today they are always rather small and directly where they are needed. So why make it unnecessary difficult to control them?
And no, I won't build a computer yet ;)
PS: The Timer code is already prepared. Just need a few days to make new GUI buttons. I'm not so fast with grafics :)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 17, 2014, 03:55:50 PM
New Release: The PowerSwitch now gets a programable Timer.
You can set the time when to switch on and when to switch off yourself.
Base time is at 19h on - 05h off.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: bombarding on April 20, 2014, 11:46:58 AM
great, hope u also make auto move detection not just for a room but in mine also..so my miner will not afraid of darkness..cuz i build power switch inside mine but doesnt work with auto
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 20, 2014, 06:04:10 PM
Yes, the power switch switches on if there is someone in the room. With a mine there is mostly the problem that there is no door and thus the whole map is the room. With the wall switch it is different. As a wall divides rooms I couldn't use the room switching. So the wall switch does that, what you like to have: it switches on if someone is within 7 squares of it.
I'm unsure if I should add the same functionality to the switch too, as there are already so many GUI items there...
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: harpo99999 on April 20, 2014, 07:09:43 PM
what about CHANGING the autoswitch functionality to the 7 square radius from the room ?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 21, 2014, 03:39:11 AM
I don't really want to replace the room functionality.
But maybe I'll do a switching possibility between both modes..
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: DarkXess on April 21, 2014, 05:30:31 AM
Thanks for posting your release. Please update your release post with our download links too :)

You can find our mirror here:

(http://www.modsaholic.com/forums/site_pics/downloadbut.png) (http://www.modsaholic.com/forums/index.php/files/file/561-powerswitch/)

You can always contact me for changes to be made to the above link, also any updates please be kind to
inform us or even submit the update yourself on our downloads section (http://www.modsaholic.com/forums/index.php/files/).
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Thoughtless on April 21, 2014, 01:08:17 PM
If the wall switch has wall in front or behind it, it causes red/green blocks to show up on the wall. I didn't see this posted anywhere, so I thought I'd throw out there.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 21, 2014, 04:21:03 PM
Do you have a screenshot or a description how I can reproduce this?
I've tried it, but didn't get any red/green blocks..
Any special configuration needed?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 26, 2014, 03:43:25 PM
New version is out: 1.3.0
This time I've added the possibility to switch the mode 'Pawn in room' to 'Pawn within 7 squares'.
(Only possible for the normal switch. The wall switch still only has the mode 'Pawn within 7 squares'.)

Additionally there is an addon for BetterPower+. This adds the PowerSwitch as a buried variant to the game.
Note: It needs BetterPower+ and PowerSwitch to be loaded before this addon.

Oh, and I've added a detailed description to the first post.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: pawnstorm on April 26, 2014, 06:20:52 PM
Awesome work! By the way, Tynan posted something about command actions here (http://ludeon.com/forums/index.php?topic=3308.msg31391#msg31391) which you might find useful.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 26, 2014, 06:50:11 PM
Thanks for the info. Didn't see that one..
Hmm, seems like I need to make some additional changes...
Oh, well.. Tomorrow :)
Hmm, I've integrated it and updated the files to version 1.3.1 :)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: DarkXess on April 27, 2014, 08:07:47 AM
Thanks for posting your update, mirrors and download page updated :)

You can find our mirror here:

(http://www.modsaholic.com/forums/site_pics/downloadbut.png) (http://www.modsaholic.com/forums/index.php/files/file/561-powerswitch/)

You can always contact me for changes to be made to the above link, also any updates please be kind to
inform us or even submit the update yourself on our downloads section (http://www.modsaholic.com/forums/index.php/files/).
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 29, 2014, 11:44:01 AM
Added a new variant of the PowerSwitch: This time the wires are invisible!
You can see the power flowing, but not the power lines themself.

Special thanks to iame6162013 (http://ludeon.com/forums/index.php?action=profile;u=3934) for the wonderful idea of the invisible wires.

Here is how it looks after you built them:
(http://ludeon.com/forums/index.php?action=dlattach;topic=2890.0;attach=2101)

(http://ludeon.com/forums/index.php?action=dlattach;topic=2890.0;attach=2103)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: iame6162013 on April 30, 2014, 03:08:07 PM
Man that really does look cool... only a few days late :P
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on April 30, 2014, 06:04:48 PM
Maybe.. but better late than never. ;)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: decomg on April 30, 2014, 08:15:01 PM
not work here, where the button should appear?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on May 01, 2014, 05:13:25 AM
Which button do you mean? The buttons for enemy, friend and timers? You need to research them first :)
If you mean the power switch icons in the Architect, they should be under Structures, where you can find the power conduits too.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: decomg on May 01, 2014, 08:18:50 AM
now works...

I had put in PowerSwitch 1.3.1/powerswitch/mods and now in powerswitch/mods.

Thanks for this great mod

;)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on May 01, 2014, 08:33:03 AM
No problem, have fun ;)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Cala13er on May 02, 2014, 09:01:12 AM
Are those invisible wires from iame?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on May 02, 2014, 10:27:09 AM
The idea comes from there, yes. Take a look into the credits.
I've build the wires on the idea. The work is 100% mine.
And.. It's done with permission.
So.. Anymore questions?  :)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Evmeister on May 03, 2014, 03:46:12 PM
Hi Haplo, does the full replacement come with add on for better power or do I still need to download that one?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on May 03, 2014, 05:13:14 PM
The full replacement is a replacement for the normal power switch and the vanilla power circuits. I can't integrate the BetterPower+ variant, because it wouldn't work without BP+.
So, yes. You need the BP+ variant too :)
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Evmeister on May 03, 2014, 08:05:01 PM
Ok that's what I figured, thank you sir.
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Jdalt40 on May 18, 2014, 02:45:22 AM
Hey do you think that you could make like a power switch that turns on when there is less then 500
power coming through the cable it is next to?
Title: Re: [MOD] (Alpha 3) PowerSwitch
Post by: Haplo on May 18, 2014, 02:14:42 PM
I have to try it out. It should be possible.
But as I have no time to do anything in the next days, it will take a while until I can do some testing..
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 02, 2014, 08:39:22 AM
Update to Alpha 4
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Gladdig_Kaga on June 04, 2014, 12:27:43 PM
I've wanted for this kind of mod for a long time, I was really happy when I found it. But after testing I felt that the powerswitches are less useful than I hoped for.

For example:
I like building most things, including electricity consumers (lamps, turrets, trading console, etc) next to the walls of my rooms, which makes it hard to use the power switches since everything will just connect to the walls. The wall switch works if I have large enough rooms, but not in smaller rooms (because they will react to people walking outside). I don't see how I could use the floor switch to solve this (except in conjunction with not building next to the walls).

Are you having this problem or am I missing something obvious here?

I've got two ideas on how to solve this, but I have no idea how hard it would be to do any of them.

1. Add a way to choose which powerline an electricity consumer connects to, even if it's much further away.
2. Mod the walls to not conduct power by default (like stonewalls don't). Instead make it possible to draw powerlines through wood and metal walls.

I think the second solution is the better of the two, but ofcourse it would be better to have them both.

Right now I'm building my base out of stone and logs and having loads of fun with the mod.
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 04, 2014, 02:16:06 PM
I have tested it a bit, and your secend solution is possible, BUT with one grave problem: Once you've placed the powerlines, you can't remove them anymore..
The problem is the following: Powercondduit are a Building Entity. If you change the entity to Ethereal you can build them and then you can build an wall above them. Now this line has two problems: The type Ethereal is the type of an Gysier. You can't remove it, once it's set.
Another problem is, that electrical objects won't connect to the Ethereal power lines. But it is possible to make Power plugs, which will connect both to the power lines and to the electrical objects. So that is a nice way to do such.
But the big problem is that you can't remove it once it's set. As long as I don't have a solution for that problem, I won't make an official update out of it...

You can find the Ethereal-Test variant here:
http://www.mediafire.com/download/d6i159k6blqvt65/PowerSwitch_Ethereal_TEST.zip

This is how it functions in game. Red is the ethereal line blue are the plug lines (normal power conductor)
Notice how the right middle lamp doesn't have power? That's because it can't connect to the ethereal power line..
(http://ludeon.com/forums/index.php?action=dlattach;topic=2890.0;attach=2495)

[attachment deleted by admin: too old]
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Tynan on June 04, 2014, 02:37:55 PM
Unfortunately this isn't really easy to get around. The code for handling overlapping buildings and frames is already somewhat difficult so it's not trivial to make a power line that can go under a wall. In fact, it is on my 'to do' list for... eventually.
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: decomg on June 04, 2014, 02:38:14 PM
yessssssssssssssssss

thanks for the update on the best mod

;D
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 04, 2014, 02:49:31 PM
Quote from: Tynan on June 04, 2014, 02:37:55 PM
Unfortunately this isn't really easy to get around. The code for handling overlapping buildings and frames is already somewhat difficult so it's not trivial to make a power line that can go under a wall. In fact, it is on my 'to do' list for... eventually.

Thanks for the quick answer :)
So I'll let it be for now and work a bit more on my other projects. Sorry, that it doesn't work as wanted..
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Gladdig_Kaga on June 04, 2014, 04:33:36 PM
How about just adding a non-conducting version of the two walls and then just adding the price of a powerline to the conducting versions?

Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: anikaiful on June 04, 2014, 05:23:46 PM
 ;D power saving with auto-switches FTW.
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Tuvka on June 05, 2014, 06:26:11 AM
It would be nice if added the ability to shoot the turrets hostile animals. Only I'm not sure that it depends on the switch.
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 05, 2014, 06:31:30 AM
Nope, the changes for that need to be done in the turret-code :)
The switch itself just cuts the power supply.
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Tuvka on June 05, 2014, 07:00:15 AM
I thought so, will have to wait modes Vanilla +
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: LZPanzer on June 05, 2014, 07:52:45 PM
for the sensors (particularly enemy sensor) can we get a dettection circle likewhat is used for the turrets range?
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 06, 2014, 12:55:13 AM
It wouldn't work as the circle is always 1/3 of the map size big.
Only when you're farthest away you may see it fully :)
If the need for it really is there, maybe I 'll do it, but right now I just don't have the time for it. Sorry.
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Ivia on June 06, 2014, 04:32:57 AM
I just wondering if it's possible to make emergency power function?
Like if the switch detect there're no power source in it's grid, them it'll switch on?
Title: Re: [MOD] (Alpha 4) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 06, 2014, 06:29:23 AM
I think it is possible. Right now I don't know how easily that's doable, but maybe yes.
I think there was already a request for that, but I haven't time yet to look into it as there where too many other things to do lately :)
The main Problem is, that the PowerSwitch can't check the power in itself when it's off, as it isn't connected to a power grid in that mode. But maybe I can check the four sides for a powernet and check their power transfer value. Not sure how easy that's doable, but it is on my todo list. Just not that far at the top right now..
Title: Re: [MOD] (Alpha 4F) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Haplo on June 08, 2014, 02:47:20 PM
Alpha 4F compatibility checked, no update needed :)
Title: Re: [MOD] (Alpha 4F) PowerSwitch (1.4.0 / 02.06.2014)
Post by: WMP on June 08, 2014, 04:04:34 PM
@tynan: Could you include this mod to Alpha5? Please ;)
Title: Re: [MOD] (Alpha 4F) PowerSwitch (1.4.0 / 02.06.2014)
Post by: Sakata on June 19, 2014, 06:48:31 AM
This seems neat.  The only thing I would like to see is if there is an ability to turn on/off other objects (mainly power producers) based on power storage capacity.
Title: Re: [MOD] (Alpha 4F) PowerSwitch (1.4.0 / 02.06.2014)
Post by: knoedel90 on June 30, 2014, 02:07:44 AM
it would be nice, if i could Auto switch off my work benches if nobody uses them.
but if i try to, People wont work on them because they are off.

another idea would be a power Switch that recognices if it's rainy outside. so you could use electronic things like sun lamp and distress beacon.
but maybe this one is not needed if the glaswork mod is finished.
Title: Re: [MOD] (Alpha 4F) PowerSwitch (1.4.0 / 02.06.2014)
Post by: DarkXess on July 01, 2014, 12:53:10 PM
*Sorry for the delay, been on my travels - working on updating all the mod pages etc now.

Thanks for posting your update, mirrors and download page updated :)

You can find our mirror here:

(http://www.modsaholic.com/forums/site_pics/downloadbut.png) (http://www.modsaholic.com/forums/index.php/files/file/561-powerswitch/)

You can always contact me for changes to be made to the above link, also any updates please be kind to
inform us or even submit the update yourself on our downloads section (http://www.modsaholic.com/forums/index.php/files/).
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: Haplo on July 04, 2014, 05:34:30 PM
And the switch is updated to alpha 5.
It also includes language files. Right now for english (en-US) and german (de-DE).
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: PsychoForge on July 09, 2014, 08:41:50 AM
I think ive found an issue unless its me lol

It seems when no one is in the room and u have the switch turned to detect people it breaks the line like it isnt even attached instead of turning off the switch only it makes it look like the line is broke even tho it isnt (dunno if this is correct or what)

2nd thing ive noticed is when someone enters the room  the switch turns green and the line reconnects  so it looks fine but no power seems to be getting to the light on the piece of wire i have after the switch.

[attachment deleted by admin: too old]
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: Haplo on July 09, 2014, 09:00:21 AM
Thats perfectly normal behavior:
When the switch disconnects, for the powernet it looks as if there isn't an object that can transmit power.
After it switches on, it reconnects itself and reactivates the connection of the powernet.

What shouldn't happen is, that the lamp STAYS off, even after reconnecting. The lamp should find, that the power is switched on after a short time delay.
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: PsychoForge on July 09, 2014, 09:05:02 AM
So is it a problem on my end or the mod :/ i have no idea lol
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: Haplo on July 09, 2014, 11:06:35 AM
Do you have enough power on the powernet? Can it be that there is a second disconnection somewhere else,  so that the lamp doesn't get connected to a power generator?
Please check that the connected lamp has a power connected value of min +150W.
If that is all OK,  you can provide the save and I will take a look..
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: PsychoForge on July 09, 2014, 11:46:32 AM
Here is screenshots for you friend, hope they help you find what ever is wrong.
:(

[attachment deleted by admin: too old]
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: decomg on July 09, 2014, 02:16:39 PM
Thanks for the update man...
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: Haplo on July 09, 2014, 03:12:38 PM
Ok, that looks like there is a part of the wall switch still active.
Sorry, I should have made an info for it:
The new power switch version doesn't have the wall switch anymore. As I didn't really saw any useful applications of it, I've removed it from the alpha 5 release. The problem you have, is that you still have the alpha 4 wall in your power switch folder.
Therefore you need to delete the powerswitch folder and make a clean mod install..
Sorry for the problems I've made by removing it. :(
I'll make a notice in the starting post.
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: fraz on July 11, 2014, 12:00:14 PM
Do switches function as circuit breakers in the event of a short circuit (if the switch is off)?
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: mrofa on July 11, 2014, 12:22:32 PM
Quote from: fraz on July 11, 2014, 12:00:14 PM
Do switches function as circuit breakers in the event of a short circuit (if the switch is off)?
Nope
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.0 / 04.07.2014)
Post by: fraz on July 14, 2014, 06:57:13 PM
Just FYI, the modsaholic download link appears to be outdated.
Title: Re: [MOD] (Alpha 5) PowerSwitch (1.5.1 / 16.07.2014)
Post by: Haplo on July 16, 2014, 04:14:08 PM
Here is the first language update: ru-RU
Thanks to Oceanel I can proudly say, that the power switch does come with russian labeling now. ;D
Ok, I don't understand anything of it, but hey, it is the first foreign language, thats not from me. 8)
But if you find that something could be done better in a different way, don't hesitate to tell me.
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Haplo on August 13, 2014, 05:23:32 PM
And here is my power switch, updated to alpha 6.
I've also incorporated the idea of Jerethi50 (http://ludeon.com/forums/index.php?action=profile;u=7983) and integrated the hidden power conduits as a research option.
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Jerethi50 on August 13, 2014, 08:34:11 PM
Awesome, saves me some work when i put together the modpack for a6 :)
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: EmmaWayne on August 15, 2014, 07:45:18 PM
i dont now if it is your mod but i have a big problem.
first. everything is fine. it is awesome and i fucking LOVE it^^ but if i have to restart the game and load my world... im fucked. my lights going crazy. on off on off on off all the time. ok chill out emma. just deconstruct the powerswitch... nothing happens. deconstruct the lights... uhm wtf? there is no light installed but it is still going on off on off.

restart the game or/and power goes to zero = fucked.

i have to start a new game.

as allways. i know my english is fucked but can someone help me?

thx Emma :)

edit:
im using the switch for mostly every room i have. sometimes i place the switch to turn off everything in the room, somtimes i place them to only turn off the lights and let the nutrient go on
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: harpo99999 on August 15, 2014, 08:14:55 PM
I also have had ONE  switch set to colonist(initially), connected to a metal post then a single light have the light flicker on and off, even after changing the switch to always on, I disassembled the light and connected the light directly to the wire and problem stopped flickering, perhaps it is something to do with walls that are isolated from the power grid only getting power through the switch?
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Haplo on August 16, 2014, 02:37:02 PM
As I ve looked into the loading issue, I stumbled over another much more serious problem.
If you have a lamp or such directly connected to the switch and then switch it, the game crashes.
I've searched and tinkered, but didn't find an solution for it yet. Right now I ve request some help, but until this issue is fixed, I don't really recommend the use of my mod. Or if you do, be extremely careful, that the consumer don't connect directly to the switch.
I'm sorry about that and will hopefully have a solution soon..

I'm sorry, but due to an unfortunate part, the mod will most likely be suspended until alpha 7 is released.
Sorry, but it isn't save until then..
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Sakata on August 21, 2014, 01:15:36 AM
Well drat.
This mod is part of my "absolutely must have" list.
Hopefully will be working in A7
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Jaxxa on August 21, 2014, 02:01:18 AM
Thanks for making this mod.

Issues aside it is really helpful for managing power, and can still be used if you are careful about what you connect to it.

Hope you can get it sorted for Alpha 7, good luck.
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Baroni on August 31, 2014, 09:20:35 AM
Something is wrong with power switches after game reloading - after building some switches and reloading my base blinks like christmas tree. Nothing helps (deconstructing, re-constructing, etc.). Only solution is restoring game from previous save (when this mod is not activated)
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Haplo on August 31, 2014, 09:52:30 AM
Please take a look at the main post.
Because of a game breaking bug, that's not fixable in alpha 6, I recommend to not use this mod for now.
I can't really do anything about it. Sorry..
Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: bullet on September 29, 2014, 12:02:45 PM
bug appears when you save your game when the switches are in any mode like  off and then load game. It can be fixed in the same way without selling. hard Switch On all the switches and save game (wait several sec)\ load your game.

If this bug is appears, sell lamps only  after a power outage. Otherwise, visual light glitches will be remain



Title: Re: [MOD] (Alpha 6) PowerSwitch (1.6.0 / 13.08.2014)
Post by: Haplo on September 29, 2014, 12:35:41 PM
Yes it is unusable in alpha 6.
Please tell me if it still appears in the alpha 7 version.
Hopefully it is fixed there..  :)
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Haplo on October 01, 2014, 04:19:34 PM
Update to Alpha 7.
Now it should work again :)
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: zadelpen on October 12, 2014, 09:40:44 AM
Not working for me in Alpha 7.

It seems to work without any problems at first, but then suddenly the connected consumers won't go on anymore. I had a lot of lights connected to circuit switched by a motion sensor.
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Haplo on October 12, 2014, 10:22:02 AM
Can you provide a screenshot of your configuration?
What does the switch say? Is it green? What is shown in the info panel of the switch?
Do you have enough power to provide for the lamps?
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: sanya02 on October 28, 2014, 02:30:03 PM

how to insert a switch in the wall?
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Haplo on October 28, 2014, 02:34:15 PM
I have removed them, as it was a bit to much hassle for too little gain in alpha 5.
I still have the code for walls with integrated switches, but it needs a bit of fine tuning if I wanted to reintegrate them again.
Essentially it is a ready wall with the functionality of the switch.
Not too hard to do, but not done due to low demand..
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: sanya02 on October 28, 2014, 02:47:38 PM

In the wall better! he does not take place) Lamp with automatic switch Off, switch to another energy source((((
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Haplo on October 28, 2014, 03:00:29 PM
you shouldn't connect the lamp directly to the switch. add a cable and let it connect to the cable and it won't automaically switch when switched off.
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: sanya02 on October 28, 2014, 03:15:51 PM
Ok! Works! But, to make the switch in the wall! You came home, he was not on the floor)). And in the wall), and will take up less space)
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Haplo on October 28, 2014, 03:31:16 PM
Maybe I will.. we'll see ;D
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: sanya02 on October 28, 2014, 03:37:09 PM
Thank you! Better when you can choose!
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: skullywag on October 28, 2014, 05:15:43 PM
Stuff based wall switch would be a really good addition.
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: DracoGriffin on October 28, 2014, 06:35:43 PM
Oooh, like the idea of this mod.

Are things in walls yet?
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: mipen on November 10, 2014, 05:23:43 AM
This is one of my staple cannot-play-without mods. Great work on this Haplo! I really think this deserves to be be part of the core game
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: harpo99999 on November 10, 2014, 04:11:15 PM
Quote from: mipen on November 10, 2014, 05:23:43 AM
This is one of my staple cannot-play-without mods. Great work on this Haplo! I really think this deserves to be be part of the core game
I agree, to the point where I will NOT play with a new release until your mod is updated for the new release (unless tynan has placed similar functionality in the core game)
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Haplo on November 10, 2014, 05:19:18 PM
Thank you for your kind words :D
This mod and miscellaneous will be updated as long as there isn't anything similiar in the vanilla game.
As there will be a weapon table, my workplaces will most likely not survive the alpha 8 release, but these two will :)
And.. when I find a bit free time, I'll also reintegrate the wall switches if you really want them ;D
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: skullywag on November 11, 2014, 04:21:38 AM
We do we do we do we do we do
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: harpo99999 on November 11, 2014, 07:06:10 AM
Quote from: skullywag on November 11, 2014, 04:21:38 AM
We do we do we do we do we do
ditto
ditto
ditto
ditto
ditto
Title: Re: [MOD] (Alpha 7) PowerSwitch (1.7.0 / 01.10.2014)
Post by: Endoric on November 11, 2014, 03:07:05 PM
downloaded.  i was wishing for a way to manage power drain from all the time on lights when i just need the light when the pawn is inside the room.
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Haplo on December 10, 2014, 03:39:36 PM
Updated to alpha 8
And as you insisted, the wall switch is back also.
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: thefinn on December 10, 2014, 10:28:00 PM
Well... at least there is powerswitch.
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Girlinhat on December 11, 2014, 01:30:51 AM
Suggestion now: Switches that turn on/off in certain temperature ranges.  Heaters that turn on in winter automatically!
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Dr. Z on December 11, 2014, 02:34:32 AM
I used the mod a while ago, and when I turned a switch off there was this message that buildings need power on the right side which was really annoying and I deleted it, is this still the case?
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Igabod on December 11, 2014, 02:52:58 AM
Quote from: Dr. Z on December 11, 2014, 02:34:32 AM
I used the mod a while ago, and when I turned a switch off there was this message that buildings need power on the right side which was really annoying and I deleted it, is this still the case?

My guess is yes this is still the case. You are shutting off power to the circuit, not just turning the objects off. It's like a circuit breaker in your house. Flip the circuit off and your lamp won't work no matter how many times you click the switch. The message that it needs power is removable probably but it would require some actual C# programming in a .dll file and it would probably remove the message from the game all together which isn't a good thing.
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Carry on December 15, 2014, 04:22:49 PM
Great mod, but there is a bug in the latest version (1.8.0, A8b/c).
The motion detection (pawn in room) doesn't work. It constantly throws exceptions. Every other option (including pawn nearby) works fine. I attach a screenshot of the debug log.


[attachment deleted due to age]
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Haplo on December 15, 2014, 04:41:25 PM
Hmm.. I think I have a solution for that problem..
Can you try this preview version (http://www.mediafire.com/download/cbv373eiuhmk7o7/PowerSwitch_pre181.zip) and tell me if it works for you, please? Hopefully it should correct the problem..
Title: Re: [MOD] (Alpha 8) PowerSwitch (1.8.0 / 10.12.2014)
Post by: Carry on December 16, 2014, 04:13:29 AM
Thanks for the quick reply. Motion detection works and no exceptions.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: Haplo on December 16, 2014, 03:17:21 PM
Update: And here is the official update to 1.8.1.
This one is Alpha 8e tested :)
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: decomg on December 19, 2014, 04:10:30 AM
Thanks Haplo   ;)
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: Arrean on December 19, 2014, 03:30:26 PM
Got a weird bug with motion detection power switches. Every couple of seconds it switches on, even if there is no one around, and brings my power rate to insane negative number(like -1800000) which is much more than my power consumption even if everything is on, And immediately empties all my batteries.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: harpo99999 on December 19, 2014, 04:35:10 PM
Quote from: Arrean on December 19, 2014, 03:30:26 PM
Got a weird bug with motion detection power switches. Every couple of seconds it switches on, even if there is no one around, and brings my power rate to insane negative number(like -1800000) which is much more than my power consumption even if everything is on, And immediately empties all my batteries.
I also see this issue while using 1.81
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: BinaryBlackhole on December 21, 2014, 12:44:00 AM
Could you do something like this with doors so raiders don't destroy the doors and you can let animals through I don't want to lose heat from a broken door.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: Haplo on December 21, 2014, 05:56:49 AM
Quote from: Arrean on December 19, 2014, 03:30:26 PM
Got a weird bug with motion detection power switches. Every couple of seconds it switches on, even if there is no one around, and brings my power rate to insane negative number(like -1800000) which is much more than my power consumption even if everything is on, And immediately empties all my batteries.

Does this happen only with the motion detector? Or also with the other modes?

Quote from: BinaryBlackhole on December 21, 2014, 12:44:00 AM
Could you do something like this with doors so raiders don't destroy the doors and you can let animals through I don't want to lose heat from a broken door.
If you want to have doors that  an be set to open I would recommend my Miscellaneous mod and there to activate the locked doors part.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: harpo99999 on December 21, 2014, 06:42:36 AM
haplo, I also see a flickering of the powerswitch  when in motiondetect mode and noticed the flickering of powered items connecteed permanently to the powernet as I aslo saw in each of the previous alpha versions
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: Haplo on December 21, 2014, 02:53:51 PM
Ok, I'll look into it soon.
But unfortunately because of all the x-mas chaos here, it may be after x-mas before I find the time to do it :(
I'll try to do it earlier, but can't really promise anything yet..
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: harpo99999 on December 23, 2014, 05:02:15 AM
haplo, when the sswitches are doing the flicker, I als osaw a large number of errors in the log for the powerswitches attempting to access a out of bounds location.
hope this info helps
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.1 / 16.12.2014)
Post by: Haplo on December 23, 2014, 09:55:53 AM
Thanks for the info. Could you maybe post the output_log.txt file when it happens? I have a suspicion, but when that really is the problem, it will be harder to fix as it is a core part and not a mod part that throws this error.. Hopefully my guess is wrong.. But I won't have time to check it until after Christmas, sorry :(
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: Haplo on December 27, 2014, 03:58:17 PM
Update: Hopefully I've found the cause of the error with the motion detector.
I'm not 100% sure as I couldn't reproduce it here, but.. I hope for the best 8)
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: thefinn on December 29, 2014, 01:40:15 AM
Motion Detector still making lights flicker.

:(

In fact, I'm not entirely sure it's the motion detector - I notice the switch doesn't turn green when this issue happens, just that the light flickers - for whatever reason...

Kinda drives u crazy.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: harpo99999 on December 29, 2014, 04:41:56 AM
Quote from: thefinn on December 29, 2014, 01:40:15 AM
Motion Detector still making lights flicker.

:(

In fact, I'm not entirely sure it's the motion detector - I notice the switch doesn't turn green when this issue happens, just that the light flickers - for whatever reason...

Kinda drives u crazy.
I also see this with the 1.82 switch, but it only happens after about 1 hour of play time, so it is going to be a bugger to find and fix
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: Kane Hart on December 29, 2014, 06:19:58 AM
This is for sure going be one the first mods I install! Thank you.

Small addon idea down the road might be some sort of circuit breaker. I really hate that whole overload fire thing with Battery's and might be a unique way to get rid of it for people who don't enjoy that event.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: thefinn on December 29, 2014, 12:57:08 PM
Quote from: harpo99999 on December 29, 2014, 04:41:56 AM
Quote from: thefinn on December 29, 2014, 01:40:15 AM
Motion Detector still making lights flicker.

:(

In fact, I'm not entirely sure it's the motion detector - I notice the switch doesn't turn green when this issue happens, just that the light flickers - for whatever reason...

Kinda drives u crazy.
I also see this with the 1.82 switch, but it only happens after about 1 hour of play time, so it is going to be a bugger to find and fix

Yeah it fixes it with a quick (or not) reload. So, might not even be the mod at fault ?
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: IIzTrollin on December 30, 2014, 11:14:48 PM
Is there a tutorial somewhere on how to use the switches i seem to not know how to use the room detector.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: harpo99999 on December 31, 2014, 03:48:11 AM
first place a switch,  and do the 'automatic switch' research, and if you want the auto enemy operation or timer operation, then do the time switch research, and for auto enemy switch then the 'automatic enemy switch' research, and left click on the switch, and in the bottom left you will see the swtich modes ie on/off, automatic, enemy automatic on, enemy automatic off, and time on  and time off..
haplo, after a reload of the game that I had started after installing 1.82 switch in the mods stack, I got a large group of the error that I had mentioned before, link to the log/save/world and active mods file https://dl.dropboxusercontent.com/u/8023186/output_log.rar
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: Haplo on January 02, 2015, 11:15:28 AM
Sorry it took me a while to be back at my computer.
Thank you for the files. I've looked into your output_log file and your crashing error is this one:


NullReferenceException: Object reference not set to an instance of an object
  at Verse.Find.get_ListerPawns () [0x00000] in <filename unknown>:0
  at Injector.hivemind.hivetopawn () [0x00000] in <filename unknown>:0
  at Injector.hivemind.execute () [0x00000] in <filename unknown>:0
  at Injector.injector.Update () [0x00000] in <filename unknown>:0
(Filename:  Line: -1)


This doesn't look like it is a cause from the power switch. I don't have anything named Injector in my code.
Plus the hive name looks like it is most likely caused by this mod: Apothecarius (https://ludeon.com/forums/index.php?topic=5450.msg52043#msg52043).
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: harpo99999 on January 02, 2015, 03:13:28 PM
Quote from: Haplo on January 02, 2015, 11:15:28 AM
Sorry it took me a while to be back at my computer.
Thank you for the files. I've looked into your output_log file and your crashing error is this one:


NullReferenceException: Object reference not set to an instance of an object
  at Verse.Find.get_ListerPawns () [0x00000] in <filename unknown>:0
  at Injector.hivemind.hivetopawn () [0x00000] in <filename unknown>:0
  at Injector.hivemind.execute () [0x00000] in <filename unknown>:0
  at Injector.injector.Update () [0x00000] in <filename unknown>:0
(Filename:  Line: -1)


This doesn't look like it is a cause from the power switch. I don't have anything named Injector in my code.
Plus the hive name looks like it is most likely caused by this mod: Apothecarius (https://ludeon.com/forums/index.php?topic=5450.msg52043#msg52043).
that error is from the hivemind in apocatherius(that I have not used(the hive mind part, the rest is used)), and I did not get a crash, just the flickering of lights and heaters attached to power cables isolated by swtiches set to motion detect (room), I have not seen the flickering on switches set to motion detect (distance).
and this is the error
(Filename: C:/BuildAgent/work/d63dfc6385190b60/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 49)

Platform assembly: C:\Users\ross\Desktop\RimWorld\RimWorld657Win\RimWorld657Win_Data\Managed\Boo.Lang.dll (this message is harmless)
Exception ticking PowerSwitch198927: System.IndexOutOfRangeException: Array index is out of range.

  at Verse.RegionGrid.GetValidRegionAt (IntVec3 c) [0x00000] in <filename unknown>:0

  at Verse.RoomQuery.RoomAtFast (IntVec3 c) [0x00000] in <filename unknown>:0

  at ModCommon.Radar+<>c__DisplayClass11.<FindAllPawnsInRoom>b__10 (Verse.Pawn p) [0x00000] in <filename unknown>:0

  at System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1D`1[Verse.Pawn].MoveNext () [0x00000] in <filename unknown>:0

  at System.Linq.Enumerable.Count[Pawn] (IEnumerable`1 source) [0x00000] in <filename unknown>:0

  at PowerSwitch.Building_PowerSwitch.SearchForPawnInRoom () [0x00000] in <filename unknown>:0

  at PowerSwitch.Building_PowerSwitch.Tick () [0x00000] in <filename unknown>:0

  at Verse.TickList.SingleTick () [0x00000] in <filename unknown>:0
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: Haplo on January 02, 2015, 08:05:36 PM
Ok, that is indeed a problem from the power switch..
Hopefully the new version prevents that error.
Can you try this version and tell me if it works better, please?
PowerSwitch - 1.8.3 (test) (http://www.mediafire.com/download/zn87cpphvnac1vb/PowerSwitch_183.zip)
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: Rock5 on January 03, 2015, 05:17:26 AM
You know what's really annoying? Having to place a switch, bit of conduit then the light, for every light you want automated, while trying to avoid accidentally attaching the light to the wrong conduit. What would be great is if there was a light with a sensor. Then you could just attach it like a regular light but it would only turn on if the sensor goes off. Or maybe make it a light upgrade.

Actually you know what would be really great is if you could somehow just add these new controls globally to all electrical devices. I'm assuming there is somewhere where shared attributes of electrical devices is stored, after all all electrical devices have a power switch and it wouldn't make sense to repeat that with very electrical device.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: harpo99999 on January 03, 2015, 06:08:42 AM
sorry rocks, but NOT all electrical devices have a power switch, eg refrigerators, freezers, air conditioners, lights(usually have switches remote from the light near doorways),stoves, clocks, solar panel systems, water heaters(in the REAL world at least and usually have a circuit breaker/fuse in the power board/meter box) and for relocatable items they usually plug into a power point that has a switch on it.
but the items that DO have a power switch on them it is usually a convinience item on the most accessable part of the item and frequently does not completely remove power to the item, but puts the item into a lower power state with a quicker startup.

haplo, I will test the new version tomorrow
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: Rock5 on January 03, 2015, 06:44:18 AM
You do realize that I'm talking about the game, not real life? :) All electrical devices in the game, not including power sources, have power switches. So I reasoned there should be a location where this commonly shared button is described. Maybe there you can add extra common buttons such as the sensor buttons. Then again maybe not, I don't know. I would at least love to see a sensor light.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.2 / 27.12.2014)
Post by: thefinn on January 03, 2015, 07:24:07 AM
Quote from: Rock5 on January 03, 2015, 05:17:26 AM
You know what's really annoying? Having to place a switch, bit of conduit then the light, for every light you want automated, while trying to avoid accidentally attaching the light to the wrong conduit. What would be great is if there was a light with a sensor. Then you could just attach it like a regular light but it would only turn on if the sensor goes off. Or maybe make it a light upgrade.

Actually you know what would be really great is if you could somehow just add these new controls globally to all electrical devices. I'm assuming there is somewhere where shared attributes of electrical devices is stored, after all all electrical devices have a power switch and it wouldn't make sense to repeat that with very electrical device.

Yeah totally agree, having a light that could do the job of the "automatic switch" would save a lot of screwing around. Especially in rooms where you want a light + have a lot of tables that need power and THEY keep connecting to the light conduit.

Can be annoying.
Title: Re: [MOD] (Alpha 8e) PowerSwitch (1.8.3 / 05.01.2015)
Post by: Haplo on January 05, 2015, 12:17:54 PM
It isn't that easy to integrate the switch in the lights. But I'll take a look into how much trouble it really would be.
And I've released the version 1.8.3 officially. Hopefully it works better with the motion detector.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Haplo on February 22, 2015, 07:34:38 AM
And I've finally updated this to Alpha 9.

Changes:
-The power switch functionality is in the vanilla power switch integrated.
-Invisible wires work flawlessly
-Wall switches removed


Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: akiceabear on February 24, 2015, 10:25:13 AM
Is this working correctly in A9? Whenever I try to use the switch and automatic functions, it fails to work.

- The switch correctly turns off when the room is empty - but the connect item does not turn off.
- I have made sure there is a power line on both sides - so the consumer is connect to the nearest line, not the switch.
- Even switching the switch off manually fails to cut the power.

Any tips?

EDIT: Got this working - you can't have a power line built underneath the switch.

Suggestion: invisible power switches!
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: harpo99999 on February 24, 2015, 03:32:25 PM
sorry to report an issue haplo, but I still have the issue of buildings(lights) attached to output wire from switch in auto pawn mode flickering, (and the flicker is significantly faster almost to strobe flash speeds)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: SilverDragon on February 24, 2015, 03:37:29 PM
Here you go, as soon as I started the game with PowerSwitch on, there's a duplicate code thingy or something popping up for PowerSwitch_Power :D I hope this helps in the troubleshooting.
(http://i.imgur.com/Jwp0Xmp.jpg)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on February 27, 2015, 05:47:08 PM
I thought this was going to be very useful, but as it turns out, it needing to be out of connecting range of any other power, plus a power cable, plus the switch, means a lamp can't be on a switch in a 5x7 bedroom if you have conduit walls/power doors.

*sighs*

The motion detector/enemy detector is good for my turrets, at least.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: akiceabear on February 27, 2015, 11:46:47 PM
I'm pretty sure it can - you make sure the closest connection (a wire leading directly into it, with a switch before) is the one the object has connected to.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on February 28, 2015, 09:42:01 AM
Quote from: akiceabear on February 27, 2015, 11:46:47 PM
I'm pretty sure it can - you make sure the closest connection (a wire leading directly into it, with a switch before) is the one the object has connected to.
That means you have to use up three tiles, and it can't be adjacent to a circuit-wall, which is an issue when space is at a premium.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: akiceabear on February 28, 2015, 12:26:53 PM
QuoteThat means you have to use up three tiles, and it can't be adjacent to a circuit-wall, which is an issue when space is at a premium.

Install the circuit and item before the circuit-wall, and I guess it will solve the issue.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Rock5 on February 28, 2015, 12:38:29 PM
It doesn't matter what order you install things or even what conduit is closer. After everything is built just use "Reconnect" until the lamp is connected to the right conduit. Yes, it means you can't put the bit of conduit, that the lamp is going to be connected to, against a wall because it will connect, but you can put the lamp near a conduit wall if that's what you want.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on February 28, 2015, 04:26:41 PM
Quote from: Rock5 on February 28, 2015, 12:38:29 PM
It doesn't matter what order you install things or even what conduit is closer. After everything is built just use "Reconnect" until the lamp is connected to the right conduit. Yes, it means you can't put the bit of conduit, that the lamp is going to be connected to, against a wall because it will connect, but you can put the lamp near a conduit wall if that's what you want.
*still can't manage to get it to work with a 5x7 room and be practical* oh well. Guess I'll just have to get some modded power plants/batteries going and try and make the power use manageable.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Rock5 on February 28, 2015, 11:16:23 PM
"Practical" could mean anything but, yes, you will always need at least 3 squares for the set up, switch then conduit then lamp. Unless a lamp with an inbuilt sensor is added.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Voideka on March 01, 2015, 04:09:10 AM
Quote from: MsMeiriona on February 28, 2015, 04:26:41 PM
*still can't manage to get it to work with a 5x7 room and be practical* oh well. Guess I'll just have to get some modded power plants/batteries going and try and make the power use manageable.

What do you mean by practical? Just put the switch down next to the conduit wall, then put a bit of conduit on the other side and connect the lamp to that.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on March 01, 2015, 10:44:04 AM
Quote from: Voideka on March 01, 2015, 04:09:10 AM
Quote from: MsMeiriona on February 28, 2015, 04:26:41 PM
*still can't manage to get it to work with a 5x7 room and be practical* oh well. Guess I'll just have to get some modded power plants/batteries going and try and make the power use manageable.

What do you mean by practical? Just put the switch down next to the conduit wall, then put a bit of conduit on the other side and connect the lamp to that.
Because I had previously been putting my lamps in corners. 5x7 room, cooler in middle of 5 wall, door in middle of opposite 5 wall, lamp in one corner, heater in one corner, bed in one corner along 7 wall , leaving room for a crafting table along the wall opposite the bed.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Haplo on March 01, 2015, 02:22:29 PM
Ok, just to visualize it I've rebuild your described room. If you watch where you lay the power lines, I don't really see the problem. And the short line you need north of the PowerSwitch can be build with an invisible conduit..
Is this what you mean?

[attachment deleted due to age]
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on March 01, 2015, 03:16:01 PM
Quote from: Haplo on March 01, 2015, 02:22:29 PM
Ok, just to visualize it I've rebuild your described room. If you watch where you lay the power lines, I don't really see the problem. And the short line you need north of the PowerSwitch can be build with an invisible conduit..
Is this what you mean?
For some reason, when the switch goes off, if there's a power source in range, my lamps always seem to reconnect on their own. It may be mod interference or just my being dumb with how I lay them down. I like to have my bedrooms all nice and neat, 5x7 with a 3 wide hall outside (I'm probably just make the damn thing as an example in a minute) and that means sharing walls, so either all the 5s must be powered or all the 7s or none of them be powered and I run (invisible) power lines through the centre, which is what I may just do because I THINK it will work that way. Switches don't impede movement, do they?
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: akiceabear on March 01, 2015, 07:17:26 PM
Quote from: MsMeiriona on March 01, 2015, 03:16:01 PM
Quote from: Haplo on March 01, 2015, 02:22:29 PM
Ok, just to visualize it I've rebuild your described room. If you watch where you lay the power lines, I don't really see the problem. And the short line you need north of the PowerSwitch can be build with an invisible conduit..
Is this what you mean?
For some reason, when the switch goes off, if there's a power source in range, my lamps always seem to reconnect on their own. It may be mod interference or just my being dumb with how I lay them down. I like to have my bedrooms all nice and neat, 5x7 with a 3 wide hall outside (I'm probably just make the damn thing as an example in a minute) and that means sharing walls, so either all the 5s must be powered or all the 7s or none of them be powered and I run (invisible) power lines through the centre, which is what I may just do because I THINK it will work that way. Switches don't impede movement, do they?

It definitely works with invisible power lines down the center, this is how I build mine.

do remember that you should NOT have a power line and power switch on the same tile. I made this mistake for awhile, and your description sounds like that may be a possibility.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on March 01, 2015, 08:22:12 PM
Quote from: akiceabear on March 01, 2015, 07:17:26 PM
Quote from: MsMeiriona on March 01, 2015, 03:16:01 PM
Quote from: Haplo on March 01, 2015, 02:22:29 PM
Ok, just to visualize it I've rebuild your described room. If you watch where you lay the power lines, I don't really see the problem. And the short line you need north of the PowerSwitch can be build with an invisible conduit..
Is this what you mean?
For some reason, when the switch goes off, if there's a power source in range, my lamps always seem to reconnect on their own. It may be mod interference or just my being dumb with how I lay them down. I like to have my bedrooms all nice and neat, 5x7 with a 3 wide hall outside (I'm probably just make the damn thing as an example in a minute) and that means sharing walls, so either all the 5s must be powered or all the 7s or none of them be powered and I run (invisible) power lines through the centre, which is what I may just do because I THINK it will work that way. Switches don't impede movement, do they?

It definitely works with invisible power lines down the center, this is how I build mine.

do remember that you should NOT have a power line and power switch on the same tile. I made this mistake for awhile, and your description sounds like that may be a possibility.
I think it's more that I'm used to using circuit walls and the way switches look makes them feel clunky and like they take up a lot of room.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Rock5 on March 02, 2015, 01:44:13 AM
I don't know if it's still true with the A9 vanilla switch but if your lamp was connected directly to the A8 PowerSwitch mod switch and it switched off then the lamp would reconnect to the nearest conduit. That is why you needed a bit of conduit after the switch. If you make sure the lamp is connected to the bit of conduit after the switch then it should work as you would expect. You can see in Haplos image that he has a bit of conduit after the switch that the lamp connects to.
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: MsMeiriona on March 02, 2015, 04:12:40 PM
Yup. And I think I can place the bed overtop that bit of conduit with no problem, right? Putting the switch at the bottom of the bed, then conduits the length of the bed, lamp at head of the bed? OR use the advanced lamps wall with light for the wall adjacent to the top tile of the bed. (this -is- compatible with advanced lamps, I  would presume? There's no reason to think it wouldn't be but...)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Haplo on March 02, 2015, 05:19:18 PM
This is just a switch that switches the power transfer through it on and off.
Because of that it should be 99.9% compatible with other mods. :) 
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: 10001110 on March 02, 2015, 05:50:30 PM
This is such a great mod, can't say how much i appreciate the HUGE amount of power savings for all those rooms with heaters, coolers, hallways and whatnot :D
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: cheetah2003 on March 10, 2015, 01:08:26 AM
This is a neat mod, but it doesn't seem to like co-existing with the Expanded Mining v1.01 mod.  The powerswitches lose all additional functions when Expanded Mining is present.   :-\
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Darkhymn on March 10, 2015, 01:32:00 AM
This mod looks incredible. Anything that simultaneously decreases micromanagement and reduces power drain is a-ok in my book!
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Haplo on March 10, 2015, 01:38:23 AM
Quote from: cheetah2003 on March 10, 2015, 01:08:26 AM
This is a neat mod, but it doesn't seem to like co-existing with the Expanded Mining v1.01 mod.  The powerswitches lose all additional functions when Expanded Mining is present.   :-\
Does expanded mining change anything at the vanilla switches?
Try to load PowerSwitch last (deactivate/reactivate the mod)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: cheetah2003 on March 10, 2015, 02:12:56 AM
Quote from: Haplo on March 10, 2015, 01:38:23 AM
Quote from: cheetah2003 on March 10, 2015, 01:08:26 AM
This is a neat mod, but it doesn't seem to like co-existing with the Expanded Mining v1.01 mod.  The powerswitches lose all additional functions when Expanded Mining is present.   :-\
Does expanded mining change anything at the vanilla switches?
Try to load PowerSwitch last (deactivate/reactivate the mod)
Yes it does.  It changes the resources needed for a power switch (from 25 steel to 25 copper.)  I tried using EdbModOrder to move it before and after expanded mining, but no change.  Still completely dysfunctional (though research topics are still present.)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Juujika on March 12, 2015, 08:03:52 AM
Ill get duplicate code-linked translation keys: PowerSwitch_Power in language English
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Haplo on March 12, 2015, 12:00:32 PM
Yes, sorry about that. I forgot to remove the part that was incorporated into the vanilla game. But you can ignore that message. It is harmless :)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Ninefinger on April 05, 2015, 11:10:06 PM
This is a great mod i was wondering however if you would be willing to make a separate mod that only makes the vanilla power switch so it has to be manually toggle-able only, simply because i do not like the idea that you can just turn the vanilla power switch on and off like magic and that is all no other fancy options, just force it so that pawns have to manually toggle it on and off would be fantastic :)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Haplo on April 06, 2015, 02:29:04 PM
I'm thinking about something like that. Not sure right now how extensive the change would be, but we'll see :)
Title: Re: [MOD] (Alpha 9) PowerSwitch (1.9.0 / 22.02.2015)
Post by: Ninefinger on April 06, 2015, 03:31:59 PM
Quote from: Haplo on April 06, 2015, 02:29:04 PM
I'm thinking about something like that. Not sure right now how extensive the change would be, but we'll see :)

No worries, i was hoping it would be really easy to do, either way i hope you figure it out. Have a good one :D
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Haplo on April 17, 2015, 07:03:49 PM
Update to alpha 10
And I've changed some switchings from automatic switching to designation flicking.
The pawn in room detection and the timer are still instant switching, but everything else is changed to flicking
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Kasdar on April 17, 2015, 07:14:43 PM
I would like to see another option, one to turn off power when one of my pawns is nearby.

It would also be nice to be able to set a distance for the automatic pawn activations, and lastly to have multiple options selected.

For example i have spike traps, I want them to turn on if an enemy is seen, but turn off if one of my pawns comes near, so they dont skewer themselves.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Havan_IronOak on April 24, 2015, 10:49:15 PM
I'm new to this mod and it hasn't been working for me, but I think I've figured out the issue and would someone to confirm I'm correct before I do a massive amount of rebuilding.

I'm particularly having trouble with the "power on when an enemy is near" functionality.  As I understood the original description, I placed the switch in its own room with a power-in and a power out connector. The blasted thing refused to ever turn on. After watching one of Tynan's  you-tube videos about how the game's pathing works, I'm guessing that the proximity switch will ONLY work if the enemy is in the same room or if they're both outside. Is that correct?

Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: harpo99999 on April 25, 2015, 06:16:09 AM
the OLD functionality was if the enemy was within 97 tiles it switched on, the CURRENT function is if the enemy is within 97 tiles the switch requests a colonist to switch it (this is from playing the game(both previous versions and the current a10f,d & a), reading the descriptions and noticing the switch request symbol during raids)
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Haplo on April 26, 2015, 10:58:02 AM
Harpo9999 has it right. The only instant switching right now is the pawn detection in room, as it doesn't work with the request system. Everything else just requests the switching. Only the distance isn't fixed. It is 1/3 of the current map size.
This is done to fit them to the vanilla switching type.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: iamthebest22 on April 26, 2015, 11:10:09 AM
Ah I see, is it possible for you to made a version that has automatic switching?
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Haplo on April 26, 2015, 12:23:12 PM
Possible yes, as it was originally like that. But I don't have time for it anytime soon.
But I prefer to only support one version. If most people would prefer the old system over the new system,...
Well see, but unfortunately not too soon. Sorry.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Kasdar on April 26, 2015, 03:17:36 PM
Quote from: Haplo on April 26, 2015, 12:23:12 PM
Possible yes, as it was originally like that. But I don't have time for it anytime soon.
But I prefer to only support one version. If most people would prefer the old system over the new system,...
Well see, but unfortunately not too soon. Sorry.

I would prefer them to switch automatically. As, if i have a switch set to activate when a hostile is near, by the time a pawn flicks the switch, its to late
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Dave-In-Texas on April 26, 2015, 04:06:25 PM
Quote from: Haplo on April 26, 2015, 12:23:12 PM
Possible yes, as it was originally like that. But I don't have time for it anytime soon.
But I prefer to only support one version. If most people would prefer the old system over the new system,...
Well see, but unfortunately not too soon. Sorry.

As an option that wouldn't increase your workload by twice (maintaining two versions, yuk) maybe add a very expensive research topic that allows for automatic flicking and the lower tear one gets renamed to auto-enemy warning (triggers the pawn to go flip that manual switch).
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Rock5 on April 27, 2015, 02:18:50 AM
What? So the sensor on the light detects an enemy and, what?, sends a message to a colonist to come flick a switch? That makes no sense. A sensor light is a sensor light, not a manual switch. I can understand that if you change the setting on the switch a colonist has to go over and change it but, once a sensor is enabled, it should work automatically.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Haplo on April 27, 2015, 03:46:34 AM
I see it a bit different:
It isn't really the switch that switches, but a colonist that has seen an enemy and runs automatically to the switch that he knows that needs to be switched on.
But I admit it could use some tweaks..
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Kasdar on April 27, 2015, 05:46:07 AM
Quote from: Haplo on April 27, 2015, 03:46:34 AM
I see it a bit different:
It isn't really the switch that switches, but a colonist that has seen an enemy and runs automatically to the switch that he knows that needs to be switched on.
But I admit it could use some tweaks..

The problem I see with this is, that unless you have a colonist standing around doing nothing, waiting to flick the switch, then the switch either doesnt get flicked, or gets flicked after its too late for it to be useful.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: GazzaBolton on May 06, 2015, 04:55:38 PM
To add this mod do I need a new world or colony or would it run fine just adding in?

Thanks in advance.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Dave-In-Texas on May 06, 2015, 07:22:22 PM
Quote from: Kasdar on April 27, 2015, 05:46:07 AM
Quote from: Haplo on April 27, 2015, 03:46:34 AM
I see it a bit different:
It isn't really the switch that switches, but a colonist that has seen an enemy and runs automatically to the switch that he knows that needs to be switched on.
But I admit it could use some tweaks..

The problem I see with this is, that unless you have a colonist standing around doing nothing, waiting to flick the switch, then the switch either doesnt get flicked, or gets flicked after its too late for it to be useful.

The switch gets the little diamond 'flick me' icon as soon as an enemy comes within the radius (the point where it used to just turn on) .   I keep all my colonists with flicking at priority 1 and most of the time someone is already headed to the switch before  I can manually order one of them.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: harpo99999 on May 06, 2015, 07:23:41 PM
Quote from: GazzaBolton on May 06, 2015, 04:55:38 PM
To add this mod do I need a new world or colony or would it run fine just adding in?

Thanks in advance.
I have just added the switches mod to a game and it continued without issues other than the switch position in the menus changing
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Reaper on May 18, 2015, 05:42:53 AM
Would it be possible to have a in-wall version? I run alot of my power lines in the walls
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Serpentine91 on June 04, 2015, 09:06:58 PM
So is there any progress on the version with automatic switching/god toggle? After getting used to how switches worked in Alpha 9 I just can't get used to the manual switching.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: harpo99999 on June 05, 2015, 06:46:09 AM
I also do prefer the behavior of the a9 switches atleast for the automatic side, but is almost ok for switching between modes of the switches, eg manual to pawn active or enemy active or timer
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Cefwyn on June 08, 2015, 05:45:05 AM
I'd also prefer the original (automated) switching. For me, that is just what the research is for - to get an an autonomous system that needs no colonist input.

While I'm commenting already anyway:
Is it possible to get the in-wall switch back? Or a more inconspicuous switch?
The in-wall switch was more aesthetically pleasing, and had the added benefit of not needing as much space within the room, making it easier to put down another wire for appliances to connect to.
A more inconspicuous switch (basically just smaller, or placed to the side of the tile) would just look nicer. I just dislike these big circles in the middle of a tile.
Title: Re: [MOD] (Alpha 10) PowerSwitch (1.10.0 / 18.04.2015)
Post by: Haplo on June 09, 2015, 05:59:24 AM
I'm sorry, but for now I won't change the switch.
It's just that I have not enough time for it as I work on something different whenever I have time. And between that and the alpha 11 translation there just isn't any time to do anything to it.
Additionally I just don't have the motivation to work on the switch, as I like it as it is.
Normally I try to make my mods somewhat vanilla compatible, and vanilla right now just means switch designator where ever possible or feasible.
I will most likely do something to satisfy your requests to a degree, but it won't be soon. Sorry.
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: Haplo on June 11, 2015, 04:15:44 PM
Update to Alpha 11.
But I'm sorry, no other changes yet :)
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: Dave-In-Texas on June 11, 2015, 07:19:26 PM
Quote from: Haplo on June 11, 2015, 04:15:44 PM
Update to Alpha 11.
But I'm sorry, no other changes yet :)

How dare you be sorry for updating one of my favorite mods :-)
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: dismar on June 11, 2015, 08:31:23 PM
TY so much! This is one of my fav mods, I feel lost with out it :P
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: Lady Wolf on June 12, 2015, 08:03:53 AM
is there somewhere I can still find the A10 version?

(I'm holding off on moving to A 11 until more of my favorite mods are upgraded to it, like prepare carefully, advanced armory, bulk meals, Enhanced defenses, etc.)
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: JesusKreist on June 12, 2015, 08:20:15 AM
Quote from: Haplo on April 10, 2014, 03:31:29 PM

Download:

  • PowerSwitch 1.11.0 (http://www.mediafire.com/download/t3kijbbalwqmekd/PowerSwitch_1110.zip)
or (http://abload.de/img/32px-red_arrow_right.4xp54.png) (http://static-3.nexusmods.com/15/images/101/1-1394454241.png) (http://www.nexusmods.com/rimworld/mods/21/?)

All versions available starting at the Alpha 3 version ...
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: Dr. Z on June 13, 2015, 07:29:29 PM
Will try this out next time I play and for me it sounds good to keep it vanilla with the manual switch.
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: thefinn on June 15, 2015, 07:32:07 PM
Suggestion: a button that allows you to turn all the old power conduits into hidden ones once you have it researched - not sure how that'd work either ;)
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: Haplo on June 16, 2015, 03:15:38 AM
If I would do that, then all the power lines would suddenly show up as damaged as the hidden ones have a bit higher health. Also it would be a bit unrealistic: You have the lines laying on the ground, you research the material to allow them to be burried underground and they are in the next moment all underground?
I would call that Magic ;)
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: Dave-In-Texas on June 16, 2015, 05:20:27 AM
Quote from: Haplo on June 16, 2015, 03:15:38 AM
If I would do that, then all the power lines would suddenly show up as damaged as the hidden ones have a bit higher health. Also it would be a bit unrealistic: You have the lines laying on the ground, you research the material to allow them to be burried underground and they are in the next moment all underground?
I would call that Magic ;)

think of the 'damage' as the work required to bury the lines perhaps?
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: akiceabear on June 16, 2015, 07:00:46 AM
Quote from: Dave-In-Texas on June 16, 2015, 05:20:27 AM
Quote from: Haplo on June 16, 2015, 03:15:38 AM
If I would do that, then all the power lines would suddenly show up as damaged as the hidden ones have a bit higher health. Also it would be a bit unrealistic: You have the lines laying on the ground, you research the material to allow them to be burried underground and they are in the next moment all underground?
I would call that Magic ;)

I like this logic.

think of the 'damage' as the work required to bury the lines perhaps?
Title: Re: [MOD] (Alpha 11) PowerSwitch (1.11.0 / 11.06.2015)
Post by: thefinn on June 18, 2015, 01:41:16 AM
Quote from: Haplo on June 16, 2015, 03:15:38 AM
If I would do that, then all the power lines would suddenly show up as damaged as the hidden ones have a bit higher health. Also it would be a bit unrealistic: You have the lines laying on the ground, you research the material to allow them to be burried underground and they are in the next moment all underground?
I would call that Magic ;)

How about if they ran around and worked on each one again, in fact if they were all damaged then they'd have to run around and upgrade them anyhow?! Not Magic!
Title: Re: [A11] PowerSwitch (1.11.0 / 11.06.2015)
Post by: Nico46 on June 27, 2015, 01:53:36 AM
This may have been asked before but do you have to start over to use your mod.
I have the power switch already for the base game Alpha 11 and after researching the auto switch there is no switch option on the switch or other one to build. :o
If there is a way to fix this can anyone give me an idea. ???
Title: Re: [A11] PowerSwitch (1.11.0 / 11.06.2015)
Post by: Mrshilka on June 27, 2015, 05:01:54 AM
Thanks for this great mod!, Honestly I say I only use it for the hidden powerline but that alone makes it great!.
Title: Re: [A11] PowerSwitch (1.11.0 / 11.06.2015)
Post by: Haplo on June 27, 2015, 05:13:30 AM
Quote from: Nico46 on June 27, 2015, 01:53:36 AM
This may have been asked before but do you have to start over to use your mod.
I have the power switch already for the base game Alpha 11 and after researching the auto switch there is no switch option on the switch or other one to build. :o
If there is a way to fix this can anyone give me an idea. ???
You can add this mod to your normal game. But all switches who where already built will stay to be the simple vanilla switch. You can activate the godmode and replace the switch to get the new ones, or you have to deconstruct and rebuild it.

Quote from: Mrshilka on June 27, 2015, 05:01:54 AM
Thanks for this great mod!, Honestly I say I only use it for the hidden powerline but that alone makes it great!.
Yes, I have to say, that is one of the best features ;D
Title: Re: [A11] PowerSwitch (1.11.0 / 11.06.2015)
Post by: Othobrithol on August 03, 2015, 01:21:34 PM
Wow, love the newer features. Adding this to my list.

One of the things I have wanted as long as I have been playing was a variant of your switch that would only be "on" when it detects positive power generation on one of the circuits to which it is connected. Useful for an emergency backup battery set (have to manually open it for use, but automatically siphons off power when there is excess generation in the system) or for remote turrets (turret with a battery won't be drained if the main base loses power but will recharge when there is abundant).

Could also lead to some basic logic gates.
Title: Re: [A11] PowerSwitch (1.11.0 / 11.06.2015)
Post by: harpo99999 on August 23, 2015, 02:08:43 AM
haplo, just a quick question regarding the a12 version of the powerswitch mod and when it might be available
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on August 23, 2015, 07:25:17 AM
Here it is: The updated version to alpha 12.
Please let me know if you run into any problems 8)
Title: Re: [A11] PowerSwitch (1.11.0 / 11.06.2015)
Post by: C4ptMiles on September 07, 2015, 12:29:05 AM
Quote from: Othobrithol on August 03, 2015, 01:21:34 PM
One of the things I have wanted as long as I have been playing was a variant of your switch that would only be "on" when it detects positive power generation on one of the circuits to which it is connected.

I would love to see that as well!
Is et even possible to make this?
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: bazalisk on September 08, 2015, 08:11:46 AM
i'm not entirely sure how these PIR sensor switches work

i have them built in each of the room of my compound,  the hidden power lines run throughout all the walls and i have just finished building the switches in the corners of each room too.

set them to motion sensor mode

but when people leave the rooms the lights stay on, indeed the lights never turn off.

the switch has a little round blob on top that shows when the switch is active or not.

but still, the lights stay on.

i have enclosed a pic of my wee colony so far

there is a switch in the dinning room and the room to the left.

non of these seem to do anything :(

any advice would be greatly received :)



[attachment deleted due to age]
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on September 08, 2015, 09:59:40 AM
Remember that the switches CUT the power line. The motion switches also CUT the power lines and CONNECT them when there is motion in the room. So you need to build the power lines like this: - - + - L
With your setup the power doesn't flow over the switch, so the switch can not cut any power line to your lamps.
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: bazalisk on September 08, 2015, 10:07:55 AM
so, could you, and would you be willing to, add a wall section switch?
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on September 14, 2015, 03:46:54 PM
Here is a test version, where I've set the xml, so that you can place the switch on a wall.
Unfortunately I don't have much time to test it right now.
Maybe you can tell me what problems occur? :)

[attachment deleted due to age]
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: bazalisk on September 14, 2015, 05:02:07 PM
you sir, are a star  :D

i will let you know how it plays
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Ectoplasm on September 17, 2015, 03:31:04 AM
A cool little mod! I'll give the wall switch a go today too. Thanks. There is however a niggling problem with it, not the mod itself - but in how any electrical device tries to connect to a power cable. Trying to route a cable (especially in an underground base) So that power only goes to the switch and not the intended electrical device beyond the switch is really quite tricky!

Might it be possible, for a mod to be written that could insulate power cables. I'm thinking along these lines; The cable itself is insulated - power goes in one end, and the only allowed connection point for electrical devices is wherever that specific cable run ends - it's terminal point - where you could change to the default power cable and it's business as usual from there on. Alternatively 'short range' electrical cable that would only allow electrical devices within 1, 2 or 3 tiles for example to draw power through it.

Not sure if either idea is implementable. If they're not let me know and I could post to the suggestions forum, and perhaps our Lord and Master might be willing to implement something (as if he doesn't have enough to do). Anyhoo! Nice mod, but like Oliver Twist - please Sir can I have some more?
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Reko on November 26, 2015, 04:07:45 PM
how do i get each rooms electronics to go off the switch so they are only on when a person is in that room? i put down lamps and heaters but they go off of power lines in the distances?
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: harpo99999 on November 27, 2015, 05:18:00 AM
when that happens to me I click on the lamp and pres the 'b' button that tells the game to connect to another nearby power lead, then click on the next building(heater/light/aircon,etc) and again press the 'b' till it connects to what I want it to
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on November 27, 2015, 02:09:55 PM
If your lamp connects to the wrong side of the power switch, turn off the switch and reconnect the lamp until it connects to the correct cable.
Afterwards the connection will stay where it is :)
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Stonn on December 01, 2015, 07:18:51 AM
Does it work fine with adding the mod to an existing colony? I literally just found out about this mod and am so hyped about the possibility to use it with Sun Lamps =D
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on December 01, 2015, 09:26:26 AM
It shouldn't be a problem to add this to an existing colony.
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: harpo99999 on December 01, 2015, 04:02:23 PM
Quote from: Haplo on December 01, 2015, 09:26:26 AM
It shouldn't be a problem to add this to an existing colony.
I have added haplo's power switches to existing colonies and only had to dismantle existing switches and re-build the switches so that the switches (that were in the colony before) gain all the functions
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: toric on December 05, 2015, 01:15:54 PM
instead of making a new item for the hidden cable, would it be possible for the research to simply remove the beauty penalty from cables? (or reduce it) i like to be able to see my cables.
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: TheNewTeddy on December 12, 2015, 02:15:13 PM
I tried this (with a few other mods, so I can't guarantee this was fully the fault of this particular mod) and upon installing the game paused, and would re-pause itself every tick until I turned off the mod.
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: harpo99999 on December 12, 2015, 03:49:15 PM
Quote from: TheNewTeddy on December 12, 2015, 02:15:13 PM
I tried this (with a few other mods, so I can't guarantee this was fully the fault of this particular mod) and upon installing the game paused, and would re-pause itself every tick until I turned off the mod.
[/quote}had you started a new game or dis-assembled and re-assembled the switches in use?, I can not say I have ever seen a mod causing pauses on each tick, but there is a dev mode option for errors to pause, perhaps this option is on?
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on December 12, 2015, 08:20:17 PM
Quote from: toric on December 05, 2015, 01:15:54 PM
instead of making a new item for the hidden cable, would it be possible for the research to simply remove the beauty penalty from cables? (or reduce it) i like to be able to see my cables.

To make the invisible cables visible, just make the following change:
File: ...\RimWorldAlpha12dWin\Mods\PowerSwitch\Defs\ThingDefs\Buildings_Power_PowerConduit_Invisible.xml
Open with a texteditor and change the following line:
Old:
    <graphicData>
      <texPath>Things/Building/Linked/Alpha_Atlas</texPath>

New:
    <graphicData>
      <texPath>Things/Building/Linked/PowerConduit_Atlas</texPath>
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: TheNewTeddy on December 13, 2015, 11:14:34 AM
yes, I have dev mode on; but that simply means there is an error every single tick.
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: TheNewTeddy on December 13, 2015, 11:24:09 AM
(http://i.imgur.com/PAUCqtU.png)
Title: Re: [A12] PowerSwitch (1.12.0 / 23.08.2015)
Post by: Haplo on December 13, 2015, 03:34:57 PM
Hmm, this is a code part from Alpha 11.
In Alpha 12 there is no longer GenTime but GenDate.

I've seen that I didn't update the sourcecode in the mod.
I'll do that in the next few days, sorry about that.

But this error should only appear if you use the alpha 11 version with alpha 12, or if you've compiled the source code?

Edit:
Found the problem: You've downloaded it from Nexus, didn't you? I'm sorry, I seem to have forgotten to update the version there to alpha 12 :(
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Haplo on December 13, 2015, 03:49:33 PM
NonEssential Update:

-I've updated the SourceCode to reflect the code of Alpha 12
-I've uploaded the mod to Nexus (I've seem to forgotten to upload it there. There still was the alpha 11 version up.. Sorry :( )
-The WallSwitch-Test is still integrated (I think..)
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: TheNewTeddy on December 13, 2015, 06:44:30 PM
Thank you!
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Megafly on January 11, 2016, 08:13:16 PM
Man, this mod rocks! It's truly a must have for this game.

Can I make a request? I could really use a switch that is temperature driven, like a thermostate. I always play on the death-cold maps, and auto control of temperature would be sooooooooo nice (like it is for lamps now).

So, if possible, could you upgrade the switches to behave like a double set thermostate? I mean, power up or power down *below* threshold, or the same for *above* threshold.

Ty much,

Mega.
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: harpo99999 on January 12, 2016, 04:09:52 AM
fyi the HEATERS have a heat to temp, the air cons have a cool to temp, the vents allow slow equalization of the temps between two rooms (but has an interesting effect if there is a room between two vents (have seen this a couple of times where the middle room between two vents gets into negative temps without power consumption in a heat wave in summer when the rooms on both sides are in the thirties))
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Megafly on January 12, 2016, 03:15:07 PM
Quote from: harpo99999 on January 12, 2016, 04:09:52 AM
fyi the HEATERS have a heat to temp, the air cons have a cool to temp, the vents allow slow equalization of the temps between two rooms (but has an interesting effect if there is a room between two vents (have seen this a couple of times where the middle room between two vents gets into negative temps without power consumption in a heat wave in summer when the rooms on both sides are in the thirties))

I am not stupid, I know how to set the heaters and coolers. The problem is that when temp outside is -70C, the heaters can't handle the job and I have to manually start flicking up auxiliary units or loose many crops to freezing. That's where some thermostates would come in handy.

I dont like the idea of hot rooms to pull hot air with vents, they are just a waste of energy when not in use.

So, by the end, that's a no?
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Haplo on January 13, 2016, 03:14:29 AM
I'm not sure right now.
As the actual switch is rather full with informations, this would need a new switch.
The integration itself shouldn't be too difficult, it's more of a time problem (personal free time is rare right now and there are a few other things to work on) and maybe an 'is it really usefull' problem..
I'll think about it, but don't promise anything for now..
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: waffleface on January 30, 2016, 02:15:24 PM
I researched the 'automatic power switch', but it's not showing up under Power or Misc. Where can I find it? My only next researches are timed switches or automatic enemy switch.

Finished research: http://i.imgur.com/MXTdA4p.png

Power menu: http://i.imgur.com/QH41ETG.png
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: harpo99999 on January 30, 2016, 02:39:41 PM
it is additional functions when you select a switch, and additional functions are added to the switch controls when they are researched
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Darkhymn on January 30, 2016, 02:42:16 PM
Quote from: waffleface on January 30, 2016, 02:15:24 PM
I researched the 'automatic power switch', but it's not showing up under Power or Misc. Where can I find it? My only next researches are timed switches or automatic enemy switch.

Finished research: http://i.imgur.com/MXTdA4p.png

Power menu: http://i.imgur.com/QH41ETG.png

It's not a new switch. The mod changes the existing switches. Any switch now will have a power on/off option as well as an option to have the power automatically turn on when it detects movement in the room.
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: waffleface on January 30, 2016, 03:23:16 PM
Then I guess it's not workin' right, or I'm missing something, because my existing switches still look like this: http://i.imgur.com/CLYoH3i.png

Edit: For what it's worth, i'm on A12D, and using the last available download of this mod
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Haplo on January 31, 2016, 01:22:49 AM
You have added this mod to an existing save game, didn't you? Because that is a vanilla power switch. The new power switches show a bit more in the description field.
You need to deconstruct and rebuild the switch, so that the game uses the new switch code.
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: harpo99999 on January 31, 2016, 01:52:10 AM
sorry, haplo, but the quick means of noticing if your switch is active is that the switch is at the right hand end of the power devices, the stock switch is further to the left (usually about the third or fourth button)
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: waffleface on January 31, 2016, 05:45:53 AM
Quote from: Haplo on January 31, 2016, 01:22:49 AM
You have added this mod to an existing save game, didn't you? Because that is a vanilla power switch. The new power switches show a bit more in the description field.
You need to deconstruct and rebuild the switch, so that the game uses the new switch code.

Yep, that did the trick! Thanks
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: lbee on February 16, 2016, 11:06:16 PM
Hi @Haplo,
I like this mod to automate everything for power save. I setup for my Doc room, I want when pawn in this room so light and heater/cooler active. But your switch not worked. I used motion dectection but when pawn lying in bed, it OFF. Try motion detect 7-tile but it active even others pawn running outsite of room. Please help to add new function: Detect pawn exist in room.

Thanks for hard work.
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: harpo99999 on February 17, 2016, 05:35:40 AM
you DID build the switch after activating the switch mod?
in my experience the otion detecting switch DOES detect pawns sleeping in a room when in motion detect in room mode (note not the motion detect in range mode)
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: Acruid on April 09, 2016, 04:56:58 PM
Unofficial A13 update until Haplo returns. The updated source is included, for anyone that wants to improve the code to properly support CompFlickable being seperated from buildings in A13.

[attachment deleted by admin - too old]
Title: Re: [A12] PowerSwitch (1.12.2 / 13.12.2015)
Post by: harpo99999 on April 09, 2016, 05:18:46 PM
thank you,and I hope our master modder haplo returns soon
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Haplo on April 16, 2016, 05:43:15 PM
Thank you for all your work in the time I needed to update this :)

Now I've finally done it and updated it to alpha 13! 8)
You can download it like always on the first page and please let me know if you find any bugs.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: dismar on April 16, 2016, 05:53:11 PM
Quote from: Haplo on April 16, 2016, 05:43:15 PM
Thank you for all your work in the time I needed to update this :)

Now I've finally done it and updated it to alpha 13! 8)
You can download it like always on the first page and please let me know if you find any bugs.

thanks man!
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Lesgalapagos on April 17, 2016, 08:50:27 AM
Many thanks for your work, your mod is one of my prefered.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Simulacrum0 on April 18, 2016, 12:18:53 AM
Haplo can you make the auto in room and auto in range apply directly to lights? having to make 1 per light for the 30+ in my colony is a bit much.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Kirid on April 23, 2016, 12:31:14 AM
"Your colonists got tired of tripping over power conduits. Someone had the brilliant idea of burying them."
Thanks Haplo. This has always been my favorite mod :D
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: WHiZ on April 24, 2016, 12:59:48 AM
the auto for room/range should turn the switch on for an hour then recheck next hour... 

the problem is this... if you have tables or crematoriums attached the bills won't fire because the power is off.. and the power is off cause nobody is in range... and nobody i in range cause the bills wont fire cause the power is off...

if someone does walk in range temp which would turn the unit on to where the bills would start, by the time a person would get to it, it has already turned back off so nobody is able to do those jobs... please consider an hour timer for these switches..

thanks
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: harpo99999 on April 24, 2016, 05:35:27 AM
Quote from: WHiZ on April 24, 2016, 12:59:48 AM
the auto for room/range should turn the switch on for an hour then recheck next hour... 

the problem is this... if you have tables or crematoriums attached the bills won't fire because the power is off.. and the power is off cause nobody is in range... and nobody i in range cause the bills wont fire cause the power is off...

if someone does walk in range temp which would turn the unit on to where the bills would start, by the time a person would get to it, it has already turned back off so nobody is able to do those jobs... please consider an hour timer for these switches..

thanks
personally I use the timer mode of the switches for the crematoria, as far as the tables (eating/socialising), they do not need or use power, but other work benches/tv's/ radios do need power,and again I use the timer mode set to the work hours for the colony
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: WHiZ on April 24, 2016, 10:34:57 AM
Quote from: harpo99999 on April 24, 2016, 05:35:27 AM
Quote from: WHiZ on April 24, 2016, 12:59:48 AM
the auto for room/range should turn the switch on for an hour then recheck next hour... 
personally I use the timer mode of the switches for the crematoria, as far as the tables (eating/socialising), they do not need or use power, but other work benches/tv's/ radios do need power,and again I use the timer mode set to the work hours for the colony

I have multiple work shifts, so there is always someone working. So i'm using the timer function for grow lights which only grow part of the day so i can do that, but for the creme for example, why have it powered all day in my case as all hours are work hours for someone? 99% of the time of which there is nothing to cremate.

Even in your example it is powered when not in use, as i doubt most of work hours it is being used.

Hence why triggering on proximity is such a great function of your switches. They have great potential to improve power handling. The only problem is once triggered on, they trigger off too quickly to be able to be fully used for any purpose other than for lights or turrets etc. As the benches and cremes (the main power suckers) can't get the bills executed well during that short time.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Rock5 on April 24, 2016, 10:37:03 PM
It's never going to be ideal to use a sensor for things like the crematorium, even if you could get it to work under the right circumstances. The easiest solution is just to manually switch on the creme after a battle then switch is of when there are no more bodies. Hmm... Maybe a special 'Detect dead body' sensor could be developed just for the creme.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: WHiZ on April 25, 2016, 11:08:37 AM
Quote from: Rock5 on April 24, 2016, 10:37:03 PM
It's never going to be ideal to use a sensor for things like the crematorium, even if you could get it to work under the right circumstances. The easiest solution is just to manually switch on the creme after a battle then switch is of when there are no more bodies. Hmm... Maybe a special 'Detect dead body' sensor could be developed just for the creme.

my work around is to place a critical stockpile of deadbodies right next to it, so it triggers on when dead bodies are placed there. so you don't really need a special sensor just for it. the problem just is for it as well as the taylor, med benches and such, they don't stay on long enough to fire the bills.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: oreganor on April 26, 2016, 05:09:11 AM
Thanks for this immensely usefull mod. I don't know if I'm misreading its description or something is going wrong with my game. I will explain:

A13 here... I have a weird behaviour on the switches. When using enemy pressence ON, instead of automatically switching a "flick task" is queued, so a Pawn comes and have to click the switch itself. I also have some switches that autoswitch on timer (day/night) and also ones that work as advertised when pawns enter a room and automatically go on/off without Pawn intervention.

Is the "enemy ON" feature working as intended?

The mod was added on an already existing game, but the switches themselves were built after everything was researched.

EDIT: I have other mods active that shouldn't collide... But before going on a "witch hunt" to detect potential interactions I want to be sure I'm reading correctly how the "enemy on" feature is intended to work.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: harpo99999 on April 26, 2016, 05:14:51 AM
Quote from: oreganor on April 26, 2016, 05:09:11 AM
Thanks for this immensely usefull mod. I don't know if I'm misreading its description or something is going wrong with my game. I will explain:

A13 here... I have a weird behaviour on the switches. When using enemy pressence ON, instead of automatically switching a "flick task" is queued, so a Pawn comes and have to click the switch itself. I also have some switches that autoswitch on timer (day/night) and also ones that work as advertised when pawns enter a room and automatically go on/off without Pawn intervention.

Is the "enemy ON" feature working as intended?

The mod was added on an already existing game, but the switches themselves were built after everything was researched.
it is working the same as themod did in a12(wehre haplo changed the function of the switching) so would be Working As Designed
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: oreganor on April 26, 2016, 05:19:30 AM
A great... Thanks for the reply. I will just relay on manual activation for those then as I was using those just for bringing shields up automatically, but as my roster is limited I can't afford to have non soldier pawns active when Raids are happening.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Haplo on April 26, 2016, 08:50:00 AM
Yes indeed it is working as intended. The reason the enemy switch is only flickable and not autoswitching is that it should effectively be a colonist that detects the raid and he/she will then switch it. So the switch is only a helper ;)
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: oreganor on April 26, 2016, 12:03:00 PM
QuoteYes indeed it is working as intended. The reason the enemy switch is only flickable and not autoswitching is that it should effectively be a colonist that detects the raid and he/she will then switch it. So the switch is only a helper ;)

Ah k... It's a way to "rationalize it" without resorting to "IFF motion sensors" and exotic tech like that...

...So the "motion in room" in reality just simmulates RL... Some1 that enters a dark room, the 1st thing he/she does is looking for the switch...

...I get it, thanks for the replies.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Mathenaut on April 26, 2016, 03:00:19 PM
Quote from: Haplo on April 26, 2016, 08:50:00 AM
Yes indeed it is working as intended. The reason the enemy switch is only flickable and not autoswitching is that it should effectively be a colonist that detects the raid and he/she will then switch it. So the switch is only a helper ;)

Doesn't that defeat the entire point of the feature? If it has to be done manually anyways, then this part isn't doing anything.

Overall, I like the mod. Some of the research gates seem arbitrary though.
Title: Re: [A13] PowerSwitch (0.13.1 / 16.04.2016)
Post by: Rock5 on April 27, 2016, 12:33:55 AM
Quote from: Mathenaut on April 26, 2016, 03:00:19 PM
Quote from: Haplo on April 26, 2016, 08:50:00 AM
Yes indeed it is working as intended. The reason the enemy switch is only flickable and not autoswitching is that it should effectively be a colonist that detects the raid and he/she will then switch it. So the switch is only a helper ;)

Doesn't that defeat the entire point of the feature? If it has to be done manually anyways, then this part isn't doing anything.

Overall, I like the mod. Some of the research gates seem arbitrary though.
The colonist still needs to flick the switch but you don't have to designate it to be switch manually. No more forgetting to switch on those turrets until it's too late.
Title: Re: [A14] PowerSwitch (0.14.1 / 17.07.2016)
Post by: Haplo on July 17, 2016, 11:15:22 AM
Finally updated to alpha 14 (non-Steam)  8)

I've finally found some time to update this for the non-steam forum.
Sorry that it took this long..
Title: Re: [A14] PowerSwitch (0.14.2 / 01.08.2016)
Post by: Quad on August 04, 2016, 10:30:23 PM
Quick question:

Is it safe outside in the rain without a roof? Or would there be a chance of an electrical short event?
With the new alpha I know it's easy now to build a one cell wall with a 2 cell over hanging roof now but still just curious.

BTW big fan of this mod you've done a stellar job :) so thanks.

Title: Re: [A14] PowerSwitch (0.14.2 / 01.08.2016)
Post by: Elysium on August 05, 2016, 12:54:47 AM
This mod is great, I use it for controlling a sun lamp to turn off when resting occurs.
Title: Re: [A14] PowerSwitch (0.14.2 / 01.08.2016)
Post by: Monzer on August 16, 2016, 09:28:17 PM
Ok great mod thanks for the efforts . I setup a powerswitch to my production room with motion 7 feet , when the colonist have to craft and the power off he is idle because power is off not sure if that can be fixed because they just think that power is off . but it works great for my medical room as they dont need power for hospital beds when they bring a patient the heater , lambs , monitor goes on .
Title: Re: [A14] PowerSwitch (0.14.2 / 01.08.2016)
Post by: harpo99999 on August 30, 2016, 09:56:10 PM
haplo, is there any chance for an update to a15?
Title: Re: [A15] PowerSwitch (0.15.1 / 01.09.2016)
Post by: Haplo on September 01, 2016, 05:54:10 PM
The update to alpha 15 is here :)
Title: Re: [A15] PowerSwitch (0.15.1 / 01.09.2016)
Post by: harpo99999 on September 01, 2016, 06:21:26 PM
thank you
Title: Re: [A15c] PowerSwitch (0.15.2 / 03.09.2016)
Post by: grffnhwk on October 04, 2016, 09:54:06 PM
I'm loving this mod.  Discovering new fun ways of saving power every game.  Here's my latest and favorite:
Setup 2 timer controlled switches side by side.  Input uncontrolled power coming in to the first switch set for turn on 17h - 08h.  Set the second switch to be on 04h - 22h. Build a conduit out of the 2nd switch and hook your pawns room lights up.  Now the lights will only be on from 04h - 08h and 17h - 22h.  The main hours that the pawns would be messing around in their rooms.  It's so nice having this much control over their power use. 

Also means your night owls get to sleep in the dark too. :)
Title: Re: [A15c] PowerSwitch (0.15.2 / 03.09.2016)
Post by: faltonico on October 05, 2016, 11:15:19 PM
Hello there!
First of all, thank you for all your work, i really apreciatte it! (=
But I might be getting blind (too much late night play), i don't see any of the automated switches! Dx
I did all of the research, i and got all the other stuff this mod does, ¿where are they supposed to be? I'm using the version for Alpha 15.

Thank you!

Edit:
NVM -_-'
In the description you didn't say you must not connect them to wires for them to work as automated switches.
But it works great! this is a game changer =)
Title: Re: [A15c] PowerSwitch (0.15.2 / 03.09.2016)
Post by: mazacik on November 25, 2016, 02:42:07 PM
Would you consider adding a short-range hostiles detection option? It would help during prison breaks, as an example.
Title: Re: [A15c] PowerSwitch (0.15.2 / 03.09.2016)
Post by: harpo99999 on December 24, 2016, 07:39:49 AM
any chance of updating this must have to play mod?
Title: Re: [A15c] PowerSwitch (0.15.2 / 03.09.2016)
Post by: asquirrel on December 24, 2016, 07:37:45 PM
Missing those hidden power conduits for Alpha 16.  It's like something that should have been in the game at the beginning.  Also that circuit breaker mod. Zzzt.
Title: Re: [A15c] PowerSwitch (0.15.2 / 03.09.2016)
Post by: Tinkerer on January 02, 2017, 06:29:29 PM
A16 update please??? :)
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: Haplo on January 18, 2017, 03:40:38 PM
Sorry, I've forgotten to update the Forum, so here it is:

The UPDATE to Alpha 16
Better late then never... 8)
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: asquirrel on January 18, 2017, 05:02:14 PM
Quote from: Haplo on January 18, 2017, 03:40:38 PM
Sorry, I've forgotten to update the Forum, so here it is:

The UPDATE to Alpha 16
Better late then never... 8)

Holy carp!  Thanks man!! :)
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: gendalf on February 14, 2017, 07:45:46 AM
it looked useful until I've realized that pawns don't actually go to the room if the workbench is turned off, because they can't access that workbench, which makes motion detection in rooms only usable for AC, lamps and multianalyzer.
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: Vetrogor on March 04, 2017, 01:00:58 PM
Enemy detection doesn't work usefull. When raid occures I draft all colonists with single button (thanks to Defensive Positions mod). Nobody able to swich when drafted. I need to  manualy undraft one colonist to switch. And then I need to watch on him. If I not draft colonists I loose time. So I forced to check every colonist to find who is flicking and then draft others. After few times I just forget about this function. It should work fully automatically, IMHO.

Motion detection works fine but colonist can't do their jobs when power is off. I just use timer instead.

Hidden conduits are very good!
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: Canute on March 04, 2017, 02:34:03 PM
Maybe Repower https://ludeon.com/forums/index.php?topic=30734.0
Is what you are looking for, it lower power cost for idle table.

Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: Vetrogor on March 09, 2017, 04:31:16 PM
Yes. This what I look for.
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: oreganor on March 16, 2017, 04:34:04 PM
Hi, Haplo, maybe it's a bit strange question but...

...Is the source code provided in the download up-to-date?

Some extra background: I finnally want to learn how to dig deeper into Rimworld modding so I decided to start a small project to make your powerswitch into an OR system, were diferent modes could be active at the same time... Nothing too fancy (In fact you can build this ingame just linking different switches on different modes to the same "root" were you link the rest of the items requiring "selective" powering), and inspecting your sources, should be really easy but, I repeat, I consider this my "tutorial" on how to get things done.

OFC, I'm in the 1st step... Which is configuring my IDE (VS 2017) and trying just to compile your source code to get your original .dll, to be sure eveything is set up in the right way. I'm getting some errors probably because I'm not referencing properly the 2 extra dlls needed, so I'm trying to figure out were I made the mistake (I see all Verse related classes on the object inspector... But for some reasson at compiling time, for example, "public override void SpawnSetup()" is refusing to acknowledge that the base class, in fact, has it) but...

...I'm also getting errors related to some members, the most notable Find, which have some members converted to lists (For example, Map -> Maps on A16)...

...So to fight problems one at a time and as, obviously, your mod is working happily on my A16 game, I wanted to be sure sources were synched with the .dll, before banging my head against the wall while trying to find the obscure options I'm not using correctly to be able to compile :).
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: Haplo on March 17, 2017, 06:44:10 AM
Hmm, now that you ask.. I think I've forgotten to update it.. Sorry 8)

Here is the correct source file

[attachment deleted by admin due to age]
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: oreganor on March 17, 2017, 10:44:03 AM
Ah man... Sweet, thanks a lot. I must admit that curiosity took the better of me and I already got a powerswitchOR working with the old sources on my A16 game :).

But I will redo the modifications starting from your own migration to A16, more "practice" using an expert code as guide is very satisfying and quite enlightening.

EDIT:

The new powerswitchOR are happily working now on my A16 colony.

Over the course of the tests I stumbled on an oddity, any electrical producer that comes with a default cable net (In my example was a Solar Panel) is superposing itself to the hidden power conduits (Instead of removing them as it happens with the regular conduits), this triggers a cascade of constant yellow warnings on the log about duplicated power in a cell each time a powerswitch changes (which I assume that, as it reconfigures the network it's linked to, also triggers all kind of checking events on the whole net). Not crippling, but I suppose you would want to know about it.
Title: Re: [A16] PowerSwitch (0.16.2 / 018.01.2017)
Post by: Modo44 on April 18, 2017, 03:48:26 AM
The timed power switch is preset to 06:00 through 20:00 instead of what the mod description says. It's a minor inconvenience to adjust it to 05:00 through 19:00 for correct plant growth timing. Maybe you could fix that for the next release.
Title: Re: [A17] PowerSwitch (0.17.1 / 24.05.2017)
Post by: Haplo on May 24, 2017, 03:53:14 PM
This time as soon as possible:
The PowerSwitch is UPDATED to Alpha 17!
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Th3Eagle85 on August 13, 2017, 12:46:40 PM
Haplo thank you for this great mod. I just enjoy seeing all the lights flick on/off when pawns enter/leave the rooms and how it enables me to select certain times zones for research/production/etc.

The only thing I noticed not working correctly is the on/off for enemy detection. Instead of flipping the switch it requests an pawn to switch it on/off. This might be intentional, but from the description it seems it should work the same as normal pawn detection.
0
I tried to make some changes (no experience just looking at the code and trying to make sense of it all, it looked as if "flickableComp.SwitchIsOn = true; // No designator usage!" was missing in the enemy detection criteria since it it present in the pawn range switch) in the "Building_PowerSwitch.cs" source file but the changes are not showing up in older or new save games.

If you have the time (and desire) could you confirm if this behavior is intentional or a bug and if it is a bug help solve the issue?
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Canute on August 13, 2017, 01:19:12 PM
So far i remember, there is a button to switch from friends to enemies. I think it was green for detect friends you need to switch to red for enemies.
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Th3Eagle85 on August 13, 2017, 01:44:04 PM
Quote from: Canute on August 13, 2017, 01:19:12 PM
So far i remember, there is a button to switch from friends to enemies. I think it was green for detect friends you need to switch to red for enemies.

You correct, these are options when the switch is selected. When selecting the enemy detect, this switch info will indicate that enemy selection is on. When an enemy is within the detection range the switch will initiate the on/off event, however it will not turn on automatically and ask a pawn to flip the switch.

With detection options for a friendly pawn (in a room or 7 grid distance) the switch is turned on/off automatically. I am assuming this should be the same behavior for the enemy detection and that there is a bug in the code.
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Maladapted on September 03, 2017, 02:05:54 AM
Anyone got the zip for powerswitch 16.2? The nexus downloads don't work.
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: 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
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Maladapted on September 03, 2017, 03:36:42 AM
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"
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: NemesisN on October 11, 2017, 05:16:16 PM
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
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: 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 :)
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: NemesisN on October 13, 2017, 09:20:43 AM
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.
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Haplo on October 13, 2017, 02:20:18 PM
The range should be: Inside a room: The full room; outside: 7 cells
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: NemesisN on October 13, 2017, 04:20:27 PM
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 ?
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: wedekit on October 13, 2017, 04:30:12 PM
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.

(https://s1.postimg.org/4dzm55i4jv/Haplospowerswitch.png) (https://postimg.org/image/4dzm55i4jv/)

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. 
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: 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)
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: Canute on October 14, 2017, 03:47:34 AM
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.

Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: wedekit on October 14, 2017, 08:29:27 PM
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.
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: wreckcelsior on November 17, 2017, 07:03:48 PM
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.
Title: Re: [A17] PowerSwitch (0.17.6 / 09.06.2017)
Post by: harpo99999 on November 25, 2017, 04:53:47 PM
haplo,any idea when the power switch will be updated to b18?
Title: Re: [B18] PowerSwitch (0.18.1 / 27.11.2017)
Post by: Haplo on November 27, 2017, 11:38:16 AM
It took a while, but finally I remembered to update the forum :-[

So finally here it is:
The B18 version of PowerSwitch
Title: Re: [B18] PowerSwitch (0.18.1 / 27.11.2017)
Post by: harpo99999 on November 27, 2017, 04:29:19 PM
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
Title: Re: [B18] PowerSwitch (0.18.1 / 27.11.2017)
Post by: Johnny_Bandit on December 19, 2017, 05:06:18 AM
So I've noticed that manhunter packs don't set off the enemy detection, is that suppose to be like that?
Title: Re: [B18] PowerSwitch (0.18.1 / 27.11.2017)
Post by: asquirrel on December 19, 2017, 08:08:56 PM
Thanks for the update dude! :)
Title: Re: [B18] PowerSwitch (0.18.3 / 29.01.2018)
Post by: Haplo on January 29, 2018, 04:20:01 PM
Update
Due to popular demand I've added some mod settings.
Currently you have the following two settings:
- Switch Enemy Detection via Designator On/Off
   --> Off means it will switch directly, no pawn to switch it required. (Standard still is ON)
- Enemy Detection range (in percent of map size)
Title: Re: [B18] PowerSwitch (0.18.3 / 29.01.2018)
Post by: Angelix on March 01, 2018, 09:59:18 AM
Man-hunter animals as "enemy" option please
Title: Re: [B18] PowerSwitch (0.18.3 / 29.01.2018)
Post by: Haplo on July 23, 2018, 12:41:12 PM
Updated this to unstable 1.0 on GitHub (https://github.com/HaploX1/RimWorld-PowerSwitch)
Title: Re: [B18] PowerSwitch (0.18.3 / 29.01.2018)
Post by: Th3Eagle85 on July 23, 2018, 02:26:22 PM
Thank you very much Haplo for the update   :)
Title: Re: [B19] PowerSwitch (0.19.2 / 13.09.2018)
Post by: Haplo on September 13, 2018, 12:35:57 PM
Official update of the forum version ;D
Title: Re: [B19] PowerSwitch (0.19.2 / 13.09.2018)
Post by: Kangoshi on September 23, 2018, 04:20:18 AM
How does more materials to make it hidden make sense? Isn't it require additional work to hide the same cable? Just like waterproof cables made entirely out of metal - doesn't make any sense. ???
My two cents. :)
Title: Re: [B19] PowerSwitch (0.19.2 / 13.09.2018)
Post by: Naji on October 11, 2018, 06:15:08 AM
Quote from: Haplo on September 13, 2018, 12:35:57 PM
Official update of the forum version ;D

Would you also update the mod on github, because when selected from the mod list it shows for version 0.18.etc.
Title: Re: [B19] PowerSwitch (0.19.2 / 13.09.2018)
Post by: Haplo on October 11, 2018, 11:36:14 AM
Hmm, GitHub is updated BEFORE the forum :)
The current Version on GitHub is 1.0 unstable. But.. If you mean the version of the .dll, yes that may still be 0.18, since I regularly forget to increase the version number inside the dll  8)
Title: Re: [1.0] PowerSwitch (1.0.0 / 17.10.2018)
Post by: Haplo on October 17, 2018, 11:40:04 AM
Update for the Official Release 1.0

Aaannnd.. updated... :)
This time the forum is updated first.
Steam will follow soon(TM).
Title: Re: [1.0] PowerSwitch (1.0.0 / 17.10.2018)
Post by: wreckcelsior on November 06, 2018, 04:29:37 PM
Thanks for all the updates.

cheers.
Title: Re: [1.0] PowerSwitch (1.0.0 / 17.10.2018)
Post by: account13123 on May 19, 2019, 11:28:40 AM
What's the status of the wall switch? The description mentions it, but people on Steam were saying it's broken, and there isn't a thingdef for it in the mod
Title: Re: [1.0] PowerSwitch (1.0.0 / 17.10.2018)
Post by: Haplo on May 22, 2019, 04:12:39 PM
Currently the wallswitch is not possible.
I just can't figure out what I do wrong in the xml-patch-configuration to still have the walls deconstructed when the switch is built..  :-\
Not my day...  :(
Title: Re: [1.0] PowerSwitch (1.0.0 / 17.10.2018)
Post by: Vectricity on May 22, 2019, 10:03:38 PM
Quote from: Haplo on May 22, 2019, 04:12:39 PM
Currently the wallswitch is not possible.
I just can't figure out what I do wrong in the xml-patch-configuration to still have the walls deconstructed when the switch is built.
Would the solution not be to set isEdifice to false in defs?

Hope I understand your message correctly. It sounds as though you want the construction of the switch to not affect the wall. Is this accurate?
Title: Re: [1.0] PowerSwitch (1.0.0 / 17.10.2018)
Post by: Haplo on May 23, 2019, 03:25:14 AM
I knew it was something simple that I missed..
Thanks, I'll test it when I'm home :)

Edit:
Yes, that was the missing part!
I've uploaded the changes to GitHub for now. Steam comes later :)
Title: Re: [1.0] PowerSwitch (1.0.2 / 23.05.2019)
Post by: Jovzin on May 24, 2019, 03:12:32 AM
HEllo,
So can I use this mod to disable some lights during the night in the bedrooms ?  I am reading in issues tab that it will not work bcs somebody will come and set the lights back on ? 

I was downloading mainly this mod for this purpose to turn off the lights during nights when ppl are sleeping in their beds.   
And for turning off hte stove /  smelter / heater in summer / ventilation in winter  etc...

But mainly I wanted to shut down the lights during sleep time. Nobody ( at least me ) wants to sleep with light turns on :) 
Title: Re: [1.0] PowerSwitch (1.0.2 / 23.05.2019)
Post by: Canute on May 24, 2019, 03:21:58 AM
There is no sleeping sensor, but
Quote-Timed switching (programable)
should fit you needing.
Title: Re: [1.0] PowerSwitch (1.0.2 / 23.05.2019)
Post by: harpo99999 on February 26, 2020, 11:32:28 PM
haplo, the power switch vanishes when built in 1.1 using the latest 1.0 version.
is there any change of an update?
Title: Re: [1.0] PowerSwitch (1.0.2 / 23.05.2019)
Post by: Haplo on February 27, 2020, 05:53:20 AM
Ah sorry, I forgot do do this :-[
It will take a small while as I'm currently not home, but... soon(TM)  8)