[MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Topics and discussion about specific mods
User avatar
Xagros
Inserter
Inserter
Posts: 40
Joined: Thu Jul 20, 2017 4:11 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Xagros »

TRauMa wrote:Well, that's what happens when you let a month pass between doing your research and looking at the licenses, and actually doing something and publishing it. It seems I mixed up your and orzolek's mod licenses. I also was under the (wrong?) impression that you used orzolek's as base for yours.

I should have a bit of time in the next days and will look at MoreBobs, to incorporate item definitions I'm missing, and using imagemagick or something alike to create the stacked icons automatically, now that I have permission by bobingabout at least (Arch666Angel seems absent for now).

From then, it'll probably be maintenance.
My mod is a separate and distinct mod from orzolek's mod. (It was even included in my mod first.)
This will also have a different code structure.
Good luck with your work.
ImageImage

TRauMa
Inserter
Inserter
Posts: 40
Joined: Fri Jan 15, 2016 3:48 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by TRauMa »

Xagros wrote:My mod is a separate and distinct mod from orzolek's mod. (It was even included in my mod first.)
This will also have a different code structure.
Good luck with your work.
Yeah, I had a look at it. I wasn't aware that you included icons for all the stacks as well, and went to quite some length to react to gfx changes coming from other mods, too. I'm a bit confused, though, as there's no mention of special provisions for icons derived from Bob's and Angel's, licence wise. Are they really just MIT?

I guess you already used some kind of automation to create all these icons?

Anyway, I'm a bit unsure how to proceed now. Some complete package that includes everything from you and me would be best for users, I guess, and staying compatible so it's save to switch to MoreBobs from only the stacking support, and back again. If that's possible, licence wise, and if you're open to add stuff (mainly ingots), that would be by far my preferred route, even if it means I'll have to write migrations to move my recipes to the tech levels you use (or leave the people that downloaded my mod so far in the rain, which I'd like to avoid).

I also have some ideas to simplify the lua you use, but I guess that'd only make sense if you had any interest in potentially merging those changes back, otherwise it'd only create more differences.

And the more I think about it, the more I wonder if it really is such a big performance hit to use composited icons, and if yes, I should talk to wube about caching them, particularly now, when they're finishing up the new backend. Creating them on the fly in the game would certainly solve a lot of problems.

orzelek
Smart Inserter
Smart Inserter
Posts: 3911
Joined: Fri Apr 03, 2015 10:20 am
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by orzelek »

What you are describing are reasons why I did not continue my mod.

To make this mod proper you need to generate each possible stacked variant icon for mods you are supporting and switch them around depending on current mod composition.

And then you have licensing to take care of and keeping track of various mod combinations that can affect item looks etc.

It's a lot of work that I did not plan to take on right now.
Here is a batch to make stacked icons with ImageMagick:

Code: Select all

@echo off
setlocal enabledelayedexpansion
for %%f in (*.png) do (
c:\ImageMagick\convert -size 32x32 canvas:transparent -background transparent -alpha on ^
		 ^( "%%f" -resize 26x26 -repage +0+6 ^
         ^( +clone -repage +6+6 ^) ^
         ^( +clone -repage +0+0 ^) ^
         ^( +clone -repage +6+0 ^) ^)^
        -flatten -unsharp 0x6+0.5+0 png32:".\stacks\%%~nf-stack.png"
)
It'll go through all icons in current folder and save them in stacks folder.

User avatar
Xagros
Inserter
Inserter
Posts: 40
Joined: Thu Jul 20, 2017 4:11 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Xagros »

TRauMa wrote:Yeah, I had a look at it. I wasn't aware that you included icons for all the stacks as well, and went to quite some length to react to gfx changes coming from other mods, too. I'm a bit confused, though, as there's no mention of special provisions for icons derived from Bob's and Angel's, licence wise. Are they really just MIT?

I guess you already used some kind of automation to create all these icons?

