[MOD 0.16] Miniloader

Topics and discussion about specific mods
Post Reply
User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 726
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.16] Miniloader

Post by DRY411S »

On your next release, would you mind either moving or duplicating entries for your loaders into the entity-name section of your locale please?

My Recycling Machines Mod checks every item prototype for certain properties. Your railloader and unloader have the 'place_result' property which suggests that there is an entity prototype associated and that the locale should be in the entity-name section. As a result, my Recycling Machine gives an ugly error display when i hover over your entities in the Recycling Machines menus.
railloader.png
railloader.png (225.09 KiB) Viewed 6214 times
To put this into context, your mod is one of very, very few examples of where this happens. Across all of Bob's Mods for example, it happens only once, for a single entity, and I'm about to make thew same request to him :)

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Therax »

DRY411S wrote:On your next release, would you mind either moving or duplicating entries for your loaders into the entity-name section of your locale please?

My Recycling Machines Mod checks every item prototype for certain properties. Your railloader and unloader have the 'place_result' property which suggests that there is an entity prototype associated and that the locale should be in the entity-name section. As a result, my Recycling Machine gives an ugly error display when i hover over your entities in the Recycling Machines menus.
railloader.png
To put this into context, your mod is one of very, very few examples of where this happens. Across all of Bob's Mods for example, it happens only once, for a single entity, and I'm about to make thew same request to him :)
I think you meant to post this in the Bulk Rail Loaders thread, but I'll answer here anyway:

At a guess, having not looked at your code, I think your mod needs to look at the value of the place_result property, not just for presence or absence. This is what the Factorio core does, and not every entity has the same item-name as entity-name. For example, in vanilla there is a "rail" item, but no "rail" entity, only "straight-rail" and "curved-rail". I have the below values in my mod, which is how the recipe display in your screenshot gets the correct name.

In prototypes/item/railloader.lua:

Code: Select all

  {
    type = "item",
    name = "railloader",
    ...
    place_result = "railloader-placement-proxy",
In locale/en/railloader.cfg:

Code: Select all

[entity-name]
railloader-placement-proxy=Bulk rail loader
Miniloader β€” UPS-friendly 1x1 loaders
Bulk Rail Loaders β€” Rapid train loading and unloading
Beltlayer & Pipelayer β€” Route items and fluids freely underground

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 726
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.16] Miniloader

Post by DRY411S »

That looks as though it will work thanks. This is the only mod so far where the his value isn't the same as the prototype name.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Therax »

DRY411S wrote:That looks as though it will work thanks. This is the only mod so far where the his value isn't the same as the prototype name.
I guess I'm weirder than I thought. :) Bulk Rail Loaders has to do some funky magic to enable building directly over the top of existing rails.
Miniloader β€” UPS-friendly 1x1 loaders
Bulk Rail Loaders β€” Rapid train loading and unloading
Beltlayer & Pipelayer β€” Route items and fluids freely underground

User avatar
DRY411S
Filter Inserter
Filter Inserter
Posts: 726
Joined: Sun Mar 13, 2016 9:48 am
Contact:

Re: [MOD 0.16] Miniloader

Post by DRY411S »

Therax wrote:
DRY411S wrote:That looks as though it will work thanks. This is the only mod so far where the his value isn't the same as the prototype name.
I guess I'm weirder than I thought. :) Bulk Rail Loaders has to do some funky magic to enable building directly over the top of existing rails.
Confirmed that this was a bug in my new code. All working fine now thanks.

AreYouScared
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Mar 23, 2017 3:32 am
Contact:

Re: [MOD 0.16] Miniloader

Post by AreYouScared »

Seems to not like joining a paused with mini loaders enabled. When joining a modded multiplayer game with this mod i get the following error
mod-miniloader was registered for the following events when the map was saved but has not re-registered them as a result of loading: on_selected_entity_changed (ID 52)
MultiplayerManager failed: "" + multiplayer.script-event-mismatch + "" + "mod-miniloader"
This was also sent to Rseding, as it might not be caused by the mod
Update:
Rseding: It means it isn't written correctly and is doing events wrong.
Image

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Therax »

cjmwid wrote:mod-miniloader was registered for the following events when the map was saved but has not re-registered them as a result of loading: on_selected_entity_changed (ID 52)
MultiplayerManager failed: "" + multiplayer.script-event-mismatch + "" + "mod-miniloader"
Definitely a problem in the mod, and I have a good idea how to fix it.
Miniloader β€” UPS-friendly 1x1 loaders
Bulk Rail Loaders β€” Rapid train loading and unloading
Beltlayer & Pipelayer β€” Route items and fluids freely underground

AreYouScared
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Mar 23, 2017 3:32 am
Contact:

Re: [MOD 0.16] Miniloader

Post by AreYouScared »

