[MOD 0.17] Deadlock's Crating Machine

Topics and discussion about specific mods
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

mrvn wrote:
Deadlock989 wrote:
mrvn wrote:What I would like to see is recipes to make crates out of chest + stack of X.
We discussed this before, I did look into it but it was a pain in the neck and was another thing that would create horrible inventory screen bloat due to doubling up every recipe all over again. Just unstack them before you crate them, very easy to do. Or don't stack them in the first place, even easier.
Recipes can be hidden from hand crafting and put in a different tab for the crater machine to keep things organized. So I don't quite buy the inventory screen bloat argument.

As for unstacking that is a volume issue. The few tests I've made shown that crating is a rather slow process, limited to the speed of a single belt of the same left of uncrated items. I would hope that crating stacks would be faster because the stacking has already done half the work. Maybe it should even manage to craft a compressed belt of stacked items although a fife fold speed increase seems high.

Sorry, never going to happen, I had hoped to have made that clear by now.

A mechanism is provided for people to easily add their own crating and stacking recipes in their own add-ons, nothing stopping you from specifying DSB stacks as DCM raw mats, go for it, but this will never be included in the main mod.
Image

User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 267
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Omnifarious »

Thank you very much for making this. I was feeling very similarly about the various palleting and other mods out there. I really like your 'divide by 5' approach to how much goes in a crate. And I also like how you cleverly made a separate crating machine so you could make it use tons of power and make the recipe speed and crafting time interact to create machines capable of handling particular belt levels. Also, it makes a fantastic noise. :-)

The other interesting mod was the shrink-wrap mod that uses plastic to make the shrink-wrap. It takes away the logistics puzzle of how to get the storage bin back to the front of the line, which I don't like. But, it takes the same 'divide by 5' approach as yours. And the 'crate' is consumed in the process, which is interesting. I feel that a mod like that should cause the un-shrinkwrap recipe to generate tons of pollution. Or, alternatively, it should generate heavy oil equivalent to what would've gone into making the plastic (including the coal, assuming coal liquefaction) that you'd have to pipe somewhere or the machine would back up. :-)

If you had the shrink-wrap machine make heavy oil, you create a very different sort of logistics puzzle, though you wouldn't need to use filter inserters or loaders. I think filter inserters and loaders are currently a bit of a backwater, especially with the filtering splitters, so I like things that encourage you to use them.

Also, random amusing tidbit... this is a way of providing fueled smelters with fuel without having to send them coal. Just don't filter. The box gets used as fuel. :-) I'm not sure if one box is too much or too little for 10 pieces of ore. I suspect too much.

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

You're welcome.

That's interesting, I hadn't seen the shrink-wrap mod. It's a nice idea. The graphics are a bit ... basic. I agree, it should produce a ton of litter/pollution, especially if it's plastic. Cue tear-jerking pictures of baby biters with their heads stuck in one of those beer can collars.

With regards to using the crate as fuel, I just did the maths properly. I said before that it wasn't enough, but that wasn't quite right / not the full picture. Stone and steel furnaces both consume 0.0225 coal/sec (so steel furnaces are twice as fuel efficient per smelted item). Wooden chests have half the energy value of coal, so that's 0.045 chests/sec. Smelting iron ore or copper ore takes 3.5 seconds in a stone furnace, so that's 0.1575 chests/ore. Crated ore (with vanilla stack sizes) contains 10 ore, so you'd need 1.575 chests to smelt that in a stone furnace: no go. But with a steel furnace you'd only need 0.7875 chests, so it'd work.

So it's possible with steel furnaces for copper plates and iron plates. But not for stone bricks, which need twice the input. It also won't work if you have a doubled ore stack size because of some other mod. Conversely, with steel furnaces, there'd be some fuel left over from the chest, so there'd be a backlog of crates to burn, giving you another problem to solve. It's highly inefficient because for some reason vanilla wooden chests lost half the energy value of the wood it took to make them, but it would save you having to return all the chests. It would also require some source of wood-growing from another mod because otherwise you'd have to be manually harvesting 5.4 logs per minute just to keep up with one steel furnace, so hundreds of wood per minute for any kind of realistic early/mid-game set-up. It would make much more sense to burn the chests in a dedicated little steam turbine to provide power for factory operations (especially if you're growing the wood with a mod), and that approach would also work for any other crated intermediate product that isn't smelted but processed some other way and for when/if you've switched to electric furnaces.

But I didn't have any of this in mind when I designed the balance, I just assumed you'd have to return them, and your "bus" would have to be changed to interlocking mega-sushi.

Fun fact: I did nearly add a 1% "crate breakage" rate, so there'd have been a continuous maintenance aspect. Then I played a proper large base playthrough and nearly threw the PC out the window after having to collect so much wood, so, that didn't happen. I don't actually play with this mod enabled any more ...
Image

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by mrvn »

So steel furnaces don't burn enough wooden crates while stone furnaces run out of fuel. Time to get your calculator out and compute the ratio of stone to steel furnaces required to exactly use up all crates.

For advanced users: Add a steam engine to generate the power for the inserters. Will the steel furnaces leave enough crates behind to power the steam engine? Do you still need stone furnaces to soak up any excess?

Aeternus
Filter Inserter
Filter Inserter
Posts: 835
Joined: Wed Mar 29, 2017 2:10 am
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Aeternus »

Or just use a priority splitter to burn crates when available, supplement with coal or something when not and keep a small buffer crate for crates. Not all that difficult ;)

