Page 4 of 8
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Mon Sep 07, 2015 1:32 am
by waduk
Bug ?
Detected Train signal is persistent, the sensor still outputting train signal even after the train passed.
Or am i doing it wrong ? We have to use pressure floor ? Because this bug (?) didn't occur if we use pressure floor.
Edit : Scrap that, turns out there are new Sensor version, resolved.
Also, feature request:
Can the train signal state being altered by the directional actuator ?
So we can redirect train, or make a safe passage.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Wed Sep 09, 2015 3:40 pm
by waduk
Sorry, another question.
How do i reduce the update rate of sensor ? Control.lua ?
I use many of them, i think the sensor that giving me fps drop (40 from 60).
I don't need realtime count from sensor.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Wed Sep 09, 2015 5:03 pm
by Peter34
waduk wrote:Sorry, another question.
How do i reduce the update rate of sensor ? Control.lua ?
I use many of them, i think the sensor that giving me fps drop (40 from 60).
I don't need realtime count from sensor.
Nixie Tubes appear to be updating only once per second, and I'm probably not the only one using both the Nixies and Smarter Circuitry. But I think updating once per second (once per 60 ticks) would be good.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Wed Sep 09, 2015 5:28 pm
by waduk
Yeah i also use nixie tubes.
One per sec would be good. But i hope it can be configurable, many people would still like a real time count, or maybe even slower, like myself.
My PC sadly can't handle fast update rate.
Using debug, indeed the slowdown were caused by sensor. Removing them restore my fps, i only use about 40 of them. But plan to install many more (have to scrap that plan until somehow the sensor can be slowed down).
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Sep 13, 2015 5:30 pm
by Kikkers
Just integrated some more general timing code for the sensor. Update frequency can now be tweaked from a config file in the sensor's mod folder.
I hadn't found the time to work on this. It should've been in a lot sooner than this.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Sep 13, 2015 9:32 pm
by waduk
Thanks for adding configurable update cycle. Tremendous helpful on slow PC
I use 120 for the default, and now it reduced to 25% of script update.
Still higher than most mod, but i guess it's the caveat we have to deal with.
Actuator also a big fps hit, although not as high as sensor; but currently i disable them
Since Smarter Trains Mod will causing CTD when activator mod is toggled.
Man, i wish i can use both of them together.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sat Sep 19, 2015 8:59 pm
by fregate84

