[MOD] Deadlock's Stacking Beltboxes & Compact Loaders

Topics and discussion about specific mods
mrvn
Smart Inserter
Smart Inserter
Posts: 5683
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

Code: Select all

  14.018 Script @__deadlock-beltboxes-loaders__/prototypes/create_stack.lua:160: DBL.add_stacks_to_tech(item_name=slag, target_technology=deadlock-stacking-0)
  14.018 Error ModManager.cpp:1283: Failed to load mod "deadlock-stacking-crating-bobs": __deadlock-beltboxes-loaders__/prototypes/create_stack.lua:163: attempt to index field '?' (a nil value)
stack traceback:
	__deadlock-beltboxes-loaders__/prototypes/create_stack.lua:163: in function 'add_stacks_to_tech'
	__deadlock-beltboxes-loaders__/prototypes/public.lua:175: in function 'create'
	__deadlock-stacking-crating-bobs__/data-final-fixes.lua:132: in main chunk
Looks like it tries to stack slag before it created the grey basic-loader tech. This is with bobs+angles mods in an updated Seablock pack.

Removing deadlock-stacking-crating-bobs removes the problem. From the description I guess that deadlock-integrations_2.0.0 is supposed to replace that one. Seems to be pretty non functional though. It doesn't seem to add any stackings, only the belt boxes. So none of bobs/angels items can be stacked.

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

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

Post by mrvn »

Beltboxes of tire X+1 should depend on tire X. In the tech tree the "Logistics-X" depend on each other and "Stacking-X" depends on "Logistic-X". So you can't get belt boxes early. But you can get Stacking-3 without Stacking-2 and only stack advanced items. But how to build them since they need the previous tire? It also means that looking at Stacking-2 there is no link to Stacking-3 to show the tech can still be improved.

Also Logistics-3 doesn't depend on Logistics-2 breaking that chain. Logistcs-2 depends on Logistcs-1 though. You could go from yellow directly to blue belts skipping red ones. But then how would you build them since blue belts need red belts?

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

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

Post by mrvn »

Lacking all the stacking for angels and bobs I tried out generating them algorithmically.

I excluded some items:
  • things starting with deadlock-stack- are already stacks
  • things with stacksize <= 10
    So no stacks of cars, rocket silos, trains or chemical plants. But also no stacks of barrels.
  • items with icon_size not in [32, 64, 128], which means assembly-robots. DSB refuses to stack them
For everything else I look up the recipe producing the item and the tech unlocking the recipe. The ingredients of the tech are then matched against a deadlock-stacking tech and the stacking recipe is unlocked by that. If more than one recipe produces something the stacking can be unlocked in multiple ways. Stuff that's always unlocked gets thrown behind automation-science-packs.

Example: Copper plates
Not unlocked by any tech so deadlock-stacking--automation-science-packs unlocks this.

Example: Centrifuge
The centrifuge is unlocked by recipe centrifuge, which requires automation-science-pack, logistic-science-pack and chemical-science-pack. That means stacks of centrifuges are unlocked by deadlock-stacking--automation-science-pack--logistic-science-pack--chemical-science-pack, which needs some of each to research.

This locks each stack of item behind the sciences packs needed to get the item in the first place and requires some extra science packs to stack them.

I' would like to add this (after some polishing). It adds a lot of stacks you normally wouldn't have and probably never want, e.g. stacks of exoskeletons. But for a mod that doesn't support stacking explicitly having more stacks then needed is better than lacking stacks you do need. And currently with angles, bobs and most mods that's every item. I'm thinking of adding a setting "Stacks for everything" and generating the stacks algorithmically if that option is enabled.

ToDo:
- add locals so the techs don't show as "Unknown key: cryptic name nobody can read". Can one use icons in tech names?
- merge the techs for the belt boxes with the generated techs. So there is only one stacking tech requiring automation-science-packs that gives the belt box and all the stack recipes for that level
- add depends on previous tires for generated techs

Comments?
Attachments
data-final-fixes.lua
(4.29 KiB) Downloaded 87 times

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

