[MOD] Deadlock's Stacking Beltboxes & Compact Loaders

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

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

Post by Deadlock989 »

Deadlock's Stacking Beltboxes version: 1.5.2
Date: 30. 03. 2018
Changes:
- Stacking/unstacking activities are no longer included in production statistics.
- This can't be a retroactive change so you will still see beltbox production stats in the past.
- Swapped Bob's Logistics tier colours around. BL 0.16.17 is now required.
- Added per-mod localised names.

Deadlock's Compact Loaders version: 1.4.1
Date: 30. 03. 2018
Changes:
- Swapped Bob's Logistics tier colours around. BL 0.16.17 is now required.
- Added a deferred check for altered vanilla belt speeds to catch updates in other mods.
- Added theme support for tier 0 belts etc. in Xander Mod and Bob's Logistics.
- Did not add tier 0 loaders. No point.
- Added per-mod localised names.
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:do you mean how many items the loader puts into the input inventory of the beltbox? Not sure what "too much" means but I can't control that, it is vanilla loader behaviour. Miniloaders are not really loaders, they are hidden inserters.
Yes. And "not too much" like for assemblers if output is blocked
I didn't know this difference between loader & inserters, ok too bad ^^
dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

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

Post by dood »

Getting 14k copper ore produced but only 6k plated smelted.
Seems like you forgot to hide copper ore from the stats.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

dood wrote:Getting 14k copper ore produced but only 6k plated smelted.
Seems like you forgot to hide copper ore from the stats.
I can't "forget copper ore" because the recipes are auto-generated. They've all been flagged as hide_from_flow_stats. What time period are you looking at?
dood
Filter Inserter
Filter Inserter
Posts: 360
Joined: Wed Mar 21, 2018 8:36 am
Contact:

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

Post by dood »

Never mind that.
It goes up and down each time the train gets loaded, I didn't account for the buffer.
Working as intended. Good job!
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

Deadlock989 wrote:Deadlock's Compact Loaders version: 1.4.1
Date: 30. 03. 2018
Changes:
- Swapped Bob's Logistics tier colours around. BL 0.16.17 is now required.
- Added a deferred check for altered vanilla belt speeds to catch updates in other mods.
- Added theme support for tier 0 belts etc. in Xander Mod and Bob's Logistics.
- Did not add tier 0 loaders. No point.
- Added per-mod localised names.
Please add tier 0 loaders. With some mod combinations getting tin for the yellow belts is hard and you are stuck with basic transport belts for quite a while. Having matching loaders would be a huge plus.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

mrvn wrote:Please add tier 0 loaders. With some mod combinations getting tin for the yellow belts is hard and you are stuck with basic transport belts for quite a while. Having matching loaders would be a huge plus.
Sounds like a balance issue for those other mods to be honest. If this is about Bob's, I think I've done my bit for king and country, ask again next month.
orzelek
Smart Inserter
Smart Inserter
Posts: 3923
Joined: Fri Apr 03, 2015 10:20 am
Contact:

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

Post by orzelek »

Deadlock989 wrote:
mrvn wrote:Please add tier 0 loaders. With some mod combinations getting tin for the yellow belts is hard and you are stuck with basic transport belts for quite a while. Having matching loaders would be a huge plus.
Sounds like a balance issue for those other mods to be honest. If this is about Bob's, I think I've done my bit for king and country, ask again next month.
I think that might be about Xanders actually. That mod has very drawn out burner phase.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

orzelek wrote:I think that might be about Xanders actually. That mod has very drawn out burner phase.
It's a massive pain because I never planned on a tier 0 - Bob's didn't have it when I started supporting that, and I didn't know about Xander's, and no-one else is that sadistic that I'm aware of. At the moment, for the belt theming, I fudge it by specifying tier 0 as tier 6 or whatever, at the end of the list, but not giving them any research unlock, and anything with no corresponding research is just skipped when it comes to enabling recipes. So the tier 0 loaders are probably actually generated (as deadlock-loader-entity-6 etc.), but no research unlocks them. All the other loaders have their own individual research, deadlock-loaders-1, deadlock-loaders-2 etc. - they are chained and also dependent on other things like Electronics, Logistics etc. That scheme will completely break if I let it try and specify deadlock-loaders-0, I've no idea how the game will display it but I'm fairly certain it won't be good.