Anyway, I'm a bit unsure how to proceed now. Some complete package that includes everything from you and me would be best for users, I guess, and staying compatible so it's save to switch to MoreBobs from only the stacking support, and back again. If that's possible, licence wise, and if you're open to add stuff (mainly ingots), that would be by far my preferred route, even if it means I'll have to write migrations to move my recipes to the tech levels you use (or leave the people that downloaded my mod so far in the rain, which I'd like to avoid).

I also have some ideas to simplify the lua you use, but I guess that'd only make sense if you had any interest in potentially merging those changes back, otherwise it'd only create more differences.

And the more I think about it, the more I wonder if it really is such a big performance hit to use composited icons, and if yes, I should talk to wube about caching them, particularly now, when they're finishing up the new backend. Creating them on the fly in the game would certainly solve a lot of problems.
I have created a new icon by referring to the link below.

viewtopic.php?f=190&t=19970
viewtopic.php?f=185&t=58136&p=345448#p345448

Thank you for your good suggestion. Let me take your opinion. I hope the mod will develop further.
ImageImage

Rectorian
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Jun 30, 2017 11:39 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Rectorian »

Hey, I'm wondering if it would be possible to add functionality to detect and automatically adjust the crafting speed of each stacking beltbox for bob's mods belt overhaul? I'm guessing you already know what this does, but for those who don't, it changes the base belt speed to allow 10 items per second throughput and increases by 10 for each tier of belt. This means the yellow stacking beltbox is slower than the yellow belts by about 6.6 items per second. This would be extremely useful to allow throughput for each tier of belt to be the same.
Hope this can be implemented easily if you decide to add it.
Thanks!

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

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Deadlock989 »

Rectorian wrote:Hey, I'm wondering if it would be possible to add functionality to detect and automatically adjust the crafting speed of each stacking beltbox for bob's mods belt overhaul? I'm guessing you already know what this does, but for those who don't, it changes the base belt speed to allow 10 items per second throughput and increases by 10 for each tier of belt. This means the yellow stacking beltbox is slower than the yellow belts by about 6.6 items per second. This would be extremely useful to allow throughput for each tier of belt to be the same.
Hope this can be implemented easily if you decide to add it.
Thanks!
DSB already detects belt speeds. Each tier of beltbox gets its crafting speed from the corresponding belt. It used to work with Bob's, maybe he's changed something again.

Edited to add: re-tested with Bob's Logistics 0.16.23, seems to work correctly both with and without the belt speed overhaul option on.
Image

Necrosapien1
Manual Inserter
Manual Inserter
Posts: 2
Joined: Thu Sep 01, 2016 8:02 am
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Necrosapien1 »

So I recently got your mod. And have really been enjoying it. Then I realized I have loaders with it. I have never used loaders before. (I am still just a noob. Only 2K hours in the game. Mostly while sleeping and hoping my walls hold out till I wake up. lol) So I started using them a lot and then a thought occurred to me. What if I started a game and had it all the way without using any inserters. Just loaders. lol. Its kinda costly and space consuming. But it is coming along. Really like the boost I get in my labs. Holding more then it will using inserters. So thanks for this mod Deadlock. You rock.

Image

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

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Deadlock989 »

Necrosapien1 wrote:So thanks for this mod Deadlock. You rock.
You're welcome. You could save half that space by using Deadlock's Compact Loaders.

A note for anyone posting here: I'm not around for most of July. I'm getting married this weekend and then have a couple of weeks of doing not much more than just sipping sticky cocktails out of pineapples with little umbrellas in them - so I won't see any messages posted here until the end of the month. These mods seem pretty stable so I don't plan on doing any more with them until 0.17 anyway (so probably Xmas), but I'm looking forward to that.
Image

Rectorian
Manual Inserter
Manual Inserter
Posts: 3
Joined: Fri Jun 30, 2017 11:39 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Rectorian »

My bad, I must be having issues somewhere else on my belts then. Thanks for letting me know!

varaco
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jul 11, 2018 9:21 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by varaco »

hello, is there any way, even modifying the mod code to have a compression rate different than 5x? I don't care about the icons, they can stay the same as now. I know about the crate mod but I'd rather not have to deal with crates

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

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by mrvn »

