[MOD] Deadlock's Stacking Beltboxes & Compact Loaders
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Auto unstacking for me only works on direct pickup anyway. If I pick up a belt with stacks on it, I get stacks in my inventory. If I pick up off the belt, they unstack.
One thing that did occur to me: I've noticed you can use stacks of coal or solid fuel directly, which is quite nice. I don't see any immediate difficulties in doing direct stack smelting - stack of ore smelts to stack of plates. Has anyone implemented this yet?
One thing that did occur to me: I've noticed you can use stacks of coal or solid fuel directly, which is quite nice. I don't see any immediate difficulties in doing direct stack smelting - stack of ore smelts to stack of plates. Has anyone implemented this yet?
Re: Automatically generated stacking recipes
I think I need to implement the automatic static recipe generation as it's own mod. There seems to be problems with data-final-fixes running before other mods that still modify the data. For example in Seablock you have charcoal that has 2.5MJ of energy. But a stack of charcoal only has 10MJ. I believe the fuel value is initially 2MJ and later changed to 2.5, after the stacks were created.
As a separate mod I could add an optional depends to create the stacking recipes last. Or is there another way to ensure something runs after another mod?
As a separate mod I could add an optional depends to create the stacking recipes last. Or is there another way to ensure something runs after another mod?
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Exactly right, it's only acting on the on_picked_up_item event for performance reasons. That event includes the item stack with the event data so it's relatively simple to just attempt to unstack that stack. on_player_main_inventory_changed is the catch-all for all the other types of ways that items get into your inventory, and that'd require scanning the whole inventory each time since the event doesn't tell you what changed.McDuff wrote: ↑Thu Mar 07, 2019 12:14 pmAuto unstacking for me only works on direct pickup anyway. If I pick up a belt with stacks on it, I get stacks in my inventory. If I pick up off the belt, they unstack.
One thing that did occur to me: I've noticed you can use stacks of coal or solid fuel directly, which is quite nice. I don't see any immediate difficulties in doing direct stack smelting - stack of ore smelts to stack of plates. Has anyone implemented this yet?
Ahh, the eternal dependency racemrvn wrote: ↑Thu Mar 07, 2019 12:23 pmI think I need to implement the automatic static recipe generation as it's own mod. There seems to be problems with data-final-fixes running before other mods that still modify the data. For example in Seablock you have charcoal that has 2.5MJ of energy. But a stack of charcoal only has 10MJ. I believe the fuel value is initially 2MJ and later changed to 2.5, after the stacks were created.
As a separate mod I could add an optional depends to create the stacking recipes last. Or is there another way to ensure something runs after another mod?
Yup, you should be able to resolve this and get your data-final-fixes.lua to run after another mod's final-fixes by adding that mod as an optional dependency in your info.json (start the line with a ?).
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
The reason it works for fuel is that the stack simply has 5 times the fuel value of the item. So nothing extra is needed and deadlock can automatically compute the fuel value when the stack recipe is added.McDuff wrote: ↑Thu Mar 07, 2019 12:14 pmAuto unstacking for me only works on direct pickup anyway. If I pick up a belt with stacks on it, I get stacks in my inventory. If I pick up off the belt, they unstack.
One thing that did occur to me: I've noticed you can use stacks of coal or solid fuel directly, which is quite nice. I don't see any immediate difficulties in doing direct stack smelting - stack of ore smelts to stack of plates. Has anyone implemented this yet?
I assume smelting a stack of something should take 1/5th the amount or 5 times the time. You would have to make extra recipes for that and using 1/5th the amount probably doesn't divide well. 5 times the time seems easier. I guess you could filter out all furnace recipes and then add a stacked flavour automatically.
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Yeah I assumed that you could just do it by writing recipes for the smelters: stacked ore produces stacked plates - should be 5 times the time to keep with the spirit of the mod.
I am sure someone clever could figure out a programmatic way to do it but writing 3 new recipes (copper, iron, stone) would probably be enough to start?
I am sure someone clever could figure out a programmatic way to do it but writing 3 new recipes (copper, iron, stone) would probably be enough to start?
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Did the loaders stop working for anyone else with the latest update?
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
some other mods seem to have very similar problems, eg Production Scrap 2 which also changes/adds recipes, and results in sometimes being able to handcraft items and sometimes not (probably when factorio tries to use the new alternate recipe first)shanemadden wrote: ↑Thu Mar 07, 2019 3:34 amI 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
it seems to me (just a wild guess without having tested it) that it mostly works with simple recipes but not recursively, thus are you sure that it's the iron that doesn't unstack and prevents circuits from being made, and not the copper that is first made into cables (although making copper into cables directly works) before they can be used for the circuits (test needed with stacked iron and unstacked copper in the inventory, or even stacked iron and unstacked cables)?
maybe on such recursive crafting, the wrong recipe and no alternative recipes are checked.
watch out for stacked sizes that don't match the number of items that are required for smelting, eg no multiples of 5 for steel or uneven values for stone, and this becomes even more difficult depending on whether the default value of 5 or an alternate value of 4 is used in the mod settings, and yet even more when also other mods are used that change the stacksize of vanilla items. you need to expect completely "random" amounts of items compressed into one beltbox. how would those stacks be handled? just dropping the surplus, or giving bonus, or unstacking the rest which then will block the input? ...
but of course, it would be really nice if you could make it work :-)
edit: of course, that direct use of stacked items should be a mod option since it might be considered too cheaty by some people
(similar reasoning why stacks of stacked boxes should use the same amount of slots that stacks of the same total number of vanilla items use)
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Yeah directly smelting stacks would be "cheaty" but I think if it just took the same amount of time, just didn't need a beltbox, it's just a throughput advantage - i.e. gives you bigger smelting columns, not more plates from the same number of furnaces.
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
*I* don't consider it too cheaty when the time is adjusted, but in the spirit of the mod that wanted to only improve on belt throughput, some people might see a reduction of work/energy (by avoiding the unpacking and repacking) to be cheaty, while others find it just in the right spirit to improve belt throughput :-)
and it shouldn't be too difficult to add an option so that this functionality can be toggled on/off ...
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
This migration (0.16 save file to 0.17) removed all of my blueprint's name (both inside blueprint book/outside).
Blueprint book's name is OK.
I checked several times with/without these mods (deadlock-beltboxes-loaders, DeadlockLoaders). and it still happend with only two mods when migration(0.16 to 0.17).
Any idea to resolve this?
Additional confirmed: It removed concrete tiles on blueprint and changed blueprint icons.
Blueprint book's name is OK.
I checked several times with/without these mods (deadlock-beltboxes-loaders, DeadlockLoaders). and it still happend with only two mods when migration(0.16 to 0.17).
Any idea to resolve this?
Additional confirmed: It removed concrete tiles on blueprint and changed blueprint icons.
Last edited by GTrak on Fri Mar 08, 2019 6:40 am, edited 1 time in total.
- MasterBuilder
- Filter Inserter
- Posts: 353
- Joined: Sun Nov 23, 2014 1:22 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
On a 0.17 save, after updating/migrating, all the BP/books in my player inventory lost both names & tiles. However, all the prints/books in the BP lib remained safe for some reason.GTrak wrote: ↑Fri Mar 08, 2019 4:50 amThis migration (0.16 save file to 0.17) removed all of my blueprint's name (both inside blueprint book/outside).
Blueprint book's name is OK.
I checked several times with/without these mods (deadlock-beltboxes-loaders, DeadlockLoaders). and it still happend with only two mods when migration(0.16 to 0.17).
Any idea to resolve this?
In theory, if you have the previous version of the mod & save, you could load that, move stuff to the BP lib, then try the migration. No guarantees it'll work but those stayed safe on my save.
I just moved on since I didn't have very many in my inventory and it would take <5min to fix the ones I did.
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.
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
That's a nasty bug with the blueprint migration, I'm really surprised that nobody hit that in the last few months since that test version went up.
Really sorry about that, I see exactly what I missed, I'll test and post a fix shortly. It won't be able to fix your blueprints for an already migrated save unfortunately, so you'll need to go back to a pre-migration save - but at least then you can export and import them without rolling all the way back to 0.16.
Really sorry about that, I see exactly what I missed, I'll test and post a fix shortly. It won't be able to fix your blueprints for an already migrated save unfortunately, so you'll need to go back to a pre-migration save - but at least then you can export and import them without rolling all the way back to 0.16.
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
...and while I wait 5 minutes for a test run of the fixed migration to complete..., re: direct smelting of stacked stuff:
That's a super cool idea and should be relatively easy to implement in a tiny standalone mod. I'll post some example code later.
That's a super cool idea and should be relatively easy to implement in a tiny standalone mod. I'll post some example code later.
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
1.7.3 versions of the migration mods posted with the blueprint fix, let me know if there are still any issues.
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Thank you for update fix.
Looks all good.
Blueprint's name, tiles and icons are all fine now.
Looks all good.
Blueprint's name, tiles and icons are all fine now.
- Deadlock989
- Smart Inserter
- Posts: 2529
- Joined: Fri Nov 06, 2015 7:41 pm
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
An early version of the mod did let you smelt stacks of ore directly. It took the equivalent time, i.e. 5x the time for 5x the output, so the only benefit was the energy saving of not having to unstack (negligible from mid-game onwards). I also experimented with being able to smelt a stack of five iron plates directly into one steel plate. In the end I decided it added nothing and was inconsistent with not being able to use stacks in other recipes and I didn't want to open that can of anacondas. Weird stuff starts to happen with hand auto-crafting when you provide too many routes to the same product.
I haven't made much progress with updating the graphics although I've sketched some stuff out. I haven't even had time to play 0.17 yet. Getting a Satisfactory weekend alpha key isn't helping. I think having something done for the first stable release of 0.17 is still realistic.
-
- Fast Inserter
- Posts: 128
- Joined: Thu Feb 08, 2018 8:25 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Same, I like their burner phase so far but absolutely no rush, no hint of the 64px icons yet either and the UI reworks are still ongoing, it seems like it'll be a relatively lengthy experimental phase - thanks again for your expertise!Deadlock989 wrote: ↑Sat Mar 09, 2019 11:40 amI haven't made much progress with updating the graphics although I've sketched some stuff out. I haven't even had time to play 0.17 yet. Getting a Satisfactory weekend alpha key isn't helping. I think having something done for the first stable release of 0.17 is still realistic.
Yeah, players getting used to the mod should have the unstack-before-machines approach reinforced as much as possible, I agree that it'd cause more confusion than it'd be worth.Deadlock989 wrote: ↑Sat Mar 09, 2019 11:40 amAn early version of the mod did let you smelt stacks of ore directly. It took the equivalent time, i.e. 5x the time for 5x the output, so the only benefit was the energy saving of not having to unstack (negligible from mid-game onwards). I also experimented with being able to smelt a stack of five iron plates directly into one steel plate. In the end I decided it added nothing and was inconsistent with not being able to use stacks in other recipes and I didn't want to open that can of anacondas. Weird stuff starts to happen with hand auto-crafting when you provide too many routes to the same product.
That said, I'm not above enabling some crazy-and-ultimately-pointless ideas; I went ahead and uploaded a little standalone mod for experiments like this. https://mods.factorio.com/mod/deadlock-experiments
It just includes smelting recipes for stacked ores (and iron plates to steel) with options on whether to output stacked or unstacked products. Definitely cheaty and I slapped it together very quickly, so I might have not gotten the balance quite right.
Also includes an update to the science pack stacking experiment posted a few pages back, and settings to control both experiments.
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
How about adding expensive furnaces and assemblers able to directly use stacked items as inputs and output stacked as well?
That certainly could help megabases to reduce entity count a bit.
That certainly could help megabases to reduce entity count a bit.
My Mods: mods.factorio.com
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
I cooked up a local mod to do some of these things last night, targeted at pymods. The approach I went with was to only hit a particular set of recipes, and only affect inputs that are stackable and a multiple of the stack size.
Rationale was entity reduction, but still leaving the need to stack things. Recipe choice was subjective, with a general trend focusing on things that are just getting tossed in a furnace or a pit of acid. Sand and salt were the main ones that got hit.
I'll try it a bit more locally before uploading or submitting a patch for experiments.
There is an outstanding issue with the recipe names, it checks for a main product to pick between item-name or recipe-name when building the new one, but that isn't sufficient for all cases. Still have a few that get unknown tags.
edit: published what I have for now
https://mods.factorio.com/mod/stackrecipes
Rationale was entity reduction, but still leaving the need to stack things. Recipe choice was subjective, with a general trend focusing on things that are just getting tossed in a furnace or a pit of acid. Sand and salt were the main ones that got hit.
I'll try it a bit more locally before uploading or submitting a patch for experiments.
There is an outstanding issue with the recipe names, it checks for a main product to pick between item-name or recipe-name when building the new one, but that isn't sufficient for all cases. Still have a few that get unknown tags.
edit: published what I have for now
https://mods.factorio.com/mod/stackrecipes
- MasterBuilder
- Filter Inserter
- Posts: 353
- Joined: Sun Nov 23, 2014 1:22 am
- Contact:
Re: [MOD 0.16] Deadlock's Stacking Beltboxes (& Compact Loaders)
Can this be optional?Stacking Beltboxes Changelog wrote:- Move loaders to the transport-belt fast replace group, matching beltboxes
I place the buffers & stackers then draw the belt lines and inevitably go one too far and have now replaced the loader I want with a belt I don't.
I even use a mod to prevent fast replacing underneathies & splitters with belts. IMHO belts should only fast replace other belts. Anything else causes more problems than it solves.
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.