By the way... this mod idea looks familiar. Might need to give it a whirl myself.

User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 267
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Omnifarious »

I'm crating up copper plates (finally) and I'm discovering that the full crate stack size is 20. This means I can store 400 copper plates in an inventory slot if they're crated. I haven't tested other crate types for this yet. But shouldn't all full crates have a stack size of 5?

And testing green circuits, the full crate stack size there is 40. It looks like the full crate stack size is being set to the number of items in the crate instead of 5.

Yes, line 82 in prototypes/shared.lua should read:

Code: Select all

            stack_size = DCM.STACK_DIVIDER,
Not:

Code: Select all

            stack_size = new_stack_size,
Last edited by Omnifarious on Thu May 10, 2018 4:35 pm, edited 1 time in total.

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

Omnifarious wrote:I'm crating up copper plates (finally) and I'm discovering that the full crate stack size is 20. This means I can store 400 copper plates in an inventory slot if they're crated. I haven't tested other crate types for this yet. But shouldn't all full crates have a stack size of 5?

And testing green circuits, the full crate stack size there is 40. It looks like the full crate stack size is being set to the number of items in the crate instead of 5.
Yes. It looks like I derped when I should have herped back in March, and no-one noticed.
Last edited by Deadlock989 on Thu May 10, 2018 4:51 pm, edited 2 times in total.
Image

User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 267
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Omnifarious »

Deadlock989 wrote:Yes. It looks like I derped when I should have herped back in March, and no-one noticed. Fix will be uploaded later this evening.
I believe I found the appropriate fix. :-) I modified my original message with the code change I think is correct.

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

---------------------------------------------------------------------------------------------------
DCM version: 1.3.0
Date: 10. 05. 2018
Meta:
- This is the final version for Factorio 0.16.
Bugfixes:
- Corrected a "senior moment" which was causing crated items to have an incorrect stack size.
---------------------------------------------------------------------------------------------------
Image

CageStooge
Burner Inserter
Burner Inserter
Posts: 9
Joined: Fri Apr 27, 2018 6:35 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by CageStooge »

Deadlock989 wrote: Cue tear-jerking pictures of baby biters with their heads stuck in one of those beer can collars.
LOL! Thanks, I needed a laugh.

I actually cut those apart, and have for years every since I saw a bird stuck in one. I would leave them for biters, though.

User avatar
Omnifarious
Filter Inserter
Filter Inserter
Posts: 267
Joined: Wed Jul 26, 2017 3:24 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Omnifarious »

I'm playing on a map that seems to have generated the desert biome almost exclusively. It's a challenge to find enough wood for the crates as I'm schlepping them around on trains and so I need 800 crates for a single train load. I'm considering base expansions just so I can secure new sources of wood from the occasional sparse forests you find in the desert. And I'm assiduously grabbing every last log on the ground, and wincing when I accidentally run over one with a tank and destroy it.

I like this mod. I think vanilla should incorporate something like it as a way to extend the lifetime of belts. It's well-balanced for a number of different reasons, some of which aren't obvious. For example, wood cannot be gathered in an automated fashion in vanilla. And, as my current game indicates, it makes the biomes matter more from a gameplay perspective than merely their effect on pollution spread.

I've been building circuit logic to cut power to the crating machines when they don't have anything to do. :-)

One problem is that the sound needs to be sped up for the faster crating machines and you need to adjust the time on the sound so that it matchss the crafting time. Of course, if someone is nuts enough to beacon them with speed modules, things will get out of sync again, but... *shrug*

Your stacking belt box mod is just too easy. :-)

Illiander42
Filter Inserter
Filter Inserter
Posts: 406
Joined: Mon Feb 05, 2018 10:01 am
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Illiander42 »

Any chance you could either do a compatibility mod for angelbob materials, or give me an example of how to conditionally add a recipe for, say, Iron Sheet Coils, so I can throw together the compatibility mod?

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

Illiander42 wrote:Any chance you could either do a compatibility mod for angelbob materials, or give me an example of how to conditionally add a recipe for, say, Iron Sheet Coils, so I can throw together the compatibility mod?
I think orzelek's Angel/Bob mod for the Stacking Beltbox listed here also supports the Crating Machine: viewtopic.php?f=190&t=57264

