[MOD 0.12.x] Smarter Circuitry

Topics and discussion about specific mods
Sacredd
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Fri Mar 18, 2016 9:30 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Sacredd »

Sorry, I am not reading the hundred posts here...

For actuator:
I have commented out the line causing erros on ini (init() function in control.lua line 30).
It seems to work with other mods now, but I give no guarantee.

Had the problem to start new game together with train tracker mod.

Increased the version to 0.4.91 to mark the difference.
Attachments
actuator_0.4.91.zip
(34.73 KiB) Downloaded 195 times
Last edited by Sacredd on Sun May 15, 2016 1:25 pm, edited 1 time in total.
NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by NoriSilverrage »

Is there anyway to detect the temperature (or energy) of a liquid? I see that the directional sensor gives a kilojoule rating for some objects, but it doesn't seem to do so for pipes/tanks.
Speadge
Fast Inserter
Fast Inserter
Posts: 142
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Speadge »

NoriSilverrage wrote:Is there anyway to detect the temperature (or energy) of a liquid? I see that the directional sensor gives a kilojoule rating for some objects, but it doesn't seem to do so for pipes/tanks.
On my tries it did give the temperature and the content of a pipe it was pointing at
Hyratel
Inserter
Inserter
Posts: 34
Joined: Sun May 15, 2016 10:35 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Hyratel »

If you go grab "Logic Belts", it adds a few more things not found here that compliment Smarter Circuitry, including both Volume (x10 for nice integers) and Temperature sensor pipes - viewtopic.php?f=91&t=14824
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 »

Hyratel wrote:If you go grab "Logic Belts", it adds a few more things not found here that compliment Smarter Circuitry, including both Volume (x10 for nice integers) and Temperature sensor pipes - viewtopic.php?f=91&t=14824
Did you mean to quote this?
viewtopic.php?f=91&t=14007
If only my thesis could be done in Factorio …
Zeeth_Kyrah
Long Handed Inserter
Long Handed Inserter
Posts: 66
Joined: Tue Jan 21, 2014 10:05 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Zeeth_Kyrah »

Hyratel wrote:If you go grab "Logic Belts", it adds a few more things not found here that compliment Smarter Circuitry, including both Volume (x10 for nice integers) and Temperature sensor pipes - viewtopic.php?f=91&t=14824
I agree, plus I noticed the features in Logic Belts will apparently be in vanilla 0.13! I can't wait. :)
Planned projects: Energy Crystals Plus, Minor Fluid Handling, Small electric furnaces
(high-energy materials and assembler, fluid void burner and small tank, tiny and slow furnaces with charcoal)
Speadge
Fast Inserter
Fast Inserter
Posts: 142
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Speadge »

Hyratel wrote:If you go grab "Logic Belts", it adds a few more things not found here that compliment Smarter Circuitry, including both Volume (x10 for nice integers) and Temperature sensor pipes - viewtopic.php?f=91&t=14824

as stated, both work for me using the directional sensor. Plus: it works with every modded item.
i.e. LB doesnt let u use modded belts for switching purposes.
Neotix
Filter Inserter
Filter Inserter
Posts: 599
Joined: Sat Nov 23, 2013 9:56 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Neotix »

I get crash when I want put Sensor near Electric Furnace.
Image

So far sensor works with other entities, even from mods.
Shrooblord
Long Handed Inserter
Long Handed Inserter
Posts: 55
Joined: Thu May 12, 2016 12:57 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Shrooblord »

Hello, I have a bug report for using Smarter Circuitry 0.4.9 in conjunction with Test Mode 0.12.14 and Research Queue 1.2.6: when using TM's Unlock All Tech button, Research Queue throws an error that's connected with having Smarter Circuitry 0.4.9's sensor 0.4.9 mod installed:
crash
Tested on a new world with only the three mentioned mods installed.
NoriSilverrage
Fast Inserter
Fast Inserter
Posts: 159
Joined: Mon Mar 21, 2016 1:19 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by NoriSilverrage »

Probably irrelevant with the changes coming in 0.13. But the sensor and actuator take a lot of UPS. I had about 120 sensors and maybe 60 actuators and it was costing me 10UPS. I knocked it down to 50-60 total and saw a huge increase in performance.