I've made the description on the Integrations mod a little clearer. Its purpose is just to add the loaders and beltboxes for those mods' tiers, support which was previously directly included in the Stacking and Loaders mods - a third-party mod to add the stacked items is still needed.

I like the idea of auto-generating the stacked items, and the approach you're using is also what we'd want to do to make 'passthrough' recipes on the beltboxes, which I'm not sure yet would work well but has come up a few times earlier in this thread! I want to let the big changes settle for a bit before adding new features, I'll take a closer look after getting some of these bugs dealt with; for the first couple weeks it'll likely just be bugfixes (and possibly some updated loader graphics - thanks so much to Deadlock for looking at updating the graphics to fit the new belt graphics!).

I'll see if I can work out the error you posted, and there's some issues with Factorio Extended Plus' belt texture attributes preventing that integration from working as well.

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

Bad underground belt graphics

Post by mrvn »

The underground belts have 2 graphic errors:
bad-underground.png
bad-underground.png (641.23 KiB) Viewed 3350 times
1. The icon has the old angled look for basic underground belts but the new round look for underground belts.
2. The basic underground belts use the transport belt instead of the basic underground belt, wrong arrow color.

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

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

Post by mrvn »

shanemadden wrote:
Sun Mar 03, 2019 4:56 pm
I like the idea of auto-generating the stacked items, and the approach you're using is also what we'd want to do to make 'passthrough' recipes on the beltboxes, which I'm not sure yet would work well but has come up a few times earlier in this thread! I want to let the big changes settle for a bit before adding new features, I'll take a closer look after getting some of these bugs dealt with; for the first couple weeks it'll likely just be bugfixes (and possibly some updated loader graphics - thanks so much to Deadlock for looking at updating the graphics to fit the new belt graphics!).
Thanks for the work you've done so far. Since my idea seems to be welcome, even if not right now, I will keep at it and polish it. Maybe when things have settled it will be ready for inclusion too. The sheer number of stacking recipes generated bothers me a bit. Maybe the items can be filtered more to reduce the amount of stacking recipes.

One thing I'm considering is excluding anything that can be placed. Like centrifuges. I've never wanted to have a stack of centrifuges and it's highly unlikely someone wants to transport a million of them and needs that to speed up. But that would also eliminate transport belts and inserters. Again I wouldn't mind that in a Seablock game since you only need them to place them. But in vanilla those are also part of science packs and you might have a mega factory that generates a lot of green science. So lots of transport belts and inserters. Still, my vanilla science setup generates transport belts and inserters locally and uses them up in the perfect ratio. Stacked belts and stacked inserters wouldn't come into play there.

Can anyone think of something that is placable where stacking is also a big QOL issue?

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

Regarding tech prerequisites: they no longer automatically create that dependency relationship when generating the stacking techs, to allow for situations where tiers are skipped or duplicated, etc without having a bunch of extra complex dependency finding logic. But you're right that the prerequisites should link the stacking techs together, I'll get that updated for the next version.

The graphics issues with the undergrounds will be for Bob to fix :)

Regarding the stacking recipes, one thing that can potentially help mitigate that would be if you enable the 'hide unstacking recipes' option, which works relatively painlessly with auto-unstacking enabled.

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

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

Post by mrvn »

mrvn wrote:
Sun Mar 03, 2019 10:20 am

Code: Select all

  14.018 Script @__deadlock-beltboxes-loaders__/prototypes/create_stack.lua:160: DBL.add_stacks_to_tech(item_name=slag, target_technology=deadlock-stacking-0)
  14.018 Error ModManager.cpp:1283: Failed to load mod "deadlock-stacking-crating-bobs": __deadlock-beltboxes-loaders__/prototypes/create_stack.lua:163: attempt to index field '?' (a nil value)
stack traceback:
	__deadlock-beltboxes-loaders__/prototypes/create_stack.lua:163: in function 'add_stacks_to_tech'
	__deadlock-beltboxes-loaders__/prototypes/public.lua:175: in function 'create'
	__deadlock-stacking-crating-bobs__/data-final-fixes.lua:132: in main chunk
Looks like it tries to stack slag before it created the grey basic-loader tech. This is with bobs+angles mods in an updated Seablock pack.

