Auto-sort chests when player opens inventory

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Auto-sort chests when player opens inventory

Post by mudcrabempire »

Simple and stupid:
Would it be possible to enable auto-sorting for chests? Since it is mostly for the player one could do the sorting only if a player has the chest open if it would otherwise have computation-limiting issues.

I did a quick search and found no related posts nor did i find anything existing in the settings which i found a little curious since it seems such a basic idea to me. If i did not search well enough please direct me there and this thread can be considered void.
Last edited by ssilk on Wed Jun 22, 2022 5:35 am, edited 1 time in total.
Reason: Changed title to make topic more clear

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by ssilk »

Auto-Sorting will not come. I changed the title of this topic to make this more clear, what you really meant (only when player opens inventory).

Reasons for not auto-sorting by default:
1. Sorting the chest inventory (btw. see viewtopic.php?f=6&t=60950 which is about auto sort of the players inventory) needs too much cpu power. The point here is, that in theory every mixed chest needs to be sorted for every change in slots. Which could happen in the worst case for every tick. Now it’s clear that sorting the inventory of one player could not happen so often, and there is normally by far not so much player inventories than chests. That’s why sorting of player inventory is ok, but it’s clear, that this could cause some slowdown for chests, especially if you use a mod, like warehouse, where you have thousands of slots in one chest.
2. Why? You say it’s a basic need. But you can change game behavior with it (because of the fifo behavior of inserters). I mean it looks eventually not nice if you are looking into a chest and everything is mixed. 8-) But there is no real reason to sort it by default, because this mixing changes eventually very often. See 1.

I let this open yet, because you said you want to sort it only when a player looks into a chest. Fair enough.

Meanwhile I point to this mod:
https://mods.factorio.com/mod/manual-inventory-sort
:)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

aka13
Filter Inserter
Filter Inserter
Posts: 671
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by aka13 »

ssilk wrote:
Wed Jun 22, 2022 5:22 am
Auto-Sorting will not come. I changed the title of this topic to make this more clear, what you really meant (only when player opens inventory).

Reasons for not auto-sorting by default:
1. Sorting the chest inventory (btw. see viewtopic.php?f=6&t=60950 which is about auto sort of the players inventory) needs too much cpu power. The point here is, that in theory every mixed chest needs to be sorted for every change in slots. Which could happen in the worst case for every tick. Now it’s clear that sorting the inventory of one player could not happen so often, and there is normally by far not so much player inventories than chests. That’s why sorting of player inventory is ok, but it’s clear, that this could cause some slowdown for chests, especially if you use a mod, like warehouse, where you have thousands of slots in one chest.
2. Why? You say it’s a basic need. But you can change game behavior with it (because of the fifo behavior of inserters). I mean it looks eventually not nice if you are looking into a chest and everything is mixed. 8-) But there is no real reason to sort it by default, because this mixing changes eventually very often. See 1.

I let this open yet, because you said you want to sort it only when a player looks into a chest. Fair enough.

Meanwhile I point to this mod:
https://mods.factorio.com/mod/manual-inventory-sort
:)
How is sorting when a player opens an invenotry/clicks a button performance unfriendly? It's not something that runs in the background the whole time, it's just a quick macro, like sorting by hand, but faster. I mean, even if it is 1 stack per tick, it's 1 second for a whole chest, I can't imagine that that would have any meaningful impact on performance on a megabase, 10-20 moving operations.
Pony/Furfag avatar? Opinion discarded.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2481
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by FuryoftheStars »

aka13 wrote:
Wed Jun 22, 2022 6:54 am
How is sorting when a player opens an invenotry/clicks a button performance unfriendly? It's not something that runs in the background the whole time, it's just a quick macro, like sorting by hand, but faster. I mean, even if it is 1 stack per tick, it's 1 second for a whole chest, I can't imagine that that would have any meaningful impact on performance on a megabase, 10-20 moving operations.
Note that ssilk said they changed the topic. I believe the original topic was just “Auto-sort chests”, so this is what ssilk is saying would be performance intensive.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by mudcrabempire »

Probably a good idea to change the title. I really meant it to improve the players ability to deal with inventories other than the personal one and not as a global potentially-exploitable change of the game mechanics. I can easily see how sorting every chest-inventory on every content-change could kill performance.

Also i did not say "it's a basic need". I said "it's a basic idea". Referring to me thinking that it is not a very far jump to make from "auto-sorting personal inventory" to "auto-sorting other inventories too". And i don't believe i am the first person to use auto-sorting which ever opened an unsorted chest and thought "would be nice to automatically sort that too". Which led me to wonder what conclusions those people who thought about it before me (possibly even the devs) came to.

