Page 5 of 8

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Wed Feb 10, 2016 11:31 am
by devilwarriors
Does anyone else knowing lua could look into this ?

Thanks!

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Thu Feb 11, 2016 6:23 am
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Thu Feb 11, 2016 3:38 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Thu Feb 11, 2016 9:53 pm
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?

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Fri Feb 12, 2016 5:31 am
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?

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Fri Feb 12, 2016 10:03 pm
by mrtux
Cbrad24 wrote:Did you download from my attachment or from the first page?
The download was from your attachment.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sun Feb 14, 2016 2:26 am
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sun Feb 14, 2016 8:50 pm
by devilwarriors
We tried adding the mod to the public server we have and the actuators give an error in multiplayer.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Feb 15, 2016 2:06 am
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

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Tue Feb 16, 2016 9:10 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Wed Feb 24, 2016 5:35 pm
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. :)

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sun Mar 06, 2016 12:15 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Mar 07, 2016 4:34 pm
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

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Mar 07, 2016 8:29 pm
by Choumiko
Blackraz0r wrote:Hey mate, i got this on creating new game.
FARLs fault, fixed in the latest release

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Tue Mar 22, 2016 12:38 am
by dude2976
So is this updated for .27?

Suggestion: [MOD 0.12.x] Smarter Circuitry

Posted: Thu Mar 24, 2016 5:11 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Thu Mar 24, 2016 6:05 pm
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.

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

Posted: Thu Mar 24, 2016 6:09 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Fri Mar 25, 2016 6:25 pm
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 !!

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sun Mar 27, 2016 5:12 pm
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.