So I'd have to recode everything either to shift the entire scheme up by one, or to also accept insertion of unlocks into other kinds of research, e.g. Logistics, and then spend time going through other people's mods to find out what research unlocks tier 0 undergrounds etc., and then also figure out all the migrations. Probably there should never have been loader research in the first place and they should have gone into Logistics with splitters etc. from the get-go, but hindsight is a wonderful thing. All this for a snail's pace loader I have no intention of playing with myself.

None of this is an appealing use of my time. My gut feeling is it's not up to me to "fix" mods that have extended early game grind. That was their plan and their decision to make. Presumably they do allow you to have inserters? Or are those made of unobtanium as well?
User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 401
Joined: Thu Dec 21, 2017 8:02 am
Contact:

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

Post by ownlyme »

why is the unstack stone-bricks recipe in the logistics category?
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

ownlyme wrote:why is the unstack stone-bricks recipe in the logistics category?
Because stone bricks are in the logistics category.
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

Deadlock989 wrote:
orzelek wrote:I think that might be about Xanders actually. That mod has very drawn out burner phase.
It's a massive pain because I never planned on a tier 0 - Bob's didn't have it when I started supporting that, and I didn't know about Xander's, and no-one else is that sadistic that I'm aware of. At the moment, for the belt theming, I fudge it by specifying tier 0 as tier 6 or whatever, at the end of the list, but not giving them any research unlock, and anything with no corresponding research is just skipped when it comes to enabling recipes. So the tier 0 loaders are probably actually generated (as deadlock-loader-entity-6 etc.), but no research unlocks them. All the other loaders have their own individual research, deadlock-loaders-1, deadlock-loaders-2 etc. - they are chained and also dependent on other things like Electronics, Logistics etc. That scheme will completely break if I let it try and specify deadlock-loaders-0, I've no idea how the game will display it but I'm fairly certain it won't be good.

So I'd have to recode everything either to shift the entire scheme up by one, or to also accept insertion of unlocks into other kinds of research, e.g. Logistics, and then spend time going through other people's mods to find out what research unlocks tier 0 undergrounds etc., and then also figure out all the migrations. Probably there should never have been loader research in the first place and they should have gone into Logistics with splitters etc. from the get-go, but hindsight is a wonderful thing. All this for a snail's pace loader I have no intention of playing with myself.

None of this is an appealing use of my time. My gut feeling is it's not up to me to "fix" mods that have extended early game grind. That was their plan and their decision to make. Presumably they do allow you to have inserters? Or are those made of unobtanium as well?
Yeah, and as tier 6 they need 30 iron gear wheel and 30 iron plates. The math goes wrong that way. I've changed them to tire 0 locally. Needs a few fixups so the for loops start at tier 0 instead of 1 and the cost of 5*i becomes i==0 and 2 or 5*i and such. All of that was easy to change and I can send you a diff if you want.

I've run into some problems though (might have to ask Bob about 1):

1) Bob changed the belt speeds to be 10, 20, 30, ... For the yellow loader I get a speed of 20, matching the belt. But for the black basic loader I get a speed of 6.6666 while the belt has speed 10.
I saw that you copy the speed of the belt entity into the loader entity so I have no idea how that gets the wrong speed.

2) Bobs mod have a config option that tiers depend on the previous. Might be nice to match that in loaders and stackers. Unfortunately the requesites for each level are kind of hardcoded. I wonder if they should be moved into the shared file where you test for various mods? That would also simplify having tier 1 require tier 0 if the mod has one.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

mrvn wrote:I can send you a diff if you want.
Thanks for the offer, but I really don't want to support them. I think a half-yellow-speed belt is bonkers. This was supposed to be a dinky little loaders mod to support my vanilla-only belt stacking experiment. It's getting out of hand now.
I've run into some problems though (might have to ask Bob about 1):