varaco wrote:hello, is there any way, even modifying the mod code to have a compression rate different than 5x? I don't care about the icons, they can stay the same as now. I know about the crate mod but I'd rather not have to deal with crates
yes, scroll up.

varaco
Manual Inserter
Manual Inserter
Posts: 4
Joined: Wed Jul 11, 2018 9:21 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by varaco »

mrvn wrote:
varaco wrote:hello, is there any way, even modifying the mod code to have a compression rate different than 5x? I don't care about the icons, they can stay the same as now. I know about the crate mod but I'd rather not have to deal with crates
yes, scroll up.
I read it now, however I see there could be problems with changing the value. Has anyone tried to increase it?

nosports
Filter Inserter
Filter Inserter
Posts: 274
Joined: Fri Jan 19, 2018 5:44 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by nosports »

hello,

i tried out your mod......
works like a charm....

I got a weird idea basen on to much alcohol...
why not make a dried up stack for more compression and other things....

would use a heap of energy to dry the e.g Rocket-silo and will need water to expand it later again

Ayj it would for fun just.... :lol: 8-)

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

Feature request: stacker, unstacker and pass-through

Post by mrvn »

I've been playing around with stacking beltboxes a while. I also love using mixed or programmed belts where throughput of a single item isn't filling a belt. Combining the two yields some challenges.

I have a system like the logistic network but with belts and warehouses. Belts connect a series of warehouses and wires between the warehouses carry signals what each warehouse lacks. If one warehouse has something a neighbour lacks then it is put on the belt going to that warehouse. At the end I have chests and assembler, furnaces or chemical plants. The chests request via wire whatever the factory needs.

Obviously it would be a huge benefit to stack items transported between warehouses. But then they need to be unstacked before the assemblers, furnaces or chemical plants. And that's where I run into problems. Not everything can be stacked. And when an unstacked item is mixed on the belt with stacked items then they need to be filtered for unstacking. And maybe later more things can be stacked and all the filters have to be changed all over the map. All the warehouses have to be searched to see if any unstacked items are left over and stack them or remove them. And you can't filter for "stack of anything" but have to list every possible stacked thing. This requires many spliters or filter inserters.

So I've been thinking of how to solve this to make it easier and here is my idea:

1) Stacking and unstacking is done in different entities.
2) A stacker will stack anything it knows how to stack and leave everything else alone. I imagine just adding recipes to the stacker that take 1 of anything and output one of anything (or 5 to 5). Ideally belt boxes would start with mostly 1:1 recipes but change them to 5:1 recipes as you research more. So at the start green circuit boards are passed through but later they are stacked. I imagine this needs the 1:1 recipes to get locked when you research more.
3) Similar an unstacker unstacks anything stacked and leaves everything else as is. That includes things it knows how to unstack. So a stack of iron ore gets unstacked and iron ore gets passed through. Again recipes for everything should work. No need to remove any, just unlock more as research progresses.

It might be possible to keep a single belt box but with a gui to set it to stack, unstack or both. Default to both for backward compatibility.

What do you think?

Grize
Burner Inserter
Burner Inserter
Posts: 8
Joined: Fri May 04, 2018 5:31 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Grize »

Hi, first of all you make a good mod that i love so muth to play with.
Espacially i work with the loaders for a direct load and unlaod my assemblers and warehouses. But the snapping logic is a pain. Not even by placing the first time a loader in its position, but also when i try to upgrade these to an higher tier loader.
So my idea is, why can why not rotate the whole loader itself? The rotating logic with R only changes the direction of the in- and output. But is it possible to make a rotation of the loader by a combination of R with say we the ALT-Key? This could be an alternative to place and replace again and again and again...

Arch-kain
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Jan 25, 2018 11:12 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Arch-kain »

I saw the 2 snapping logics in this mod, each of them have goods & bads.
Actually, I prefer miniloader snapping logic. It seems to re-snap when belt direction changed, and this behavior is more intuitive. But I do not know if it consumes more UPS to check that.

@Grize is right for the last snapping logic, but I would like to add :
If we use the mod Upgrade planner, some of DCL change their direction. Not just input / output ; ie. chest => container link => DCL = chest => belt link => DC)