Instructions on how to make your own add-on mods, with an example, can be found in the modding pdf included in the zip file. Or look at the ones other people have made listed on the link above.
Image

Recon777
Filter Inserter
Filter Inserter
Posts: 267
Joined: Fri Jun 10, 2016 4:04 am
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Recon777 »

Could we have a recipe for crating bob's carbon?
Carbon comes from coal/water, so it is produced where there is a water line. Crating carbon would be very handy for distributing it to places you don't have a water line.

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

Recon777 wrote:Could we have a recipe for crating bob's carbon?
Carbon comes from coal/water, so it is produced where there is a water line. Crating carbon would be very handy for distributing it to places you don't have a water line.
I don't support Bob's or any other overhaul mod directly. Instead I provided support and documentation for other modders to easily plug in to my mods. Search the mod portal for addons that work with Bob's, there are several available. I don't even know what Bob's carbon is.
Image

Gaist
Burner Inserter
Burner Inserter
Posts: 15
Joined: Mon Aug 13, 2018 8:38 pm
Contact:

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Gaist »

Your loaders, stackers and crating machines are among our group's favorite mods, big kudos all around. On the 'sometime' agenda, any thoughts on bestowing the marvelous crating machines with stylish sprites along the lines of the compact loaders and stacking machines? The assembly machine look doesn't do the process justice by contrast--everything looks so slick with those phenomenal little contraptions. :D

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

Re: [MOD 0.16.x] Deadlock's Crating Machine

Post by Deadlock989 »

Gaist wrote:Your loaders, stackers and crating machines are among our group's favorite mods, big kudos all around. On the 'sometime' agenda, any thoughts on bestowing the marvelous crating machines with stylish sprites along the lines of the compact loaders and stacking machines? The assembly machine look doesn't do the process justice by contrast--everything looks so slick with those phenomenal little contraptions. :D
La, my lord, you'll turn my head.

Short answer: yes, hopefully, someday.

Long answer: I taught myself Lua and coded the Crating Machine before I learned how to make models and sprites for Factorio (for example). I have some half-built stuff which was I was hoping to adapt for the Crating Machine. However, I'm literally about to start a PhD. This is bloody terrifying. So I'm waiting for that to settle down. I am looking forward to doing a bunch of things for 0.17/1.0 and looking at crating machine models is on the list, not at the top of the list but not at the bottom either. So by Xmas hopefully, unless I'm drowning in other stuff.
Image

drozh
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jun 28, 2017 11:46 am
Contact:

Re: [MOD 0.16] Deadlock's Crating Machine

Post by drozh »

hello deadlock, mods looks very very interesting for me. Also for the long discussion "bots vs belts". As I can see from reading about your mod, all crates (full and empty) are technically usual items. I want not allow bots to carry any crates. Is it possible to prevent bots carrying any crates? so crates will only useful with belts / trains.

of course, there is just a option "don’t use crates with logistic chests". But is is just not good. Example: train loading station.

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

Re: [MOD 0.16] Deadlock's Crating Machine

Post by Deadlock989 »

drozh wrote:
Wed Sep 19, 2018 9:35 am
hello deadlock, mods looks very very interesting for me. Also for the long discussion "bots vs belts". As I can see from reading about your mod, all crates (full and empty) are technically usual items. I want not allow bots to carry any crates. Is it possible to prevent bots carrying any crates? so crates will only useful with belts / trains.

of course, there is just a option "don’t use crates with logistic chests". But is is just not good. Example: train loading station.
Unfortunately it's not possible: the game engine is set up in such a way that any/all items can be handled by bots. I did put in a request for a way to mark specific items as undeliverable by bots but it was denied, for game performance reasons. We have to make sure that crates stay out of our logistic networks ourselves.
Image

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

Re: [MOD 0.16] Deadlock's Crating Machine

Post by Deadlock989 »

Announcement
My real-life circumstances have changed (for the better) and I've got precious little time for gaming. So I think it's highly unlikely I will get around to the work I was planning around updating to 0.17 and merging my three "belt stacking" mods into one. I was hoping there would be some kind of vanilla stacking/packing/crating in 0.17 and that the relative popularity of these mods demonstrated the case for it, but there's been no further mention of it since the bots v belts drama. Anyhoo, I'm not going to be supporting a public version of these mods from now on.

The mods are published under the GNU GPL v3, which means that anyone can modify them and re-publish them as long as they obey the terms of the license - in short, as long as that work is also published under the same GNU GPL v3 licence and that it clearly states it's a modification of these original mods and the date it was modified/branched off.

An acknowledgement of my original work would also be appreciated. In the case of the loaders, shanemadden should also get a credit.

Happy factories.
Image

Post Reply

Return to “Mods”