Otherwise they are crazy helpful and some things that I'm doing would be really difficult otherwise.
ksi_01
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Jun 20, 2016 11:01 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by ksi_01 »

Hello!
I do not know much English language.
I changed a little bit your mod.
All the changes are shown in the pictures in the RAR file:
Are you interested?
Attachments
Smarter-Circuitry.rar
Mod
(797.8 KiB) Downloaded 151 times
Pictures.rar
Pictures
(52.98 MiB) Downloaded 161 times
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Optera »

Neotix wrote:I get crash when I want put Sensor near Electric Furnace.
Image

So far sensor works with other entities, even from mods.
Would it be possible to check if it's a furnace and set it to return the content of source_inventory?
With 0.13 all smart furnace setups will probably break, so a way to check how much iron plates we have in a furnace would be very welcome.


Edit:
a clean fix should be possible with 0.13 if this is correct viewtopic.php?f=28&t=26111&start=10#p167720

Code: Select all

function insert_inventory(sensor, index, detected_table)
	if sensor.target.get_inventory(index) ~= nil then -- will work in 0.13?
		local contentsTable = sensor.target.get_inventory(index).get_contents()
		for k,v in pairs(contentsTable) do
			add_detected_items(detected_table, k, v)
		end
	end
end
until then you can check electric furnaces by commenting out fuel inventory checking for furnaces like this in control.lua

Code: Select all

function ticksensor_furnace(sensor, detected_table)
	sensor.tickskip = SC_FURNACE_TICKS

	--insert_inventory(sensor, 1, detected_table) --> ignore to avoid crashes with electric furnaces
	insert_inventory(sensor, 2, detected_table)
	insert_inventory(sensor, 3, detected_table)
	--insert_inventory(sensor, 4, detected_table) --> ignore modules
	insert_energy(sensor, detected_table)
end
ksi_01
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Jun 20, 2016 11:01 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by ksi_01 »

There is a solution for version 0.12

Code: Select all

function get_inv(s,i)
local co=coroutine.create(s.target.get_inventory)
local a, b = coroutine.resume(co, i)
if a then return b else return nil end
end

function insert_inventory(sensor, index, detected_table)
	local co=coroutine.create(get_inv)
	local res, inv = coroutine.resume(co, sensor, index)
	if res and inv ~= nil then
		local contentsTable = inv.get_contents()
		for k,v in pairs(contentsTable) do
			add_detected_items(detected_table, k, v)
		end
	end
end
In this form it works.
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Optera »

ksi_01 wrote:There is a solution for version 0.12

Code: Select all

function get_inv(s,i)
local co=coroutine.create(s.target.get_inventory)
local a, b = coroutine.resume(co, i)
if a then return b else return nil end
end

function insert_inventory(sensor, index, detected_table)
	local co=coroutine.create(get_inv)
	local res, inv = coroutine.resume(co, sensor, index)
	if res and inv ~= nil then
		local contentsTable = inv.get_contents()
		for k,v in pairs(contentsTable) do
			add_detected_items(detected_table, k, v)
		end
	end