And I want to say, thanks a lot for these beautiful mods

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

Re: Feature request: stacker, unstacker and pass-through

Post by Deadlock989 »

varaco wrote:I read it now, however I see there could be problems with changing the value. Has anyone tried to increase it?
Like I said before - the only tested alternative value was 4. Upward increases weren't tested, this isn't really an official feature. My gut instinct is that it should work OK - meaning that the boxes should adjust their speeds automatically etc. But it will become unusable pretty quickly if you increase it too much - even 10 would probably start creating jams and all sorts, and vanilla loaders will start doing odd things with the lanes they output on etc. The other issue is that the stacking size needs to be a factor of 50, 100 and 200, which doesn't leave you many options. Any non-factor, e.g. 7, will result in wasted inventory space across the whole game.
mrvn wrote:...
So I've been thinking of how to solve this to make it easier and here is my idea:

1) Stacking and unstacking is done in different entities.
2) A stacker will stack anything it knows how to stack and leave everything else alone. I imagine just adding recipes to the stacker that take 1 of anything and output one of anything (or 5 to 5). Ideally belt boxes would start with mostly 1:1 recipes but change them to 5:1 recipes as you research more. So at the start green circuit boards are passed through but later they are stacked. I imagine this needs the 1:1 recipes to get locked when you research more.
3) Similar an unstacker unstacks anything stacked and leaves everything else as is. That includes things it knows how to unstack. So a stack of iron ore gets unstacked and iron ore gets passed through. Again recipes for everything should work. No need to remove any, just unlock more as research progresses.

It might be possible to keep a single belt box but with a gui to set it to stack, unstack or both. Default to both for backward compatibility.

What do you think?
This would be a radical change to the mod and at first glance I don't see a straightforward way of doing it without breaking backwards compatability. I don't think there is a way of giving individual entities a gui that changes the recipe set they use. Unless you had multiple entities and a GUI element that swapped them ... but it sounds like a headache.

I think at one point I did consider having stackers "pass through" anything which can't be stacked, but it would cause problems, most notably a substantial proliferation of recipes - I've read about other mods encountering issues when you have multiple recipes producing the same output, and this suggestion would require multiple recipes for every single item in the game. My gut instinct is that this kind of advanced set-up is outside the scope of the mod, which is really only intended to compress large buses and was never intended to work with mixed item belts.

The Factorio devs tend to resist calls to "make it easier" ... Beltboxes are supposed to be a low level simple machine on the order of an inserter, not an all-in-one solution to complex logistical problems.
Grize wrote:So my idea is, why can why not rotate the whole loader itself? The rotating logic with R only changes the direction of the in- and output. But is it possible to make a rotation of the loader by a combination of R with say we the ALT-Key? This could be an alternative to place and replace again and again and again...
I don't think this is possible. If it is, I don't know how to do it off the top of my head.
Arch-kain wrote:I saw the 2 snapping logics in this mod, each of them have goods & bads.
Actually, I prefer miniloader snapping logic. It seems to re-snap when belt direction changed, and this behavior is more intuitive. But I do not know if it consumes more UPS to check that.

@Grize is right for the last snapping logic, but I would like to add :
If we use the mod Upgrade planner, some of DCL change their direction. Not just input / output ; ie. chest => container link => DCL = chest => belt link => DC)

And I want to say, thanks a lot for these beautiful mods
Belt snapping is one of those things which is always going to be down to personal preference to some degree. It's a complex problem and whatever solution you pick, it won't please everyone. For example, you like it when loaders "watch" for adjacent belts being rotated - I don't like it because I might want to change a belt temporarily but have the loader stay as it is. So either you end up with a million check-boxes in options and no-one can make sense of it, or, people just have to take it the way it is and turn snapping off if they find it all too jarring. Or use the mod they prefer.

