[MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Topics and discussion about specific mods
hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by hreintke »

valneq is right
I am using Bob's logistic ultimate-transport-belts, and have "deadlock-integrations" as mod to integrate those with stacking beltbox.
They indeed are colored green, as is the beltbox I use.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

Oh, Bob's.

Anyway, I think this is probably working as intended, but shanemadden can confirm. The sentence quoted may be misleading. Beltboxes can handle a fully compressed belt of the same tier as unstacked input. A single beltbox cannot saturate a belt with the stacked output, nor can it unstack a fully saturated belt of stacked input. A red belt full of stacked steel plates is equivalent to five red belts of unstacked steel plates, so five beltboxes would be required to fully unstack that total throughput.

This is how it has been for the last two years.

Image
Image

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by hreintke »

OK, understand.
I indeed read the sentence as : It is possible to unstack a fully saturated belt of stacked input.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

If you think about it, that's impossible for a 1x1 machine, given that the unstacking recipes are the same speed as the stacking recipes. The beltbox would need five free adjoining tiles. If the beltboxes could unstack a compressed belt of stacked items, they would never be able to unload it all quickly enough because as you've discovered, the limit of output loaders you can attach is three. The main utility there is being able to have three yellow loaders coming off a blue unstacking beltbox, but then other mods go adding mega-uber-belts-9000 tiers and I lose interest.

When four-dimensional Factorio 2 comes out with hyperspace loaders that can attach 24 times to a 1x1x1x1 beltbox, maybe we can look into it.
Image

Mecejide
Fast Inserter
Fast Inserter
Posts: 170
Joined: Mon Sep 23, 2019 8:12 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Mecejide »

Deadlock989 wrote:
Fri Feb 14, 2020 4:35 pm
If you think about it, that's impossible for a 1x1 machine, given that the unstacking recipes are the same speed as the stacking recipes. The beltbox would need five free adjoining tiles. If the beltboxes could unstack a compressed belt of stacked items, they would never be able to unload it all quickly enough because as you've discovered, the limit of output loaders you can attach is three. The main utility there is being able to have three yellow loaders coming off a blue unstacking beltbox, but then other mods go adding mega-uber-belts-9000 tiers and I lose interest.

When four-dimensional Factorio 2 comes out with hyperspace loaders that can attach 24 times to a 1x1x1x1 beltbox, maybe we can look into it.
4D Factorio would probably use tesseracts instead of hexadecachora, icositetrachora, or great prismatodecachora for the same reasons that 2D Factorio uses squares instead of triangles or hexagons.

User avatar
ptx0
Smart Inserter
Smart Inserter
Posts: 1507
Joined: Wed Jan 01, 2020 7:16 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by ptx0 »

Deadlock989 wrote:
Fri Feb 14, 2020 4:35 pm
If you think about it, that's impossible for a 1x1 machine, given that the unstacking recipes are the same speed as the stacking recipes. The beltbox would need five free adjoining tiles. If the beltboxes could unstack a compressed belt of stacked items, they would never be able to unload it all quickly enough because as you've discovered, the limit of output loaders you can attach is three. The main utility there is being able to have three yellow loaders coming off a blue unstacking beltbox, but then other mods go adding mega-uber-belts-9000 tiers and I lose interest.

When four-dimensional Factorio 2 comes out with hyperspace loaders that can attach 24 times to a 1x1x1x1 beltbox, maybe we can look into it.
you deleted it, but bob's will allow you to get 24 inserters off of a 1x1 machine.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

ptx0 wrote:
Sat Feb 15, 2020 10:58 am
you deleted it, but bob's will allow you to get 24 inserters off of a 1x1 machine.
I didn't delete it. A moderator deleted it, along with your malicious little attack, and your hilarious little lecture on the merits of "creativity". Yes, that's right, someone whose sole contribution to the community so far has been thieving other people's work and impersonating other modders is lecturing people on creativity.

Now fuck off back to your thieving and begging for money.
Image

chrisdec
Fast Inserter
Fast Inserter
Posts: 233
Joined: Fri May 27, 2016 7:50 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by chrisdec »

hello,
i have an error when loading factorio with your mod

https://i.imgur.com/CMFm1I2.jpg

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

chrisdec wrote:
Sun Feb 16, 2020 7:09 am
hello,
i have an error when loading factorio with your mod

https://i.imgur.com/CMFm1I2.jpg
Can't reproduce with the minimal info given. At first glance it looks like maybe you are passing bad data to the DSB API - if there's a bug here it's that it's not checking the sanity of the input. But unless you tell us how to reproduce this situation exactly, it will be hard to find out.
Image

chrisdec
Fast Inserter
Fast Inserter
Posts: 233
Joined: Fri May 27, 2016 7:50 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by chrisdec »

Deadlock989 wrote:
Sun Feb 16, 2020 12:01 pm
chrisdec wrote:
Sun Feb 16, 2020 7:09 am
hello,
i have an error when loading factorio with your mod

https://i.imgur.com/CMFm1I2.jpg
Can't reproduce with the minimal info given. At first glance it looks like maybe you are passing bad data to the DSB API - if there's a bug here it's that it's not checking the sanity of the input. But unless you tell us how to reproduce this situation exactly, it will be hard to find out.
thanks for the info ill check it again,but it seems to be an error on my end
i apologise for the mistake :oops:

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by hreintke »

This question is not related to the above errormessage.

And : no issue, just a question to understand startup sequence.
I am working on a mod which updates the stacked items from the beltbox mod (f.e. stacksize).
Reading the documentation on data lifecycle , https://lua-api.factorio.com/latest/Data-Lifecycle.html,
I expected that I should to do that in the data-updates.lua.
At that moment I am sure the beltbox mod has created the stacked items in data.lua and I can make updates to it.
But beltbox data-final-fixes.lua updates the stacked-items again (executing deferred_stacked_item_updates), reverting mine.
Solved it by setting dependency in my mod.

But for my understanding : why is deferred_stacked_item_updates needed ?

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

chrisdec wrote:
Sun Feb 16, 2020 1:27 pm
thanks for the info ill check it again,but it seems to be an error on my end
i apologise for the mistake :oops:
If you tell us how this happened, we might be able to catch it and give a more helpful error message.
Image

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

hreintke wrote:
Sun Feb 16, 2020 1:47 pm
Solved it by setting dependency in my mod.

But for my understanding : why is deferred_stacked_item_updates needed ?
shane added deferred_stacked_item_updates to attempt to undo shenanigans caused by other mods. It was an attempt to cope with other mods suddenly changing item properties at any random part of the data stage they chose, after the original item had been created and after DSB had made the stacked version - fuel values, stack sizes etc. - without having to add a dependency list to the mod that's as long as your arm.

Ideally it wouldn't be there, but we set the precedent that we would support those big and/or popular mods and now we're stuck with it.
Image

hreintke
Fast Inserter
Fast Inserter
Posts: 115
Joined: Mon Sep 04, 2017 6:52 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by hreintke »

OK,
Thanks for explaining.

recall2000
Inserter
Inserter
Posts: 23
Joined: Sun Feb 16, 2020 10:37 pm
Contact:

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by recall2000 »

Deadlock989 wrote:
Sun Feb 16, 2020 12:01 pm
Can't reproduce with the minimal info given. At first glance it looks like maybe you are passing bad data to the DSB API - if there's a bug here it's that it's not checking the sanity of the input. But unless you tell us how to reproduce this situation exactly, it will be hard to find out.
It wasn't me who originally reported the error, but I can reproduce it. It seems it's something to do with Py AlienLife 1.1.5 and/or Deadlock's Stacking for Pyanodon 0.2.0 rather than this mod. I stripped my mods back and can get the error message under specific combinations:

Factorio 0.18.6 (Steam) with the following mods works:

Factorio Standard Library 1.4.1
Pyanodons AlienLife 1.1.5
Pyanodons AlienLife Graphics 1.04
Pyanodons AlienLife Graphics 2 1.0.1
Pyanodons AlienLife Graphics 3 1.0.1
Pyanodons Coal Processing 1.6.2
Pyanodons Coal Processing Graphics 1.0.2
Pyanodons Fusion Energy 1.5.9
Pyanodons Fusion Energy Graphics 1.0.1
Pyanodons HighTech 1.5.1
Pyanodons HighTech Graphics 1.0.1
Pyanodons Industry 1.4.2
Pyanodons Petroleum Handling 1.6.6
Pyanodons Petroleum Handling Graphics 1.0.1
Pyanodons Raw Ores 1.9.8
Pyanodons Raw Ores Graphics 1.0.1
Deadlock's Stacking Beltboxes & Compact Loaders 2.3.0

Add in Deadlock's Stacking for Pyanodon 0.2.0 and it errors as with the message already reported.
Leave both of your mods in and remove Pyanodons AlienLife 1.1.5 (and the 3 associated graphics mods) and it works fine.

Not sure if that helps, but that's what I've managed to recreate.

Thanks.

Code: Select all

7.193 Mods to disable:Failed to load mods: __deadlock-beltboxes-loaders__/prototypes/create_stack.lua:4: attempt to index field '?' (a nil value)
stack traceback:
	__deadlock-beltboxes-loaders__/prototypes/create_stack.lua:4: in function 'get_group'
	__deadlock-beltboxes-loaders__/prototypes/create_stack.lua:74: in function 'deferred_stacked_item_updates'
	__deadlock-beltboxes-loaders__/prototypes/public.lua:204: in function 'deferred_stacked_item_updates'
	__deadlock-beltboxes-loaders__/data-final-fixes.lua:2: in main chunk

Mods to be disabled:
• deadlock-beltboxes-loaders
Last edited by recall2000 on Sun Feb 16, 2020 10:51 pm, edited 3 times in total.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

recall2000 wrote:
Sun Feb 16, 2020 10:48 pm
Add in Deadlock's Stacking for Pyanodon 0.2.0 and it errors as with the message already reported.
Leave both of your mods in and remove Pyanodons AlienLife 1.1.5 (and the 3 associated graphics mods) and it works fine.
Thanks for the detail. I think this is likely a minor flaw in DSB that only comes to light in a very specific circumstance, and that circumstance may or may not be triggered by an item called "fawogae" when PyAlienLife is running.

I will investigate a bit further, this might not be something we can "fix" exactly, but at least DSB should be able to handle this more gracefully.

Edited to add: it seems that there is no such item as "fawogae" at the time DSB runs its deferred updates pass, but the item did exist at the time that Deadlock's Stacking for Pyanodon asked DSB to stack it, and some other mod deleted it in the meantime. I have made a pull request to shane to handle this without crashing, but it is up to the third party stacking mod (Stacking for Pyanodon in this case) to make sure that it is asking for the right stuff to be stacked. (I also note that Stacking for Pyanodon is still using legacy DSB functions and the log spam is horrendous.)
Image

billbo99
Fast Inserter
Fast Inserter
Posts: 131
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [MOD 0.17] Deadlock's Stacking Beltboxes & Compact Loaders

Post by billbo99 »

Deadlock989 wrote:
Tue Jan 28, 2020 6:47 pm
billbo99 wrote:
Sun Nov 24, 2019 3:29 pm
Can you PM me some sample python code on how you would merge a factorio stock icon image 3x times with a slight shift ?
Thanks for the code example, sorry it took me a while to investigate further.

I worked out there were 44 combinations that 3 icons could be placed. Different in-game icons look better using different permutations.
Stacks.jpg
Stacks.jpg (24.37 KiB) Viewed 4531 times
This is an example using plastic bars
plastic-bar.png
plastic-bar.png (93.35 KiB) Viewed 4531 times

mrvn
Smart Inserter
Smart Inserter
Posts: 5696
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: [MOD 0.17] Deadlock's Stacking Beltboxes & Compact Loaders

Post by mrvn »

billbo99 wrote:
Mon Feb 17, 2020 12:26 pm
Deadlock989 wrote:
Tue Jan 28, 2020 6:47 pm
billbo99 wrote:
Sun Nov 24, 2019 3:29 pm
Can you PM me some sample python code on how you would merge a factorio stock icon image 3x times with a slight shift ?
Thanks for the code example, sorry it took me a while to investigate further.

I worked out there were 44 combinations that 3 icons could be placed. Different in-game icons look better using different permutations.

Stacks.jpg

This is an example using plastic bars
plastic-bar.png
The plastic bars in the 4th row column 3 and 5 look the same to me. Is there one configuration missing while you have one twice?

What I think would look good is 2 plastic bars side by side with the third stacked on top. None of the generated ones have quite the right alignment for this. This would have to be done by hand.

But if you go with those generated stacks this could use the new features that items can have multiple images. Why should each stack look the same? Maybe pick a few sensible configurations from those 44 and make images with them. Stacks would then be somewhat random, like the belt box just threw some items on a heap.

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD 0.17] Deadlock's Stacking Beltboxes & Compact Loaders

Post by Deadlock989 »

billbo99 wrote:
Mon Feb 17, 2020 12:26 pm
Thanks for the code example, sorry it took me a while to investigate further.

I worked out there were 44 combinations that 3 icons could be placed. Different in-game icons look better using different permutations.
Very nice. You could generate, say, 4-6 of these randomly, and then use the belt variants feature for disordered stacking on belts.

However - I tested that kind of thing for IR, and there is something viscerally horrifying about things like plates being randomly positioned on belts. It works fine for things like ore and raw products, it just screams wrong for nice "finished" things like circuits and plates.
Image

billbo99
Fast Inserter
Fast Inserter
Posts: 131
Joined: Fri Nov 02, 2018 9:19 am
Contact:

Re: [MOD 0.17] Deadlock's Stacking Beltboxes & Compact Loaders

Post by billbo99 »

mrvn wrote:
Mon Feb 17, 2020 12:37 pm

The plastic bars in the 4th row column 3 and 5 look the same to me. Is there one configuration missing while you have one twice?
Its just the order of the back two icon are different. Its hard to tell the difference with most icons as they are soild. However with rails you can see the overlaps are different.

rail.png
rail.png (188.05 KiB) Viewed 4505 times

Post Reply

Return to “Mods”