More Long Inserters

by Kryzeth

Adds long inserter variants of nearly all detected inserters. Optionally also adds burner versions of the bulk and stack inserters. Fully compatible with Bobs Logistics, Artisanal Reskins, Krastorio 2, and many more! Incompatible with the inserter overhaul setting in Bobs Logistics.

Content
4 days ago
0.16 - 2.0
19.6K
Logistics

i [Pending] Extra Long Handed Inserter

16 days ago

I decided to set my sights on this mod, it's fairly new and adds a length-3 inserter using the purple icon from the old "Filter inserter".

Curious to see what happens when I load it with More Long Inserters, the Extra Long is ignored (obviously don't try to make a long version of it) and not moved to your new subgroups (similar to the Steam inserters when we were testing the IR3 Patchset).

I'm not sure what you consider correct behaviour when you find an inserter you haven't encountered before, but since your description says this:

I wanted an inserter mod that dynamically added a long inserter variant for every inserter in the game, being compatible with as many inserter mods as possible, while also adhering to a proper menu order

I thought I'd bring it to your attention. Presumably there's a reason why you don't take everything in data.raw.inserter and add it to your subgroup.

(Don't try loading Extra Long Handed Inserter with your build of the IR3 Patchset, it will crash.)


Off-topic aside: I'd like to know how you were able to host these images on the Factorio servers for your Information page, without adding them to the Gallery.

16 days ago

Hm, while the current implementation (leaving all unsupported inserters behind in the original subgroup) isn't entirely wrong, it would probably be better to make some kind of attempt to sort the ones that aren't fully supported.

The sorting logic is actually pretty annoying to deal with for what it is; it's basically entirely hard-coded, with the only major differences depending on the number of modded inserters in the game.

Under mostly vanilla conditions (less than 10 total inserters), then they can all fit in one row, which are sorted by base, long (in the order of burner, yellow, blue, bulk, stack). This excludes Heat, Nutrient, and Pipe, which I believe get sorted into different rows, separate from the vanilla ones.

If there are less than 20 total inserters, then they can all fit into two rows, which are separated by base and long variants (in the order of burner, yellow, blue, bulk, stack). Modded inserters generally fall next to the most appropriate inserters, like steam next to burner, faster-non-bulk after blue, faster bulk after bulk, faster stack after stack, etc. Oh, and Pelagos gets its own rows as well, for their diesel powered inserters (since there are multiple and use different fuel type)

And then the most common scenario, more than 20 total inserters or complex burner setting enabled; row 1 gets burner, steam, Pelagos diesel; row 2 gets base electric; row 3 gets long variants; and then heat/nutrient/pipe inserters fall into rows 4-6 (yes, we seriously need that many rows)

And then of course, anything that's not in the list gets left behind.

I suppose if I wanted to do this automatically, I'd probably keep the simplest variation as it is (under 10 inserters, use manually coded sorting), otherwise group by fuel type (burner/steam/diesel), then electric arm length 1, electric arm length 2, electric arm length.. more than 2, and then my heat/nutrient/pipe inserters after that. Hmmm... I'll work on that after my other work is completed (currently focused on space things)

16 days ago
(updated 16 days ago)

Off-topic aside: I'd like to know how you were able to host these images on the Factorio servers for your Information page, without adding them to the Gallery.

I'm honestly surprised those are getting factorio-based domain links, considering that the images on the mod portal are linked directly from imgur.

Must be some sort of caching thing, because doing the same thing to the image posted above shows the proper imgur link

16 days ago
(updated 16 days ago)

Must be some sort of caching thing, because doing the same thing to the image posted above shows the proper imgur link

I think we have the answer. Imgur blocks several countries including mine so I can't see that version of the image, and the devs are doing us a favour.


I don't envy the mission you've taken on with this mod, it doesn't sound easy.

Just thinking through how I'd sort inserters in pseudocode, after you generate your long variants.

Let W = data.raw["utility-constants"].default.select_slot_row_count (the width of one recipe row)
Let T = the total number of non-hidden entries in data.raw.inserter with valid crafting recipes

Sorting from major to minor:

  • Arm length (ascending), each of these buckets would be one subgroup
  • Power source
    • Solid fuels (burner, then nutrients)
    • Fluid fuels
    • Heat
    • Electricity
  • Forced stacking (non-stacking before stacking)
  • Swing speed (slowest to fastest)

If T <= W (all fit on one row), Arm length becomes the most minor sort criterion after Swing speed.

If there are any rows which exceed W, split by the next minor criterion until they're short enough.

Then maybe a final pass to try and combine adjacent rows if they both fit in <= W.

4 days ago

I've also been working on this one, and it's definitely had its ups and downs. Bright side, I have the new logic working for the most part, just have to iron out the edge cases.

Specifically, diagonal inserter doesn't really have a good place; it's pretty late in the tech tree when Igrys is enabled (locked behind Igrys, which is locked behind Vulcanus), otherwise it unlocks at Automation-1, with the basic long inserters.

And of course, the extra long inserter, which is a unique one-of, appears to be faster than a long inserter (which itself is already faster than a basic yellow inserter) but still slower than a fast inserter.

Piped inserters logic is generic enough to have made piped versions of both, which puts them out of sync with the nutrient, heat, and long inserter rows (and is already bugged on top of that, since I didn't see stack pipe inserter in my testing).

I'm thinking I might just have to add diagonal compatibility to heat, nutrient, AND long inserters, just to align with row 1 again (maybe give them more use, since I saw somebody on the Foundry discord asking about the use of diagonal inserters in general), and then add extra long versions of every inserter in the game for yet another row. Most of the logic for that is already in place, just need to splice the graphic and then duplicate the long inserter table.

Aaand I just realized more heat inserters logic is also broken; I wanted to see if that would still work with the new row sorting logic, but it just doesn't work at all, even with the old logic. So many fixes, so little time

New response