Page 7 of 8

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon May 02, 2016 3:43 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Wed May 04, 2016 2:28 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

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

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sun May 15, 2016 10:39 pm
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

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon May 16, 2016 3:25 pm
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

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon May 16, 2016 9:57 pm
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. :)

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Tue May 17, 2016 10:10 am
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sat May 28, 2016 8:57 am
by Neotix
I get crash when I want put Sensor near Electric Furnace.
Image

So far sensor works with other entities, even from mods.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Jun 06, 2016 9:27 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Jun 13, 2016 12:22 am
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Jun 20, 2016 11:32 am
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?

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Jun 20, 2016 5:43 pm
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

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Wed Jun 22, 2016 1:50 am
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Wed Jun 22, 2016 8:19 am
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Jun 27, 2016 7:31 pm
by AlexPhoenix
can you add pipe sensor please?
usual sensor don't detect pipes.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Oct 24, 2016 11:28 am
by Speadge
can ANYONE pls make this work again? i'd love to have the sensor back in game

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Mon Oct 24, 2016 6:02 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Tue Oct 25, 2016 3:59 pm
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 ;)

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Tue Oct 25, 2016 8:35 pm
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.

Re: [MOD 0.12.x] Smarter Circuitry

Posted: Sat Jan 14, 2017 2:20 pm
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?