1) Bob changed the belt speeds to be 10, 20, 30, ... For the yellow loader I get a speed of 20, matching the belt. But for the black basic loader I get a speed of 6.6666 while the belt has speed 10.
I saw that you copy the speed of the belt entity into the loader entity so I have no idea how that gets the wrong speed.
All the other ones tested fine when you press Bob's "break every blueprint and savegame in the world" button, but I never tested the tier 0 loader because it doesn't officially exist. I even added a second check in data-final-fixes.lua to catch any updated vanilla speeds. You might have missed changing another 1 to a 0 there. Bob's Logistics applies the speed changes in its data-updates.lua, not data.lua.
2) Bobs mod have a config option that tiers depend on the previous. Might be nice to match that in loaders and stackers. Unfortunately the requesites for each level are kind of hardcoded. I wonder if they should be moved into the shared file where you test for various mods? That would also simplify having tier 1 require tier 0 if the mod has one.
I haven't even started to look at configurable recipes and with the myriad of options and then third party modpacks changing everything on top of that, that's a rabbit warren I don't really want to go down. Y'know, this support could be a two way thing - it's Bob that's changing vanilla recipes and speeds, there's nothing stopping him checking for loaders provided by other mods and changing them too.
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

Deadlock989 wrote:
mrvn wrote:I can send you a diff if you want.
Thanks for the offer, but I really don't want to support them. I think a half-yellow-speed belt is bonkers. This was supposed to be a dinky little loaders mod to support my vanilla-only belt stacking experiment. It's getting out of hand now.
I've run into some problems though (might have to ask Bob about 1):

1) Bob changed the belt speeds to be 10, 20, 30, ... For the yellow loader I get a speed of 20, matching the belt. But for the black basic loader I get a speed of 6.6666 while the belt has speed 10.
I saw that you copy the speed of the belt entity into the loader entity so I have no idea how that gets the wrong speed.
All the other ones tested fine when you press Bob's "break every blueprint and savegame in the world" button, but I never tested the tier 0 loader because it doesn't officially exist. I even added a second check in data-final-fixes.lua to catch any updated vanilla speeds. You might have missed changing another 1 to a 0 there. Bob's Logistics applies the speed changes in its data-updates.lua, not data.lua.
2) Bobs mod have a config option that tiers depend on the previous. Might be nice to match that in loaders and stackers. Unfortunately the requesites for each level are kind of hardcoded. I wonder if they should be moved into the shared file where you test for various mods? That would also simplify having tier 1 require tier 0 if the mod has one.
I haven't even started to look at configurable recipes and with the myriad of options and then third party modpacks changing everything on top of that, that's a rabbit warren I don't really want to go down. Y'know, this support could be a two way thing - it's Bob that's changing vanilla recipes and speeds, there's nothing stopping him checking for loaders provided by other mods and changing them too.
Yeah, I missed the data-final-fixes.lua, thanks. As for supporting this: I'm perfectly fine doing this in an add-on mod or dumping bob related stuff on bob. I just saw that you had most of the tier 0 stuff and all the other bob stuff already in there but not enabled. So it didn't make sense to add just tier 0 somewhere else. Maybe (or do you already have?) make a public API to add belt types like you have for the stackers and craters.

My comment about the config option was more general though. I've seen the same idea applied in several mods and I really like the idea that you take an older model X, replace a few parts and get a shiny new X2. I hate when building mk2 of something doesn't use up my now obsolete mk1 versions. But other people have different tastes. Bob made it a config option and I think that kind of choice is great.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

mrvn wrote: Maybe (or do you already have?) make a public API to add belt types like you have for the stackers and craters.
Now that is what I should have done in the first place. Move the responsibility off my back. I think I will do that. Something like this:

deadlock_loaders.create(N, colour, transportbelt, ingredients, research)

It would enforce setting them in a logical order and assume that tiers 1, 2, 3 have to exist. If you set tier 5 without setting tier 4 first, it'll throw an error. If you set tier -1 without setting tier 0 first, it'll throw an error. If you set a tier that already exists, it overrides it. If colour is nil then it uses the default for that tier or grey. If ingredients are nil then it uses the built-in scheme of plates and gears. If research is nil then the recipe is auto-enabled instead. Sound good?

As for config options - the loaders do already use the previous version in each higher tier recipe. Ingredient options are not something I'm really interested in (though there should really be an expensive-mode recipe) but the above scheme would let people do that kind of thing, you could look for Bob's settings and create the new tiers or override the existing ones conditionally.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

Deadlock's Compact Loaders version 1.4.18
Deadlock's Stacking Beltbox version 1.4.18
-- Removed support for Bob's Logistics.
User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2529
Joined: Fri Nov 06, 2015 7:41 pm

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

Post by Deadlock989 »

... April Fool's.