Removing deadlock-stacking-crating-bobs removes the problem. From the description I guess that deadlock-integrations_2.0.0 is supposed to replace that one. Seems to be pretty non functional though. It doesn't seem to add any stackings, only the belt boxes. So none of bobs/angels items can be stacked.
The problem might just be that "deadlock-stacking-0" no longer exists. The name changed for some reason.

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

mrvn wrote:
Sun Mar 03, 2019 11:31 pm
The problem might just be that "deadlock-stacking-0" no longer exists. The name changed for some reason.
That's definitely it. The tech that creates the Bob's tier 0 loaders is now named "basic-transport-belt-beltbox" which is autogenerated based on the entity name - the number at the end has special significance in the tech tree localization strings but 0 isn't expected by the base game, so I kept it as the autogenerated version without the trailing number.

It could be migrated back to "deadlock-stacking-0" but that requires overriding localised_name, and none of the Bob's integration mods have been updated to 0.17 yet.. so I think the current state of things is ok. Replace "deadlock-stacking-0" with "basic-transport-belt-beltbox" in the tech parameter and your local copy of that stacking mod should be good to go.

vizthex
Burner Inserter
Burner Inserter
Posts: 6
Joined: Mon Mar 04, 2019 12:08 am
Contact:

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

Post by vizthex »

I've noticed that in the newest version for 0.17, if I try to pick up stacked items from a belt they auto unstack.

Is this a bug or is it supposed to be intentional?

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

vizthex wrote:
Mon Mar 04, 2019 1:58 am
I've noticed that in the newest version for 0.17, if I try to pick up stacked items from a belt they auto unstack.

Is this a bug or is it supposed to be intentional?
That's an experimental change to the default settings - in the spirit of 0.17 experimental :)

To disable this behavior, disable the auto-unstacking option under settings.

Since this change surprised you, you're exactly the right person to give feedback - does auto-unstacking seem like a bad default option, or was it just a bit confusing that the behavior has changed?

Erythion
Burner Inserter
Burner Inserter
Posts: 15
Joined: Sun May 20, 2018 3:40 pm
Contact:

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

Post by Erythion »

Updating from 2.0.3 to 2.0.4 gives me this error on startup:
error
I disabled beltboxes and only use loader when using the previous version.

Edit: Also happens with 2.0.3, now investigating which other mod is the culprit.
Edit2: nevermind, disabling beltboxes breaks beltbox technology by not creating these techs, which you then directly patched in vanilla_tiers.lua, resulting in the error.

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

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

Post by mrvn »

shanemadden wrote:
Mon Mar 04, 2019 5:35 am
vizthex wrote:
Mon Mar 04, 2019 1:58 am
I've noticed that in the newest version for 0.17, if I try to pick up stacked items from a belt they auto unstack.

Is this a bug or is it supposed to be intentional?
That's an experimental change to the default settings - in the spirit of 0.17 experimental :)

To disable this behavior, disable the auto-unstacking option under settings.

Since this change surprised you, you're exactly the right person to give feedback - does auto-unstacking seem like a bad default option, or was it just a bit confusing that the behavior has changed?
While I like the idea of picking up a stack of iron plates and getting iron plates for hand crafting I think it's the wrong thing to do. I also frequently enough pick up stacks of something to dump into a train stop or a belt box for testing. Moving a buffer chest of a train stop is now complicated. You have to restack all the items you picked up when removing the chest.

Wouldn't it be better if items are unstacked as needed? E.g. when you hand craft some transport belts then it unstacks iron plate stacks as needed? Is that impossible?

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

Erythion wrote:
Mon Mar 04, 2019 8:17 am
Updating from 2.0.3 to 2.0.4 gives me this error on startup:
error
I disabled beltboxes and only use loader when using the previous version.

Edit: Also happens with 2.0.3, now investigating which other mod is the culprit.
Edit2: nevermind, disabling beltboxes breaks beltbox technology by not creating these techs, which you then directly patched in vanilla_tiers.lua, resulting in the error.
Yup, that's the issue - sorry about that, will fix.
mrvn wrote:
Mon Mar 04, 2019 11:52 am
Wouldn't it be better if items are unstacked as needed? E.g. when you hand craft some transport belts then it unstacks iron plate stacks as needed? Is that impossible?
Unfortunately yes, that's not possible.