- ScreenShot003.jpg (14.09 KiB) Viewed 11261 times
I have a probleme !
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Sep 20, 2015 8:30 am
by Kikkers
fregate84 wrote:I have a probleme !
I can't reproduce it, so try the basics: check if your game and the mod are updated to the newest versions.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Sep 20, 2015 8:12 pm
by fregate84
Kikkers wrote:fregate84 wrote:I have a probleme !
I can't reproduce it, so try the basics: check if your game and the mod are updated to the newest versions.
My mistake !
I download the last STABLE version and not the last version on my new PC.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Tue Oct 13, 2015 2:29 pm
by waduk
Crash when removing accumulator that being read by sensor.
Also, altering (lowering) the update rate in sensor config.lua seems didn't take any effect at all, if the sensor was used to read accu's. Script update is still really high.
The in-game sensor signal also seems to read on close to realtime.
Single sensor on accu's is giving the script-update value of 1.x. Using two sensor is doubling the value, amd so on.
The only thing that seems affected/lowering the script update is the update cycle random options, it lower the script-update by 0.5.
Sorry if i sound complaining, i'm not actually.
I'm on low end PC, so i try to squeeze every performance wise if possible.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Tue Oct 13, 2015 2:53 pm
by Kikkers
There are still some ways to improve performance that involve avoiding lua's tables whereever possible. Replacing named table keys with numbers for example. This would however fuck up readability, so I'm not keen on doing that.
It's strange that you aren't getting speedups with the update counts. It's been some time since I worked on the code, so I can't be sure, but I did manage to test the functionality of some of the more costly updates from happening too often.
I'll have a look at that bug hopefully sometime this week. Can you recall what versions of factorio/mod you started playing the map?
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Tue Oct 13, 2015 4:02 pm
by waduk
Sensor 0.4.8
Factorio 0.12.10 (IIRC, this game was new game, not a loaded save file from previous factorio version).
Edit :
About the speed-up/update cycle, the strange thing is , on accumulator, even though i changed the default update cycle to higher value, the signal seems stay on near-realtime value.
I increase to 600 just for sake for testing, it should update every 10 sec, right ? But the signal value seems to changed every tick.
Also, it's not that important actually, currently there are no performance hit whatsoever with sensor.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Fri Oct 16, 2015 8:12 pm
by ouch
I get this error when trying to create a new game:
__actuator__/control.lua:7: attempt to index global 'game' (a nil value)
Just downloaded 12.11 64bit.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sat Oct 17, 2015 5:58 am
by Kalsius
This is a change in the game engine. I posted about it and got a reply from the devs, stick with 0.12.10 until mod authors can update.
The latest version i have downloaded is missing an info.json however so will not run. Going to try putting a simple one in to make it run.
Edit #1
Made it run with the following :
Code: Select all
{
"name": "smarter-circuitry",
"version": "0.4.8",
"title": "Smarter Circuitry",
"author": "Kikkers",
"homepage": "https://forums.factorio.com/forum/viewtopic.php?f=91&t=14824",
"contact": "Kikkers",
"description": "Smarter Circuitry",
"dependencies": ["base"]
}
Also had to rename the .zip and internal folder to smarter-circuitry_0.4.8 to make it run.
Hope this helps
Edit #2
Where is everything? Is there a research as I cannot find any new items!!
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Oct 18, 2015 12:07 am
by ouch
I'll give that a try. And yes you had to research it before.
edit: oh you know what, you didn't extract the file so it's not loading. I couldn't get Factorio to read the file either so I just extracted the part directories to the mods folder. (I think it's related to Factorio not searching in subdirectories.) But yeah, they all have info files already.
Edit2: Doh, I just noticed 12.11 JUST came out the same day I posted this problem. It even says in the release notes that it will break most mods... Nm I'll just for everything to get updated.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Oct 25, 2015 11:40 am
by Kikkers
Hey guys, sorry for the late update, but I've uploaded a seemingly functional 0.4.9 (as in, it doesn't crash).
It might have some incorrect behavior, but I haven't had the chance to really test everything, but just post any issues you see and I'll see what I can do. Also, I'm really glad a few of you jumped on fixing some bugs earlier and contributed them on github, because I don't have a lot of free time nowadays.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Nov 01, 2015 2:43 pm
by transportman
I tried to load a game, but I get the following error:
[code]Unknown key:"Error while running the on_load: __actuator__/control.lua:37: attempt to index local 'pos' (a nil value)"[/code]
Is there an easy way to fix the mod so that I can load my game without having to lose the circuitry I have set up?
Guess upgrading to the latest Factorio version fixes mods this time instead of breaking them.
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Tue Nov 24, 2015 7:09 pm
by Talguy
Can you please split up your repo into smaller repo's / topics? It's cumbersome to extract the zip file, then rezip the individual folders, then move them to the fmm directory so FMM can find them.
Other than that,
http://www.factoriomods.com/ might not index your mods right now because there are no seperate releases

Re: [MOD 0.12.x] Smarter Circuitry
Posted: Mon Jan 25, 2016 12:05 am
by devilwarriors
When pointing a sensor to a train cargo it will only work when just installed, if I go to another station and come back it dosn't detect the cargo anymore. Is there a workaround this?
Re: [MOD 0.12.x] Smarter Circuitry
Posted: Sun Jan 31, 2016 10:25 pm
by mrtux
devilwarriors wrote:When pointing a sensor to a train cargo it will only work when just installed, if I go to another station and come back it dosn't detect the cargo anymore. Is there a workaround this?
I have the same problem: Worked fine in 0.12.19, but does not anymore in 0.12.22.
Besides that problem, this mod finally allows me to control my trains based on mining/factory status!
