[MOD 0.12.x] Smarter Circuitry

Topics and discussion about specific mods
devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by devilwarriors »

Does anyone else knowing lua could look into this ?

Thanks!

Cbrad24
Inserter
Inserter
Posts: 29
Joined: Sun Dec 20, 2015 4:36 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Cbrad24 »

I have been looking into this because I want to use this mod until .13

I did find a small workaround for sensors for now but every time I sit down to look at this I get called away.
The catch is that this will disable them being able to read electricity for now.

To apply go to sensor_0.4.9/control.lua
Go to line 439 at "elseif entity.energy ~= nil then"
Change it to "elseif false then"

This will allow sensors to detect trains/train cargo again, but will break reading from any electricity sources like accumulators/micro accumulators.
I'll have another crack at this tonight but I just found the bug and now I have to leave for work.
Apparently the problem stems from the sensor now detects the rail, because the rail apparently has an energy value of 0 instead of nil.

The only fix around this off the top of my head is a white or black list, but I will have a crack again later. Actuators may be suffering from a similar problem apparently.

Cbrad24
Inserter
Inserter
Posts: 29
Joined: Sun Dec 20, 2015 4:36 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Cbrad24 »

Fixed for 12.22, broken actuators and sensors with trains. Feel free to let me know if anything else is broken until the mod author returns.
Attachments
Factorio-Smarter-Circuitry-master.zip
(3.48 MiB) Downloaded 328 times

mrtux
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by mrtux »

Cbrad24 wrote:Fixed for 12.22, broken actuators and sensors with trains. Feel free to let me know if anything else is broken until the mod author returns.
Cool, thanks!
Do you have this on github or something alike?



Edit: Did not work, though. The train is recognized when I first place the sensor, but not after the train arrives.
Do I need to reset something?
If only my thesis could be done in Factorio …

Cbrad24
Inserter
Inserter
Posts: 29
Joined: Sun Dec 20, 2015 4:36 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Cbrad24 »

mrtux wrote:
Cbrad24 wrote:Fixed for 12.22, broken actuators and sensors with trains. Feel free to let me know if anything else is broken until the mod author returns.
Cool, thanks!
Do you have this on github or something alike?



Edit: Did not work, though. The train is recognized when I first place the sensor, but not after the train arrives.
Do I need to reset something?
Did you download from my attachment or from the first page?

mrtux
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by mrtux »

Cbrad24 wrote:Did you download from my attachment or from the first page?
The download was from your attachment.
If only my thesis could be done in Factorio …

Cbrad24
Inserter
Inserter
Posts: 29
Joined: Sun Dec 20, 2015 4:36 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Cbrad24 »

That's very curious, because that's what was happening before I fixed it (in the original mod). Did you delete the old mod folders and replace with mine?
You might have to send me your map because I don't think I can replicate.

devilwarriors
Filter Inserter
Filter Inserter
Posts: 311
Joined: Sat Jan 09, 2016 1:11 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by devilwarriors »

We tried adding the mod to the public server we have and the actuators give an error in multiplayer.

Cbrad24
Inserter
Inserter
Posts: 29
Joined: Sun Dec 20, 2015 4:36 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Cbrad24 »

devilwarriors wrote:We tried adding the mod to the public server we have and the actuators give an error in multiplayer.
Can you post the error? I'm using the mod fine on my multiplayer dedicated server

mrtux
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by mrtux »

There is no error. it is just that the sensor does not detect the train's content once the train has departed and arrived again.
If only my thesis could be done in Factorio …

mrtux
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by mrtux »

Fixed the problem by changing line 439 in the control.lua of the sensor to:

Code: Select all

elseif entity.energy ~= nil and entity.energy > 0 then

I guess it was mentioned somewhere here: Rails have a power value (== 0) now and are detected as viable target, so that a sensor does not re-connect to the cargo wagon. Checking for higher energy level makes the sensor re-scan.

Better solution might even be to check for railway pieces. I try this solution, if it does not work well, I'll change.


Update: A similar thing needs to be done for the actuator.


Works like a charm now. :)
If only my thesis could be done in Factorio …

mrtux
Long Handed Inserter
Long Handed Inserter
Posts: 61
Joined: Thu Dec 04, 2014 10:04 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by mrtux »

Update: Almost works like a charm. Seems that there should be a blacklist for tracked items, one of the sensors recently caught (and deactivated) a logistic robot, meaning that neither the robot would work anymore, nor any trains were controlled.
If only my thesis could be done in Factorio …

Blackraz0r
Inserter
Inserter
Posts: 49
Joined: Sun Dec 28, 2014 1:03 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Blackraz0r »

