Page 1 of 6

[MOD 0.11.22] Smart Circuit Systems - 0.3.8

Posted: Thu Oct 30, 2014 8:50 pm
by Kikkers
The mod seems to work with Factorio v0.11.22

Mod for factorio that (currently) adds six items, all capable of interacting with the circuit network:
  • A device that can switch most machines on or off on a wire condition.
  • A wire switcher that works on a wire condition.
  • A sensor for the contents of a pipe.
  • A sensor for the charge of an accumulator.
  • An electric pulse sensor, which detects the instant the connected power network switches from charging to discharging, and vice versa.
  • A sensor for items lying on the ground and the contents of nearby (primitive) inventories. (see the readme for more details)
More details, version history and source: https://github.com/Kikkers/Factorio_Sma ... it-Systems
Quick download link: https://github.com/Kikkers/Factorio_Sma ... master.zip


This mod is basically me being impatient. Try it out, have fun.

Please note that I'm not actively working on the mod anymore. If you have any issues or suggestions, you could discuss them in this thread, or you might want to try your hand on improving the mod yourself (All source files are public domain and not too difficult to understand).

Re: Smart Fluid Mod

Posted: Thu Oct 30, 2014 11:07 pm
by Kikkers
I had to fix a few issues concerning the naming of the mod (yes, I should've read the announcement more carefully). That should work now.

One issue I'm still having is with the item icons for the fluid unit items, they seem cropped ingame to a smaller size, while I'm expecting them to be 32x32. If you have any ideas on that, please share?

Re: Smart Fluid Mod

Posted: Thu Oct 30, 2014 11:20 pm
by JamesOFarrell
This is awesome, I've been hoping someone would do this for a while now. I like the hack for using the smart inserters for wire conditions.

Edit: looks like the recipes are all set to 1 Iron plate still.

Re: Smart Fluid Mod

Posted: Thu Oct 30, 2014 11:26 pm
by Kirk
Icons are not cropped for me.

The recipe should just include one smart inserter and one small pump, and the other one one storage tank and one smart chest XD

Maybe some electronic circuits as well.

Re: Smart Fluid Mod

Posted: Thu Oct 30, 2014 11:33 pm
by JamesOFarrell
This mod has all the code it needs for an accumulator that reports it's power storage and a power-pole that can be turned on and off with circuit conditions which will automate power systems as well. I am not sure if you are interested in increasing the scope of your mod but I would love to have these items if you are.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 12:37 am
by HeilTec
This is a very nice idea. I have downloaded and will commence play-testing.
JamesOFarrell wrote:This mod has all the code it needs for an accumulator that reports it's power storage and a power-pole that can be turned on and off with circuit conditions which will automate power systems as well. I am not sure if you are interested in increasing the scope of your mod but I would love to have these items if you are.
Smart Power would be nice indeed and fit well with this.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 7:50 am
by bobingabout
Kikkers wrote:One issue I'm still having is with the item icons for the fluid unit items, they seem cropped ingame to a smaller size, while I'm expecting them to be 32x32. If you have any ideas on that, please share?
delete cropcache.dat I think it's called, in the game's base directory. The game will rebuild the file when you run it again.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 8:22 am
by Kikkers
bobingabout wrote:delete cropcache.dat I think it's called, in the game's base directory. The game will rebuild the file when you run it again.
Ah, that must be it. Explains why Kirk did not get it.
JamesOFarrell wrote:This mod has all the code it needs for an accumulator that reports it's power storage and a power-pole that can be turned on and off with circuit conditions which will automate power systems as well. I am not sure if you are interested in increasing the scope of your mod but I would love to have these items if you are.
That sounds good, I'll look into it. The accumulators at least seem to be easy enough, but I'm not completely sure yet how power poles might work. The actuator part in the pump needs power, and to have a power pole need power seems weird. But I'll figure something out, worked out so far.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 8:54 am
by JamesOFarrell
Kikkers wrote:a power pole need power seems weird. But I'll figure something out, worked out so far.
The way to do the power pole is to have 2 entities, one with a supply_area_distance of 3 and one with a supply_area_distance of 0.1. When you want to turn it off you replace one with the other and all power goes off but the smart inverter you are using for detection will still get power. The only issue is you will need to look at the connected wires and replace them which could be a pain.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 9:16 am
by Kikkers
I have a little test working now that simply removes and creates the pole on a time interval. Placing a pole by code simply restores the wires, so I suppose we have a go. Still, it looks terrible, as the connected poles keep turning around each time this happens, but I think that can be remedied somewhat by exploiting the game's wire connection behavior.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 10:22 am
by drs9999
I made something similar for power poles:
https://forums.factorio.com/forum/vie ... =14&t=5552

Though it still contains manual switching only. The reason why I didn't add an automatic (based on circuit condition) mode yet is that I know 0.11 will introduce new stuff that allows me to implement it much easier and with less hacks.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 10:30 am
by Kikkers
drs9999 wrote:I made something similar for power poles:
https://forums.factorio.com/forum/vie ... =14&t=5552
I hope you don't mind if I just make a hacked version for the time being? It'll likely be some time until 0.11 is stable anyway.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 11:40 am
by JamesOFarrell
Kikkers wrote:I have a little test working now that simply removes and creates the pole on a time interval. Placing a pole by code simply restores the wires, so I suppose we have a go. Still, it looks terrible, as the connected poles keep turning around each time this happens, but I think that can be remedied somewhat by exploiting the game's wire connection behavior.
The wires I was worried about were green and red. If you remove and replace the pole they will be lost. There are methods to interact with wires though. I hadn't thought about the rotation issue, you might be able to remove the the other directions from the sprites and make a new entity with just the one direction, I am not sure if that would work though.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 12:08 pm
by Kikkers
I was unable to find any way to directly manipulate wire connections, hence my current approach. If you have an example of that, please show it. That would make life much easier.

In the meantime, I'll probably skip on letting red and green wires cross over the switch.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 12:42 pm
by JamesOFarrell
Here. Look at neighbors for read and connectneighbour for write

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 1:01 pm
by Kikkers
Thanks, seems I completely missed that in all the times i went over that page.

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 1:07 pm
by drs9999
Kikkers wrote: I hope you don't mind if I just make a hacked version for the time being? It'll likely be some time until 0.11 is stable anyway.
I don't know what it has to do with stability, but I don't mind. First, I have to port all my mods to 0.11 anyway, before I am going to add new features.

btw. If I am not misleading it isn't possible to remove wire-connections in 0.10. That that's another thing 0.11 will introduce

Re: Smart Fluid Mod

Posted: Fri Oct 31, 2014 1:34 pm
by Kikkers
drs9999 wrote:I don't know what it has to do with stability, but I don't mind. First, I have to port all my mods to 0.11 anyway, before I am going to add new features.
Stability of the main game. Having a mod in an unstable build seems counter productive anyway, but I suppose it's always possible to have very few stability issues.
drs9999 wrote:btw. If I am not misleading it isn't possible to remove wire-connections in 0.10. That that's another thing 0.11 will introduce
Just noticed that. I still have a workaround using a dummy pole in the middle, but it does make the structure 3x3 (maybe 1x3), and red & green wires won't span across the connection.

Re: [0.11.1] Smart Fluid Mod - 0.1.2

Posted: Sat Nov 01, 2014 12:16 am
by Kikkers
Edited the first post with new information. Now supporting Factorio 0.11.1

Work on the electricity parts will continue, expect results soon...

Re: [0.11.1] Smart Circuit Systems - 0.2.0

Posted: Sun Nov 02, 2014 10:00 pm
by Kikkers
Edited the first post with new information. Added the new electricity based items.