And i wasn't the first one, as shown by the mod you pointed out. I was just surprised when i searched the forum and found no thread about it. I'll certainly be using that mod. Thanks for that.

wobbycarly
Fast Inserter
Fast Inserter
Posts: 240
Joined: Tue Jan 29, 2019 4:00 am
Contact:

Re: Auto-sort chests when player opens inventory

Post by wobbycarly »

I raised a similar "bug" about the spidertron inventory not sorting and was advised that vehicles' inventories are excluded from sort due to performance issues. Can understand performance hits where there are likely many thousands of chests throughout a decent-sized base, but when cars/tanks/spiders are typically unlikely (excluding cars on belts bases!!!) to number more than a couple of dozen, I would that thought that performance impact by these would be negligible.

aka13
Filter Inserter
Filter Inserter
Posts: 671
Joined: Sun Sep 29, 2013 1:18 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by aka13 »

wobbycarly wrote:
Thu Jun 23, 2022 9:04 am
I raised a similar "bug" about the spidertron inventory not sorting and was advised that vehicles' inventories are excluded from sort due to performance issues. Can understand performance hits where there are likely many thousands of chests throughout a decent-sized base, but when cars/tanks/spiders are typically unlikely (excluding cars on belts bases!!!) to number more than a couple of dozen, I would that thought that performance impact by these would be negligible.
On spidertron this is a nightmare, it will shit itself after exactly one deconstruction errand, not even mentioning the issues with having to blacklist everything manually.
It's not as bad since the time when you can copy spidertron configuration.
Pony/Furfag avatar? Opinion discarded.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by ssilk »

@aka13: sorry, my post was a bit “through the chest into the eye” (German proverb). And yes, the original title was just “Auto-sort chests”.

Even so it could be quite intense to sort the chests only when looking into it. Think to multiplayer with 50 players.

@mudcrabempire: I am not 100% sure, if this has been suggested before. I searched a bit, the linked article was the only one I found. I thought there was a discussion about a button in every inventory to sort or do something similar, but till now I didn’t find that.

Which brings me to the point where I would say, this should be implemented only a on players explicit request. I mean to add a button; it’s not sorted by default when you look into it, you need to press an extra button. Because as said: you change otherwise some basic principles of how inventories work (last in, first out principle). Maybe you don’t want to sort it. Maybe you want it exactly as mixed as it is, because it is part of your construction.


So seen it makes sense to add this button to every inventory. Even players inventory when he turned off auto-sorting.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

lyvgbfh
Fast Inserter
Fast Inserter
Posts: 165
Joined: Fri Jul 10, 2020 6:48 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by lyvgbfh »

ssilk wrote:
Fri Jun 24, 2022 6:20 am
@aka13: sorry, my post was a bit “through the chest into the eye” (German proverb). And yes, the original title was just “Auto-sort chests”.

Even so it could be quite intense to sort the chests only when looking into it. Think to multiplayer with 50 players.

@mudcrabempire: I am not 100% sure, if this has been suggested before. I searched a bit, the linked article was the only one I found. I thought there was a discussion about a button in every inventory to sort or do something similar, but till now I didn’t find that.

Which brings me to the point where I would say, this should be implemented only a on players explicit request. I mean to add a button; it’s not sorted by default when you look into it, you need to press an extra button. Because as said: you change otherwise some basic principles of how inventories work (last in, first out principle). Maybe you don’t want to sort it. Maybe you want it exactly as mixed as it is, because it is part of your construction.


So seen it makes sense to add this button to every inventory. Even players inventory when he turned off auto-sorting.
I agree with this, even something like the "reset settings" button above an inventory to auto-sort it and merge stacks would be nice. Like right now if you ctrl+right click on a full chest, it will be left with half-stacks in every slot.

mudcrabempire
Fast Inserter
Fast Inserter
Posts: 110
Joined: Sun Oct 28, 2018 2:44 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by mudcrabempire »

ssilk wrote:
Fri Jun 24, 2022 6:20 am
So seen it makes sense to add this button to every inventory. Even players inventory when he turned off auto-sorting.
This gave me a weird idea: Auto-sort for player-inventory is an exception to auto-sorting changing the game-mechanics because players don't interact with inserters and stuff. What if they did? :geek: 8-) :lol:

User avatar
atomizer
Long Handed Inserter
Long Handed Inserter
Posts: 79
Joined: Sat Sep 22, 2018 3:18 pm
Contact:

Re: Auto-sort chests when player opens inventory

Post by atomizer »

ssilk wrote:
Fri Jun 24, 2022 6:20 am
So seen it makes sense to add this button to every inventory.
This is exactly what Terraria and modded Minecraft do, and it works great. The amount of buttons and their functions vary, but one for sorting would be a good start.

Post Reply

Return to “Ideas and Suggestions”