I have a draft update ready which provides a function that other modders can use to auto-generate loaders of any tier - I've tested it out a fair bit but will hold off on uploading it to the portal for a while. If you'd like to try it out, PM me.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

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

Post by steinio »

Deadlock989 wrote:... April Fool's.

I have a draft update ready which provides a function that other modders can use to auto-generate loaders of any tier - I've tested it out a fair bit but will hold off on uploading it to the portal for a while. If you'd like to try it out, PM me.
I don't take any news for serious today.
There's snowfall (in spring) in the german news... Lol they think they can fool me.
Image

Transport Belt Repair Man

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

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

Post by Deadlock989 »

The not-really-an-API for Compact Loaders is ready but I'll still let it sit for a while. It makes adding or changing loader tiers (or just styling belt tiers) pretty easy. The existing supported mods (and a new one, Factorio-Extended-Plus, which is just a fork of Factorio-Extended) have their own separate file each and the longest is 3 lines of code.

But I did have to make some changes which might break a mall or two - loaders got a bit cheaper if no other mods are installed, crazy expensive if you've selected all the pain options in Bob's or Xander. I also removed loader research - loaders are now unlocked by Logistics-n. Saves will be migrated.

Here is how it works, feed back if you think you might use this but don't like how this sounds. You can generate a new loader tier and theme all the belts/underneathies in the same tier, with all the right graphics and icons and recipes auto-generated and the loader speed auto-detected, just by specifying between 3 and 9 parameters and calling one line of code. By default, loaders now base their recipes on those of the underground belts of the same tier (take the recipe, replace any underneathies with a loader of the previous tier, replace any belts with just 1 belt, halve the rest). Modders can override that with custom ingredients when they specify the tier. They can also choose a specific technology to unlock the loader, or have it enabled from game start.

At a bare minimum, you need to specify the tier, the main belt entity, and either an underground or some custom ingredients. Though that would get you either a vanilla-coloured loader or if the tier was >3 or <1 a lovely pink loader, that is immediately unlocked, because you didn't specify a colour or a technology, and half the styling would be missing when players turn that on because you didn't tell it about undergrounds or splitters. But if you specify every parameter you have pretty much as much control over the tier as I do. You can also override any loaders created by DCL, both the vanilla tiers or the ones from the four natively supported mods.

That about covers it. I can smell the freedom. But now I guess I have to do the same thing for the stacking beltboxes ...

Edited to add: actually I'm going to make it passed in as a table with keys for all the parameters, much easier to read, order doesn't matter, and you can have a table of tier-tables and just loop through them, like this:

Code: Select all

local tiers = {
    {
        tier = 0,
        transport_belt = "basic-transport-belt",
        underground_belt = "basic-underground-belt",
        splitter = "basic-splitter",
        colour = {r=165,g=165,b=165},
        ingredients = nil,
        crafting_category = nil,
        technology = "bob-logistics-0",
        localisation_prefix = "bob",
    },
    {
        tier = 4,
        transport_belt = "turbo-transport-belt",
        underground_belt = "turbo-underground-belt",
        splitter = "turbo-splitter",
        colour = {r=165,g=10,b=225},
        ingredients = nil,
        crafting_category = nil,
        technology = "bob-logistics-4",
        localisation_prefix = "bob",
    },
    {
        tier = 5,
        transport_belt = "ultimate-transport-belt",
        underground_belt = "ultimate-underground-belt",
        splitter = "ultimate-splitter",
        colour = {r=10,g=225,b=25},
        ingredients = nil,
        crafting_category = nil,
        technology = "bob-logistics-5",
        localisation_prefix = "bob",
    },
}

for _,tier in pairs(tiers) do deadlock_loaders.create(tier) end
mrvn
Smart Inserter
Smart Inserter
Posts: 5865
Joined: Mon Sep 05, 2016 9:10 am
Contact:

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

Post by mrvn »

That all sounds great. Thanks.

I also want to mention 2 reasons for tier 0 loaders and beltboxes:

1) With bobs logistic rework tier 0 has speed 10. So not that much slower than vanilla transport belts.
2) A tier 0 loader can fill a tier 4 beltbox with stacks or empty it of stacks at full speed.

It looks nice if you have a full belt of iron plates going in (fast) and a full belt of iron plate stacks coming out (slow).
Post Reply

Return to “Mods”