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

Topics and discussion about specific mods
drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

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

Post 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
Last edited by drs9999 on Mon Nov 03, 2014 4:41 pm, edited 5 times in total.

TheCardinal
Burner Inserter
Burner Inserter
Posts: 14
Joined: Tue May 27, 2014 6:35 am
Contact:

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

Post by TheCardinal »

Nice ! This is a mod i've been waiting for. I hardly can wait for the conditional swith.

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

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

Post 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

JJGG
Manual Inserter
Manual Inserter
Posts: 1
Joined: Sun Sep 07, 2014 8:37 pm
Contact:

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

Post 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.

Kane
Filter Inserter
Filter Inserter
Posts: 660
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

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

Post by Kane »

Thank you. Working just fine in 0.10.9. Going to add it to my gameplay.

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

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

Post 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

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

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

Post by drs9999 »

Thanks for the sprites! My mods would look some much worse without your contributions!

YuokiTani
Smart Inserter
Smart Inserter
Posts: 1037
Joined: Thu May 08, 2014 7:57 pm
Contact:

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

Post 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 :)

User avatar
Devildog
Fast Inserter
Fast Inserter
Posts: 170
Joined: Tue Aug 19, 2014 8:19 pm
Contact:

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

Post by Devildog »

I like this mod.
Thanks Drs, for creating really great mods!
YuokiTani, Nice work on the icons.
Last edited by Devildog on Sat Apr 18, 2015 8:54 am, edited 1 time in total.
Image
Check Out Factorio Mod Madness 2.0 Here : http://bit.ly/1afTDl0
Mod Madness ModPack

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

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

Post by drs9999 »

updated to Factorio 0.11.0!

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

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

Post 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!

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

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

Post by drs9999 »

Ok. Tested and confirmed that it worked in MP!

vedrit
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sun Aug 03, 2014 2:25 am
Contact:

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

Post by vedrit »

So....are these conditions from just the regular logistics system, or....? A little more explanation would be appreciated

drs9999
Filter Inserter
Filter Inserter
Posts: 831
Joined: Wed Mar 06, 2013 11:16 pm
Contact:

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

Post 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.

vedrit
Filter Inserter
Filter Inserter
Posts: 289
Joined: Sun Aug 03, 2014 2:25 am
Contact:

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

Post by vedrit »

Cool. I can see where this would have a purpose. Replace several smart inserters with one or two smart switches. Handy

webber
Burner Inserter
Burner Inserter
Posts: 16
Joined: Fri Aug 22, 2014 11:08 pm
Contact:

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

Post 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.

Angelix
Manual Inserter
Manual Inserter
Posts: 1
Joined: Mon Feb 16, 2015 10:35 pm
Contact:

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

Post 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
Last edited by Angelix on Wed Feb 18, 2015 11:11 am, edited 1 time in total.

User avatar
SuperSandro2000
Filter Inserter
Filter Inserter
Posts: 732
Joined: Sun Jan 12, 2014 3:54 am
Contact:

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

Post by SuperSandro2000 »

pics aren ot showing.

Kane
Filter Inserter
Filter Inserter
Posts: 660
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

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

Post 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.

Kane
Filter Inserter
Filter Inserter
Posts: 660
Joined: Fri Sep 05, 2014 7:34 pm
Contact:

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

Post 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.

Post Reply

Return to “Mods”