User avatar
MasterBuilder
Filter Inserter
Filter Inserter
Posts: 348
Joined: Sun Nov 23, 2014 1:22 am
Contact:

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

Post by MasterBuilder »

shanemadden wrote:
Mon Mar 04, 2019 5:35 am
That's an experimental change to the default settings - in the spirit of 0.17 experimental :)

To disable this behavior, disable the auto-unstacking option under settings.

Since this change surprised you, you're exactly the right person to give feedback - does auto-unstacking seem like a bad default option, or was it just a bit confusing that the behavior has changed?
I too was caught off-guard by this. At first I didn't mind it so much, but it gets annoying. Most of the time I wind up picking up compressed stuff, is's when I want to move a chest/belts. This results in non-compressed ore that I can't just pop right back into the line. Now I have to go somewhere else (back to the mine) to put the ore back into the flow.

Before the update I had no strong opinion on this. Now I'm glad I can turn it off in settings.
Give a man fire and he'll be warm for a day. Set a man on fire and he'll be warm for the rest of his life.

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

Update released to fix the tech tree when beltboxes are disabled :oops:

Thanks a lot for the feedback - I'll wait another couple days for more feedback before changing it but it sounds like auto-unstacking should stay as defaulted to disabled, those who prefer it will still be able to turn it on in options.

How about with regard to loader snapping; does the current default behavior seem pretty intuitive?

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

shanemadden wrote:
Mon Mar 04, 2019 2:56 pm
mrvn wrote:
Mon Mar 04, 2019 11:52 am
Wouldn't it be better if items are unstacked as needed? E.g. when you hand craft some transport belts then it unstacks iron plate stacks as needed? Is that impossible?
Unfortunately yes, that's not possible.
Actually now that I said this, I realized this might be possible using a different mechanic than the auto-unstacking feature uses. Will test later.

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

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

Post by mrvn »

shanemadden wrote:
Mon Mar 04, 2019 4:25 pm
shanemadden wrote:
Mon Mar 04, 2019 2:56 pm
mrvn wrote:
Mon Mar 04, 2019 11:52 am
Wouldn't it be better if items are unstacked as needed? E.g. when you hand craft some transport belts then it unstacks iron plate stacks as needed? Is that impossible?
Unfortunately yes, that's not possible.
Actually now that I said this, I realized this might be possible using a different mechanic than the auto-unstacking feature uses. Will test later.
Or something inbetween that unstacks if you have less than a stack of something. So if you pick up 100 stacks of wood you get one stack unstacked wood and 90 stacks of wood left.

shanemadden
Fast Inserter
Fast Inserter
Posts: 128
Joined: Thu Feb 08, 2018 8:25 am
Contact:

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

Post by shanemadden »

I thought that allowing the unstacking recipes as intermediates would allow auto-unstacking for use in recipes, but it's inconsistent (I think based on the presence of other recipes) - it'll happily unstack copper to make some copper cables when you click the cables, but it won't unstack iron plates automatically for trying to make a green circuit :x

Stacked items don't have any better inventory density than unstacked ones, so an auto-unstack of only some items seems confusion-prone without a ton of upside.

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

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

Post by mrvn »

shanemadden wrote:
Thu Mar 07, 2019 3:34 am
I thought that allowing the unstacking recipes as intermediates would allow auto-unstacking for use in recipes, but it's inconsistent (I think based on the presence of other recipes) - it'll happily unstack copper to make some copper cables when you click the cables, but it won't unstack iron plates automatically for trying to make a green circuit :x

Stacked items don't have any better inventory density than unstacked ones, so an auto-unstack of only some items seems confusion-prone without a ton of upside.
The upside would be that you can pick up a wooden chest of stacks of iron plates and put it down somewhere else and still have stacks of iron plates in it.

On the other hand you could always craft because every time you use some iron plates the script would unstack more.

Post Reply

Return to “Mods”