end
In this form it works.
It works for ~10min before Factorio crashes.
Factorio crashed. Generating symbolized stacktrace, please wait ...
c:\cygwin64\tmp\factorio-4o6qmj\libraries\stackwalker\stackwalker.cpp (923): StackWalker::ShowCallstack
c:\cygwin64\tmp\factorio-4o6qmj\src\util\logger.cpp (306): Logger::writeStacktrace
c:\cygwin64\tmp\factorio-4o6qmj\src\util\logger.cpp (360): Logger::logStacktrace
c:\cygwin64\tmp\factorio-4o6qmj\src\util\crashhandler.cpp (84): CrashHandler::writeStackTrace
c:\cygwin64\tmp\factorio-4o6qmj\src\util\crashhandler.cpp (174): CrashHandler::SignalHandler
f:\dd\vctools\crt\crtw32\misc\winxfltr.c (372): _XcptFilter
f:\dd\vctools\crt\crtw32\startup\threadex.c (378): _callthreadstartex$filt$0
f:\dd\vctools\crt\crtw32\misc\amd64\chandler.c (162): __C_specific_handler
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00000000771E7E8D)
00000000771E7E8D (ntdll): (filename not available): RtlDecodePointer
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00000000771D84CF)
00000000771D84CF (ntdll): (filename not available): RtlUnwindEx
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 000000007720BAC8)
000000007720BAC8 (ntdll): (filename not available): KiUserExceptionDispatcher
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (994): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (987): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (987): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (993): agui::Gui::recursiveDoLogic
c:\cygwin64\tmp\factorio-4o6qmj\libraries\agui\src\agui\gui.cpp (975): agui::Gui::logic
c:\cygwin64\tmp\factorio-4o6qmj\src\globalcontext.cpp (738): GlobalContext::updateGui
c:\cygwin64\tmp\factorio-4o6qmj\src\mainloop.cpp (144): MainLoop::processAllegroEvent
c:\cygwin64\tmp\factorio-4o6qmj\src\mainloop.cpp (171): MainLoop::processAllegroEvents
c:\cygwin64\tmp\factorio-4o6qmj\src\mainloop.cpp (455): MainLoop::tickStep
c:\cygwin64\tmp\factorio-4o6qmj\src\mainloop.cpp (582): MainLoop::run
c:\cygwin64\tmp\factorio-4o6qmj\src\main.cpp (490): wmain
f:\dd\vctools\crt\crtw32\startup\crt0.c (255): __tmainCRTStartup
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00000000770B59BD)
00000000770B59BD (kernel32): (filename not available): BaseThreadInitThunk
ERROR: SymGetLineFromAddr64, GetLastError: 487 (Address: 00000000771EA2E1)
00000000771EA2E1 (ntdll): (filename not available): RtlUserThreadStart
46.319 Error Util.cpp:78: Unexpected error occurred. You can help us to solve the problem by posting the contents of the log file on the Factorio forums.
User avatar
AlexPhoenix
Fast Inserter
Fast Inserter
Posts: 149
Joined: Tue Feb 18, 2014 7:48 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by AlexPhoenix »

can you add pipe sensor please?
usual sensor don't detect pipes.
Speadge
Fast Inserter
Fast Inserter
Posts: 142
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Speadge »

can ANYONE pls make this work again? i'd love to have the sensor back in game
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Optera »

Speadge wrote:can ANYONE pls make this work again? i'd love to have the sensor back in game
Inventory Sensor
I think I covered everything the sensor did, unless it was added to base game like reading belt content.
Speadge
Fast Inserter
Fast Inserter
Posts: 142
Joined: Tue Mar 29, 2016 10:01 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Speadge »

Optera wrote:
Speadge wrote:can ANYONE pls make this work again? i'd love to have the sensor back in game
Inventory Sensor
I think I covered everything the sensor did, unless it was added to base game like reading belt content.
it could read fluid levels and temperatures - basically what theRustyKnife just built.

Just an idea - wouldnt it be great if the two of u work together to merge this into one mod?
Edit: btw, was trying ur mod already before - thanks for ur work ;)
User avatar
Optera
Smart Inserter
Smart Inserter
Posts: 2920
Joined: Sat Jun 11, 2016 6:41 am
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by Optera »

Speadge wrote: it could read fluid levels and temperatures - basically what theRustyKnife just built.

Just an idea - wouldnt it be great if the two of u work together to merge this into one mod?
Edit: btw, was trying ur mod already before - thanks for ur work ;)
We talked it over and think it makes more sense for fluid temperature sensor to be it's own entity. Probably moving from being a constant combinator to a piece of plumbing that can be placed inline or beside pipes.
aklesey1
Smart Inserter
Smart Inserter
Posts: 1862
Joined: Sun May 18, 2014 3:45 pm
Contact:

Re: [MOD 0.12.x] Smarter Circuitry

Post by aklesey1 »

Hi people, hi author, i like functionality of this mod, is this mod still actual? Mod is still developing for 0.13 or 0.14 versions?
Nickname on ModPortal - Naron79
Post Reply

Return to “Mods”