Upgrade Planner should not be changing any directions or modes though. If it's applying snapping on upgrade, which it shouldn't be, it could be a similar event problem like the ones from before with Bluebuild and Nanobots. I would need more detail (i.e. steps to reliably reproduce the issue, ideally with a save or at least a picture) before I looked at it. But didn't I read somewhere that something like Upgrade Planner was going to be included in vanilla 0.17, or am I making that up? I don't really want to add new features before 0.17, but I will fix it if it's clearly a bug.
Last edited by Deadlock989 on Thu Jul 26, 2018 9:42 am, edited 3 times in total.
Image

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

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by mrvn »

Arch-kain wrote:I saw the 2 snapping logics in this mod, each of them have goods & bads.
Actually, I prefer miniloader snapping logic. It seems to re-snap when belt direction changed, and this behavior is more intuitive. But I do not know if it consumes more UPS to check that.

@Grize is right for the last snapping logic, but I would like to add :
If we use the mod Upgrade planner, some of DCL change their direction. Not just input / output ; ie. chest => container link => DCL = chest => belt link => DC)

And I want to say, thanks a lot for these beautiful mods
The snapping (if it even works at all) should allow placing a loader right the first time. It's too bad it still places it the opposite way when using bluebuilt (the original now, same problem as the rewrite). You place the loader blueprint facing an assembler and it ends up with the belt facing the assembler and such. Only way to use it is to turn off the snapping options and then you can't manually place loaders the right way, they always unload (but at least you can rotate that).

I imagine the upgrade planner is exactly the same problem.Loaders also change direction when you place a yellow loader over a black one. They don't seem to preserve direction on replacement.

Arch-kain
Burner Inserter
Burner Inserter
Posts: 14
Joined: Thu Jan 25, 2018 11:12 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Arch-kain »

Deadlock989 wrote:Belt snapping is one of those things which is always going to be down to personal preference to some degree. It's a complex problem and whatever solution you pick, it won't please everyone. For example, you like it when loaders "watch" for adjacent belts being rotated - I don't like it because I might want to change a belt temporarily but have the loader stay as it is. So either you end up with a million check-boxes in options and no-one can make sense of it, or, people just have to take it the way it is and turn snapping off if they find it all too jarring. Or use the mod they prefer.
I agree ! ^-^ And I adapted myself to DCL's new snapping system.
But, actually, that would be cool if a standalone mod could manage snapping for all type of loaders :D
Deadlock989 wrote:Upgrade Planner should not be changing any directions or modes though. If it's applying snapping on upgrade, which it shouldn't be, it could be a similar event problem like the ones from before with Bluebuild and Nanobots. I would need more detail (i.e. steps to reliably reproduce the issue, ideally with a save or at least a picture) before I looked at it.
I use Upgrade Builder and Planner. I do not know if you're talking about this one or Upgrade Builder and Planner 2

I have both snapping options activated.

Before upgrade: https://i.imgur.com/KoIzQLk.png
After upgrade: https://i.imgur.com/Xr8MqYY.png
If I downgrade, DCLs will have the right direction (like before upgrade)

With both snapping options deactivated, there's no change with upgrade/downgrade.
(There is enough informations?)
Deadlock989 wrote:With both snapping options deactivated., there's no change.
But didn't I read somewhere that something like Upgrade Planner was going to be included in vanilla 0.17, or am I making that up? I don't really want to add new features before 0.17, but I will fix it if it's clearly a bug.
Really? It would be great :mrgreen:
Personally, I waiting 0.17 to play Factorio again. I am a noob with these mods, so I overdosed lol. So, do not rush for me huh ^^

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

Re: [MOD 0.16.x] Deadlock's Stacking Beltbox (& Compact Loaders)

Post by Deadlock989 »

Arch-kain wrote:Before upgrade: https://i.imgur.com/KoIzQLk.png
After upgrade: https://i.imgur.com/Xr8MqYY.png
If I downgrade, DCLs will have the right direction (like before upgrade)

With both snapping options deactivated, there's no change with upgrade/downgrade.
(There is enough informations?)
That's useful, thanks. I will investigate later.

To clarify - when you say "If I downgrade, DCLs will have the right direction (like before upgrade)" - do you mean that this only happens when you go yellow > red, not red > yellow? Or do you mean that it only returns to the correct direction if you go yellow > red > yellow?
Image

Post Reply

Return to “Mods”