Page 1 of 1

[0.16.x] Bob's Mods: Adjustable Inserters

Posted: Tue Dec 26, 2017 1:34 am
by FallenPaladin
Getting an unknown key...

Image

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Tue Dec 26, 2017 1:49 am
by bobingabout
Yeeees.... of course.

The code is now entirely in inserters, but the Locale entries are still in the logistics mod.

I'll make a note of it.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Tue Dec 26, 2017 1:56 am
by FallenPaladin
just seen it and thought id say something...

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Tue Dec 26, 2017 2:05 pm
by bobingabout
FallenPaladin wrote:just seen it and thought id say something...
Thanks for the report.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 1:33 am
by nickcombs
I encountered another bug. It kicked me back to the menu.

Code: Select all

6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
	__bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 4:22 am
by bobingabout
nickcombs wrote:I encountered another bug. It kicked me back to the menu.

Code: Select all

6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
	__bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
I'm not sure what's causing that issue, line 394 is this:

Code: Select all

if event.element.name == "bob_logistics_inserter_button"
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.
I could try and put extra checks in place, but that's not a situation that should be able to happen.

EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 4:31 pm
by orzelek
bobingabout wrote:
nickcombs wrote:I encountered another bug. It kicked me back to the menu.

Code: Select all

6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
	__bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
I'm not sure what's causing that issue, line 394 is this:

Code: Select all

if event.element.name == "bob_logistics_inserter_button"
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.
I could try and put extra checks in place, but that's not a situation that should be able to happen.

EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.
I've managed to find reliable way to reproduce it.
You need to open inserter game gui (to set filters for example) then without closing it open adjustement gui and try to change something in it. It will cause the message above every time. I'm still not sure if it's a base game issue or you would need to add the protection in mod.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 7:31 pm
by bobingabout
orzelek wrote:
bobingabout wrote:
nickcombs wrote:I encountered another bug. It kicked me back to the menu.

Code: Select all

6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
	__bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
I'm not sure what's causing that issue, line 394 is this:

Code: Select all

if event.element.name == "bob_logistics_inserter_button"
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.
I could try and put extra checks in place, but that's not a situation that should be able to happen.

EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.
I've managed to find reliable way to reproduce it.
You need to open inserter game gui (to set filters for example) then without closing it open adjustement gui and try to change something in it. It will cause the message above every time. I'm still not sure if it's a base game issue or you would need to add the protection in mod.
Does it still do it with inserters 0.16.3?

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 8:52 pm
by nickcombs
Thanks guys. 0.16.3 has fixed the issue for me.
Just a reminder to change the zip filename to bobinserters_0.16.3.zip

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 9:08 pm
by bobingabout
why, what is the zip filename?

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Mon Jan 01, 2018 11:43 pm
by nickcombs
the filename still says 0.16.2. I only mention because Factorio reads looks for the newer name on launch.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Tue Jan 02, 2018 1:22 am
by bobingabout
nickcombs wrote:the filename still says 0.16.2. I only mention because Factorio reads looks for the newer name on launch.
According to dropbox and the mods.factorio website, they both report it to me as 0.16.3

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Tue Jan 02, 2018 12:04 pm
by orzelek
bobingabout wrote:
orzelek wrote:
bobingabout wrote:
nickcombs wrote:I encountered another bug. It kicked me back to the menu.

Code: Select all

6142.497 Error MainLoop.cpp:1013: Exception at tick 318371: Error while running event bobinserters::on_gui_checked_state_changed (ID 3)
LuaGuiElement API call when LuaGuiElement was invalid.
stack traceback:
	__bobinserters__/control.lua:394: in function <__bobinserters__/control.lua:379>
I'm not sure what's causing that issue, line 394 is this:

Code: Select all

if event.element.name == "bob_logistics_inserter_button"
the issue there is.... if that is invalid, it means you're pressing a button that doesn't exist.
I could try and put extra checks in place, but that's not a situation that should be able to happen.

EDIT: Yeah, due to the way I spliced inserters and Logistics scripts together, a situation might happen that results in it continuing to check buttons after a GUI has been deleted, resulting in this crash.
to fix this I'm going to add in a check for if event.element.valid.
I've managed to find reliable way to reproduce it.
You need to open inserter game gui (to set filters for example) then without closing it open adjustement gui and try to change something in it. It will cause the message above every time. I'm still not sure if it's a base game issue or you would need to add the protection in mod.
Does it still do it with inserters 0.16.3?
It doesn't crash now but it doesn't modify the inserter with what you click. And GUI closes after clicking on on option (offset change for example).
It seems for me that it might be partially a base game issue since something gets invalidated on the way when processing events.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Wed Jan 03, 2018 3:05 am
by bobingabout
I just did a test to make sure.

new game, everything loads and doesn't crash.

obviously my options in a new game are limited, the Shift + E to configure an inserter works as expected, however there is an issue with using the pre-place GUI, it seems to want to assume that the drop location is of the orientation, and doesn't get rotated as it would if you used the editing GUI, so you can create near inserters by reversing the pickup and drop locations, etc.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Wed Jan 03, 2018 1:48 pm
by orzelek
Would you consider making separate shortcut that would switch inserter from far to near(only on offset)?
It's pretty frequently used action but it requires opening full ui to make one change. Current shift+N shortcut switches whole tiles not the offset only.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Wed Jan 03, 2018 8:52 pm
by bobingabout
orzelek wrote:Would you consider making separate shortcut that would switch inserter from far to near(only on offset)?
It's pretty frequently used action but it requires opening full ui to make one change. Current shift+N shortcut switches whole tiles not the offset only.
Shift + N switchs tiles AND offset. though if you want to make a near inserter from standard, you do have to toggle through long near, long, xlong near, xlong then to near.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Thu Jan 04, 2018 10:35 am
by orzelek
bobingabout wrote:
orzelek wrote:Would you consider making separate shortcut that would switch inserter from far to near(only on offset)?
It's pretty frequently used action but it requires opening full ui to make one change. Current shift+N shortcut switches whole tiles not the offset only.
Shift + N switchs tiles AND offset. though if you want to make a near inserter from standard, you do have to toggle through long near, long, xlong near, xlong then to near.
Thats the main reason for this request - since usually switching far/near is more useful then going through all ranges.

Re: [0.16.x] Bob's Mods: Adjustable Inserters

Posted: Sat Mar 30, 2019 10:05 am
by BlueTemplar
Could you please add a tech to Bob's Revamp(?) to only enable Inserter GUIs when researched ?

Being able to set up inserters to 90° angles is a really powerful feature, one that maybe should not be available right from the start ?
viewtopic.php?p=418415#p418415
(I also constantly forget about it when starting new games, thinking that it *does* require research, and I might not be the only one ?)