Storage Optimizer – UPS-friendly stack inserter & loader


UPS-friendly inserter / loader replacement: a 1×1 building that moves whole stacks between chests, warehouses, cargo wagons, assembling machines and furnaces without belts – up to 20 stacks at once. One building instead of loader + belt + unloader.

Content
3 days ago
2.0 - 2.1
405
Logistics Trains Circuit network Storage

i Compatibility with other belt mods

6 days ago

In my environment, I am using the One More Tier mod (along with the Double Speed Belts mod), and I think it would be even more convenient if there were support for the speeds of other belt mods.

(English is not my native language, so I'm using Google Translate. Hope you understand!)

6 days ago

Thanks for the feedback! Good news: both mods are already supported – no setting needed.
Storage Optimizer doesn't use belts, but it creates one tier for every belt in the game and derives the tier's speed from that belt's speed (yellow belt speed = 1 transfer per second, a 2× faster belt = 2 transfers per second). The number of stacks per transfer is set separately in the building's window.

  • One More Tier – its belt gets its own Storage Optimizer tier, with its own research after the turbo tier.
  • Double Speed Belts – the tiers are generated from the already doubled belt speeds. With both mods (and Space Age) the intervals are: yellow 60 ticks, red 30, blue 15, turbo 8, One More Tier 4 – compared to 60/30/20/15/10 without Double Speed Belts.

I tested this combination and it works. The next version (0.5.2) also makes sure that Storage Optimizer always loads after Double Speed Belts, even when other mods (e.g. Bob's Logistics) change the load order.

If you see something different in your game – e.g. a missing tier or a tier that doesn't match its belt – please let me know which one and, if possible, your mod list. Thanks!

5 days ago

Thank you for your response.
I haven't tested it in my own environment yet, but I will let you know if any issues arise.

5 days ago

I've checked the items and everything works fine.
This is just a minor request, but I'd be happy if the color of the ">>>" on the Storage Optimizer cover could match the underlying belt.
(I don't have Space Age installed, but the ">>>" on the cover is green, which makes me mistake it for a Space Age turbo belt.)

3 days ago

Thanks for the feedback – you’ve made me think a bit and release a new version that takes the belt colours into account. However, if you mod a lot and have mods with colours that aren’t well defined and are used in building models, there’s nothing I can do about that.
So have a go at what I’ve just released and see how it goes.

3 days ago

I tested this with a minimal environment (Storage Optimizer + One More Tier only) without Space Age, but the color is still green.
After investigating, I found that the color list was hardcoded. I've attached the fixed code (created and tested in consultation with Google Gemini) below.

colors.lua

--- Po?adi, ve kterem se rozdavaji nepou?ite barvy pas?m s neznamou barvou.
--- 従来の定義(スペースエイジありの場合:緑を挟む)
local FALLBACK_WITH_SPACE_AGE = { "yellow", "red", "blue", "green", "purple", "orange", "cyan", "pink", "white", "brown", "black" }

--- スペースエイジなしの場合:緑を抜いて紫を繰り上げる
local FALLBACK_WITHOUT_SPACE_AGE = { "yellow", "red", "blue", "purple", "orange", "cyan", "pink", "white", "brown", "black" }

--- スペースエイジの有無に応じてフォールバックの順番を切り替える
local has_space_age = mods and mods["space-age"] ~= nil
M.FALLBACK = has_space_age and FALLBACK_WITH_SPACE_AGE or FALLBACK_WITHOUT_SPACE_AGE

(Sorry, the added comments in the code are in Japanese.)

3 days ago

Hi! Thank you so much for taking the time to report this, and for writing a fix too. It really helped.

You were right, the One More Tier belt was getting the wrong colour. The reason is a bit technical: in Factorio, a belt doesn't actually store its colour anywhere the game can read. The colour only exists in the image. So Storage Optimizer has to guess it from the icon: from its tint, from a list of icons I know, or from a colour word in the file name, like purple-transport-belt.png. One More Tier reuses the vanilla file name with no tint, so there was nothing to go on. Without Space Age, the next free colour just happened to be green.

I didn't use your patch exactly as written. Changing the fallback order would have changed the colours of other mods' belts too. Instead I added One More Tier to the list, so its belt is now purple, with or without Space Age.

And since I was at it, I went a bit further. I downloaded the most popular belt mods for Factorio 2.1, loaded each one together with Storage Optimizer, and compared every belt with its arrow colour. I checked and adjusted the colours for 16 more mods, including Space Exploration, 5Dim's Transport, Factorio+, More Belts, Advanced Belts, Wooden Logistics, Prismatic Belts and Artisanal Reskins for Bob's. Hopefully that keeps things quiet for a while 🙂. All of this will be in the next update.

I should be honest, though: making a mod like this fully compatible with every coard. Every mod defines its belts a little differently, and there's no reliable wayto read a belt's colour automatically, so some cases will always need to be added by hand. If you ever see a colour that looks wrong, just tell me which mod it is and I'll add it.

Thanks again for your help, and enjoy the game!

2 days ago

Thank you for the official update plans!

You're completely right—my code wouldn't have handled other belt-adding mods, which slipped my mind since I wasn't planning on using any others anyway.
I might leave another comment if any issues come up, so I'd appreciate your help then if they do.

Glad I could help improve the mod!

New response