Page 1 of 2

[0.11.x] Power-Switch-Mod v0.2.0

Posted: Tue Aug 26, 2014 11:30 am
by drs9999
Power-Switch-Mod

Description:
This mod adds 3 power-switches to the game.

How to use:
Craft it and place it inbetween you power-lines. Currently there are 3 different kinds of switches:
The basic or manual switch, this can be toggled manually, to do so click on it with any placeable item attached to your cursor.
The and-switch, this one closes the connection if all specified circuit conditions are true.
The or-switch, this one closes the connection if at least one specified conditions is true.
Both, and-/or-switches can be deactivated by clicking on it with any placeable item attached to your cursor.

Note: As the mod-name says this are power-only switches, which means the switches won't (re-)connect any circuitwire

Image


Installation:
Just put the downloaded *.zip file into the mods-folder


Changelog:

Code: Select all

0.2.0:
- added "smart"-switches (and- & or-gate)
0.1.0:
- ported to Factorio 0.11.0
0.0.2:
- fancy graphics (thanks to YuokiTani)
0.0.1:
- Initial release
Download:
FOR FACTORIO 0.11.x:
Works in SP and MP
http://www.mediafire.com/download/d8q24 ... _0.2.0.zip

FOR FACTORIO 0.10.12:
DL- link with ads to support me:
http://adf.ly/6330846/psm002
DL-link with no ads:
http://adf.ly/6330846/psm002n

Re: [0.10.x] Power-Switch-Mod

Posted: Thu Aug 28, 2014 5:02 am
by TheCardinal
Nice ! This is a mod i've been waiting for. I hardly can wait for the conditional swith.

Re: [0.10.x] Power-Switch-Mod

Posted: Sat Sep 06, 2014 3:32 pm
by YuokiTani
okay i had test this mod before i make the icon ^^ - but its sounds so good and useful

i'am not sure which graphics fit's best, maybe variant 2 is easier to connect with wire

icon:Image
variant-1:ImageImage
variant-2:ImageImage

Re: [0.10.x] Power-Switch-Mod

Posted: Sun Sep 07, 2014 8:41 pm
by JJGG
I love this mod! No more creating/destroying power lines when testing new inserted configurations.

YuokiTani, really nice work on the icons. Variant two in particular looks really nice with the drop shadow.mjust a little thing: I'm an electrician, and most disconnects (come to think of it, most switches) are On when the lever is in the up position, and Off when the lever is down. Maybe consider swapping them? Still really nice work.

Re: [0.10.x] Power-Switch-Mod

Posted: Tue Sep 09, 2014 1:16 am
by Kane
Thank you. Working just fine in 0.10.9. Going to add it to my gameplay.

Re: [0.10.x] Power-Switch-Mod

Posted: Tue Sep 09, 2014 7:06 pm
by YuokiTani
JJGG wrote:I love this mod! No more creating/destroying power lines when testing new inserted configurations.

YuokiTani, really nice work on the icons. Variant two in particular looks really nice with the drop shadow.mjust a little thing: I'm an electrician, and most disconnects (come to think of it, most switches) are On when the lever is in the up position, and Off when the lever is down. Maybe consider swapping them? Still really nice work.
I knew something was wrong - too good to be correct in first try ;)

corrected and added the maybe future-version with automatic switch

ImageImage
ImageImage

Re: [0.10.x] Power-Switch-Mod v0.0.2

Posted: Sat Sep 13, 2014 10:05 am
by drs9999
Thanks for the sprites! My mods would look some much worse without your contributions!

Re: [0.10.x] Power-Switch-Mod v0.0.2

Posted: Sun Sep 14, 2014 4:41 pm
by YuokiTani
drs9999 wrote:Thanks for the sprites! My mods would look some much worse without your contributions!
no problem, i benefit from your mods ingame - so i want to look these nice.
you have the great ideas - and sometimes i can make a suitable sprite :)

Re: [0.10.x] Power-Switch-Mod v0.0.2

Posted: Mon Sep 15, 2014 9:39 pm
by Devildog
I like this mod.
Thanks Drs, for creating really great mods!
YuokiTani, Nice work on the icons.

Re: [0.11.x] Power-Switch-Mod v0.1.0

Posted: Fri Oct 31, 2014 5:12 pm
by drs9999
updated to Factorio 0.11.0!

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Mon Nov 03, 2014 2:27 pm
by drs9999
Uploaded a new version that introduces "smart"-switches which be be controlled via circuit-conditions.

I was able to test it in singleplayer only, but it should work in multiplayer as well, otherwise please let me know.
I'll create a new post after I tested it in multiplayer.

Enjoy!

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Mon Nov 03, 2014 4:40 pm
by drs9999
Ok. Tested and confirmed that it worked in MP!

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Mon Nov 03, 2014 7:38 pm
by vedrit
So....are these conditions from just the regular logistics system, or....? A little more explanation would be appreciated

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Tue Nov 04, 2014 4:01 pm
by drs9999
Indeed!
So I came up with this (not so useful) setup:
Image

The left And-Switch* controls the power for the 2 inserters in the blue circles. So if there are less than 30 iron-plates in the chest between the assembling-machines it will transmit power.

The And-Switch* in the middle controls the power for the 2 inserters & wire-assembling-machine(green circle). If there are less than 30 copper-wires in the chest between the assembling-machines it will transmit power.

On the right you can see 2 And-Switches in series, so basically one big and-gate. It will only transmit power (to the entities in the orange-circle) if there are more than 20 iron-plates and more than 20 copper-wires in the center-chest and if there are less than 20 ICs in the top-chest

I also placed a manual-switch next to each gate to manually bypass the condition.

[*] if you only check a single condition it doesn't matter if you use And- or Or-Switches.

Summarized in pseudo-code:

Code: Select all

AND-SWITCH:
if (red-wire-condition == true) and (green-wire-condition == true) and (lognet-condition == true) then
    Transmit_Power
end

OR-SWITCH:
if (red-wire-condition == true) or (green-wire-condition == true) or (lognet-condition == true) then
    Transmit_Power
end

Note: If a condition isn't specified it isn't used to determine the behaviour
P.S.: I'm aware that this isn't a very useful setup, actually it is much easier to use smart-inserters to achieve the same. However I think it's a good example to explain the basic behaviour.

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Tue Nov 04, 2014 8:25 pm
by vedrit
Cool. I can see where this would have a purpose. Replace several smart inserters with one or two smart switches. Handy

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Tue Dec 23, 2014 7:43 pm
by webber
Not working for me in MP in 11.8

with all dytech mods, treefarmmod and a few more minor mods.

specifically tested with and without this mod. may related to another mod tho.

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Mon Feb 16, 2015 10:43 pm
by Angelix
got problem. switches are messing with wiring
Image
and then i "switch" it off
Image
and power persist
and then i "switch" it back on
Image

i think behavior of power lines to recreate themselves on pole deletion is culprit

UPD. fixed images

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Wed Feb 18, 2015 5:52 am
by SuperSandro2000
pics aren ot showing.

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Sun Feb 22, 2015 2:41 pm
by Kane
Another great mod that I install and have good intentions for it but never actually use it. Maybe this time around I will remember to do something with it. Maybe for backup systems.

Re: [0.11.x] Power-Switch-Mod v0.2.0

Posted: Wed Feb 25, 2015 4:04 pm
by Kane
Since you seem to be active I did not bother uploading a clean version. But you left robot build debug message in the game on line 90 in the control.lua
game.player.print("robotbuilt")

I went ahead and deleted for myself but man it was annoying to figure out what mod it was from!
Thanks.