Hey mate, i got this on creating new game.

Image

Mods:
{
"mods": [
{
"name": "base",
"enabled": "true"
},
{
"name": "actuator",
"enabled": "true"
},
{
"name": "advanced-logistics-system",
"enabled": "true"
},
{
"name": "air-filtering",
"enabled": "true"
},
{
"name": "blueprint-string",
"enabled": "true"
},
{
"name": "color-coding",
"enabled": "true"
},
{
"name": "concreted-rails",
"enabled": "true"
},
{
"name": "EvoGUI",
"enabled": "true"
},
{
"name": "ExtraToolbelts",
"enabled": "true"
},
{
"name": "FARL",
"enabled": "true"
},
{
"name": "InitialScan",
"enabled": "true"
},
{
"name": "Landfill",
"enabled": "true"
},
{
"name": "Larger Inventory",
"enabled": "true"
},
{
"name": "micro-accumulator",
"enabled": "true"
},
{
"name": "MoreLight",
"enabled": "true"
},
{
"name": "RailTanker",
"enabled": "true"
},
{
"name": "research-queue",
"enabled": "true"
},
{
"name": "robostats",
"enabled": "true"
},
{
"name": "rso-mod",
"enabled": "true"
},
{
"name": "sensor",
"enabled": "true"
},
{
"name": "STRS",
"enabled": "true"
},
{
"name": "TheFatController",
"enabled": "true"
},
{
"name": "trainstats",
"enabled": "true"
},
{
"name": "upgrade-planner",
"enabled": "true"
},
{
"name": "YARM",
"enabled": "true"
}
]
}
Running on Win8.1
Version 0.12.26

Choumiko
Smart Inserter
Smart Inserter
Posts: 1352
Joined: Fri Mar 21, 2014 10:51 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Choumiko »

Blackraz0r wrote:Hey mate, i got this on creating new game.
FARLs fault, fixed in the latest release

dude2976
Manual Inserter
Manual Inserter
Posts: 4
Joined: Sun Mar 20, 2016 9:55 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by dude2976 »

So is this updated for .27?

Lukea153
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Mar 24, 2016 4:45 pm
Contact:

Suggestion: [MOD 0.12.x] Smarter Circuitry

Post by Lukea153 »

I have a suggestion, can you add a Signal Delayer which waits a specified number of ticks?

This would be useful for making various timed events and would fix the tedious task of
spamming Decider Combinators counting only 1 tick each.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Peter34 »

dude2976 wrote:So is this updated for .27?
I was able to load a very old _01 save, in the current Steam versin (0.12.29 I think) and using the old 4.9 Smarter files, and, I got no error messages. I haven't progressed more than a tiny bit on that old map, so haven't been able to build any of the smarter circuitry yet, but as far as I know, the only real mod update hurdles were 12.11 and 12.20, and I'm fairly sure smarter Circuitry are past both of those.

Peter34
Smart Inserter
Smart Inserter
Posts: 1100
Joined: Mon Nov 10, 2014 12:44 pm
Contact:

Re: Suggestion: [MOD 0.12.x] Smarter Circuitry

Post by Peter34 »

Lukea153 wrote:I have a suggestion, can you add a Signal Delayer which waits a specified number of ticks?

This would be useful for making various timed events and would fix the tedious task of
spamming Decider Combinators counting only 1 tick each.
A Signal Delayer might be super useful. Actually, I suggest 3. One that delays 5 ticks, one that delays 20 ticks and one that delays 120 ticks. Or a configurable one where you simply input the number of ticks of delay that you want.

fregate84
Fast Inserter
Fast Inserter
Posts: 233
Joined: Sun Jun 22, 2014 10:56 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by fregate84 »

you can add delay on power switch by doing that :

replace (on control.lua) :

Code: Select all

	if isConditionFulfilled ~= switch.activated 
with :

Code: Select all

	if isConditionFulfilled ~= switch.activated and game.tick % 300 == 0 then
the power switch will switch only every 5s (300 = 5*60 ticks). 60 ticks = 1 s
You can define 60 instead of 300 if you want a check every 1s


But agree a Signal Delayer could be very nice !!

Darloth
Fast Inserter
Fast Inserter
Posts: 117
Joined: Sun Jun 08, 2014 3:57 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Darloth »

Suggestion for new use - Actuator on... something, maybe a Radar Dish?

Sends a configurable message to the player as a standard message whenever a specific signal pulses. Ideally, could include information from the signal (signal name and amount).

Rationale for radar dish: It updates the player's minimap, it's a big expensive power-drawing structure, and radar is basically an application of radio, and I can't think of any better choices in vanilla Factorio.

Post Reply

Return to “Mods”