Thanks my solution to joining was to just restart the server I'm just happy to doesn't save the paused state
Image

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16] Miniloader

Post by eradicator »

Therax wrote:
DRY411S wrote:That looks as though it will work thanks. This is the only mod so far where the his value isn't the same as the prototype name.
I guess I'm weirder than I thought. :) Bulk Rail Loaders has to do some funky magic to enable building directly over the top of existing rails.
Not really. I've used proxy placers for some really fancy magic haxery in the past :P
-----------------------
Just tried miniloaders for the first time and the render layer order looks wrong with chests. Maybe you could try adding render_layer = "object" to the prototype?
minilayer.jpg
minilayer.jpg (54.3 KiB) Viewed 6149 times
minilayer2.jpg
minilayer2.jpg (77.98 KiB) Viewed 6148 times
(Also i was a bit sad that the secret hidden inserters don't give a magical direct chest-2-chest loading ability. But happy again after discovering the one-tile lane balancing.)

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Therax »

eradicator wrote:Not really. I've used proxy placers for some really fancy magic haxery in the past :P
That makes two of us?
eradicator wrote:Just tried miniloaders for the first time and the render layer order looks wrong with chests. Maybe you could try adding render_layer = "object" to the prototype?
Sadly, render_layer is ignored for inserter-type entities:

Code: Select all

0.863 Warning PrototypeLoader.cpp:132: Value ROOT.inserter.miniloader-inserter.render_layer was not used.
For Bulk Rail Loaders I got around this by having a basic-entity with a custom render_layer, so the loader would render on top of cargo wagons, but for miniloaders that would obscure the circuit connector.
eradicator wrote:(Also i was a bit sad that the secret hidden inserters don't give a magical direct chest-2-chest loading ability. But happy again after discovering the one-tile lane balancing.)
The one-tile lane balancing is an advertised feature in the Long Description of OP, and on the mod portal. :)
therax wrote:put them in your bus as compact priority splitters, or single-belt lane rebalancers.
Miniloader β€” UPS-friendly 1x1 loaders
Bulk Rail Loaders β€” Rapid train loading and unloading
Beltlayer & Pipelayer β€” Route items and fluids freely underground

User avatar
eradicator
Smart Inserter
Smart Inserter
Posts: 5206
Joined: Tue Jul 12, 2016 9:03 am
Contact:

Re: [MOD 0.16] Miniloader

Post by eradicator »

Oh. I assumed you were already using an extra entity for the graphics. So i guess the graphics is the inserter base?
Have you tried "lower_object" (or any of the other layers)? That might work with circuit connectors. Or...you could proxy out the circuit connector as such to a new entity (zero range power pole?). /haxery

I'm just really sensitive to that sort of graphics bug :P

User avatar
SelfDestructor
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Mar 01, 2018 12:46 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by SelfDestructor »

Hi! When pasting a blueprint without any miniloaders in Factorio 0.16.27 with Miniloader version 1.5.11 I get this error:

Code: Select all

Error while running event Bluebuild::on_tick (ID 0)
Error while running event miniloader::on_put_item (ID 9)
__miniloader__/lualib/util.lua:65: invalid direction passed to rotate_box
stack traceback:
	__Bluebuild__/control.lua:131: in function 'bluebuild'
	__Bluebuild__/control.lua:50: in function 'bluecheck'
	__Bluebuild__/control.lua:35: in function 'playerloop'
	__Bluebuild__/control.lua:269: in function <__Bluebuild__/control.lua:268>
If I paste a blueprint with a miniloader in it, I get no errors and the blueprint sets down fine.

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Therax »

SelfDestructor wrote:Hi! When pasting a blueprint without any miniloaders in Factorio 0.16.27 with Miniloader version 1.5.11 I get this error:

Code: Select all

Error while running event Bluebuild::on_tick (ID 0)
Error while running event miniloader::on_put_item (ID 9)
__miniloader__/lualib/util.lua:65: invalid direction passed to rotate_box
stack traceback:
	__Bluebuild__/control.lua:131: in function 'bluebuild'
	__Bluebuild__/control.lua:50: in function 'bluecheck'
	__Bluebuild__/control.lua:35: in function 'playerloop'
	__Bluebuild__/control.lua:269: in function <__Bluebuild__/control.lua:268>
If I paste a blueprint with a miniloader in it, I get no errors and the blueprint sets down fine.
This is a bug in Bluebuild. Until it's fixed, you can work around it by disabling Bluebuild via the in-game hotkeys before placing a blueprint or walking near to blueprint ghosts. Basically anytime Bluebuild tries to build something and you have a blueprint in your cursor, you will see this error. You can reactivate it after clearing the blueprint from your cursor.
Miniloader β€” UPS-friendly 1x1 loaders
Bulk Rail Loaders β€” Rapid train loading and unloading
Beltlayer & Pipelayer β€” Route items and fluids freely underground

AreYouScared
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Mar 23, 2017 3:32 am
Contact:

Re: [MOD 0.16] Miniloader

Post by AreYouScared »

Currently getting this error, Unable to join the server anymore because of it.

Image

Note: Same issue as posted before by me, This time was caused by a client(Only one logged into the server) losing packets and getting disconnected from it.

Again solution was to restart server.
103.344 Verbose Scenario.cpp:260: Map setup finished: 2.153879 seconds.
103.367 Error ClientMultiplayerManager.cpp:1096: mod-miniloader was registered for the following events when the map was saved but has not re-registered them as a result of loading: on_selected_entity_changed (ID 52)
103.367 Error ClientMultiplayerManager.cpp:95: MultiplayerManager failed: "" + multiplayer.script-event-mismatch + "
" + "
mod-miniloader"
103.367 Info ClientMultiplayerManager.cpp:573: MapTick(22316385) changing state from(ConnectedLoadingMap) to(Failed)
105.648 Info ClientMultiplayerManager.cpp:188: Quitting multiplayer connection.
Image

User avatar
SelfDestructor
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Mar 01, 2018 12:46 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by SelfDestructor »

Therax wrote:This is a bug in Bluebuild. Until it's fixed, you can work around it by disabling Bluebuild via the in-game hotkeys before placing a blueprint or walking near to blueprint ghosts. Basically anytime Bluebuild tries to build something and you have a blueprint in your cursor, you will see this error. You can reactivate it after clearing the blueprint from your cursor.
Thank you! I kept reading "blueprint" in my head so it didn't even hit me that it was another mod.

Lindetwin
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Mar 02, 2018 2:09 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Lindetwin »

I use version 1.5.11. Everytime i make a blueprint with the mod installed it crashes.
Photo of the crash in the attachements.
Attachments
unknown.png
unknown.png (595.11 KiB) Viewed 6084 times

User avatar
Therax
Filter Inserter
Filter Inserter
Posts: 470
Joined: Sun May 21, 2017 6:28 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Therax »

cjmwid wrote:Currently getting this error, Unable to join the server anymore because of it.

Note: Same issue as posted before by me, This time was caused by a client(Only one logged into the server) losing packets and getting disconnected from it.

Again solution was to restart server.
What version of miniloader are you running? I believe this should have been fixed in 1.5.11.
Lindetwin wrote:I use version 1.5.11. Everytime i make a blueprint with the mod installed it crashes.
You are running an outdated experimental of 0.16.x. Please update to the latest.
Miniloader β€” UPS-friendly 1x1 loaders
Bulk Rail Loaders β€” Rapid train loading and unloading
Beltlayer & Pipelayer β€” Route items and fluids freely underground

Lindetwin
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Mar 02, 2018 2:09 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Lindetwin »

Thank you for responing so fast, i really appriciate it. i will now look if this works.

Lindetwin
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Mar 02, 2018 2:09 pm
Contact:

Re: [MOD 0.16] Miniloader

Post by Lindetwin »

It worked, again thanks for the mod and your help.

AreYouScared
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Thu Mar 23, 2017 3:32 am
Contact:

Re: [MOD 0.16] Miniloader

Post by AreYouScared »

Therax wrote:
cjmwid wrote:Currently getting this error, Unable to join the server anymore because of it.

Note: Same issue as posted before by me, This time was caused by a client(Only one logged into the server) losing packets and getting disconnected from it.

Again solution was to restart server.
What version of miniloader are you running? I believe this should have been fixed in 1.5.11.

Version 1.5.11 we are running.


Just ran into another issue,
168224.575 Error MainLoop.cpp:1031: Exception at tick 27915619: Error while running event miniloader::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
__miniloader__/circuit.lua:9: in function 'sync_filters'
__miniloader__/gui.lua:16: in function 'handler'
__miniloader__/lualib/ontick.lua:18: in function 'handler'
__miniloader__/lualib/event.lua:16: in function <__miniloader__/lualib/event.lua:8>
168224.575 Error ServerMultiplayerManager.cpp:96: MultiplayerManager failed: "Error while running event miniloader::on_tick (ID 0)
LuaEntity API call when LuaEntity was invalid.
stack traceback:
__miniloader__/circuit.lua:9: in function 'sync_filters'
__miniloader__/gui.lua:16: in function 'handler'
__miniloader__/lualib/ontick.lua:18: in function 'handler'
__miniloader__/lualib/event.lua:16: in function <__miniloader__/lualib/event.lua:8>"
168224.575 Info ServerMultiplayerManager.cpp:698: mapTick(27915619) changing state from(InGame) to(Failed)
Two players on multiplayer, One has the GUI open, the other mines the loader, causes the server to crash
Image

Post Reply

Return to β€œMods”