Page 1 of 1

Suggestion: Item count in hand

Posted: Thu Feb 28, 2019 9:20 pm
by Gandamir
When holding an item in my hand, I want to see the total item count, not the count in the current stack. If it says 6, do I have 6 or 56 or 106? Or is the next stack only 8 so I have 14 total?

Tell me what I have to work with. :)

Re: Suggestion: Item count in hand

Posted: Thu Feb 28, 2019 9:25 pm
by saors
It would be nice if the count in hand said "8 / 256" where 8 is the count in your hand the 256 was the total in inventory.

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 2:36 am
by saors
Actually, the new quickbars show how many items you have total, even if that is larger than 1 stack of that item. Pretty good UI IMO

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 7:31 am
by leadraven
saors wrote:
Fri Mar 01, 2019 2:36 am
Actually, the new quickbars show how many items you have total, even if that is larger than 1 stack of that item. Pretty good UI IMO
Quickbar - yes, hand - no. I think hand should show the same number as quickbar does - total amount. After all, player could use item directly from inventory, but still needs this information.

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 9:54 am
by bobingabout
that would confuse the crap out of me.

the quickbar is literally just a shortcut. when you click on the item it grabs ONE SINGLE STACK of the item from your inventory, and that quantity is shown in your hand.
what if you do something more like me and often grab items directly out of your inventory, not using the quickbar. should that show the stack quantity, or the quantity of your entire inventory?

keep in mind that while you have ONE SINGLE STACK in your hand, that stack is REMOVED from your inventory, you're holding it in your cursor, it's not in the inventory anymore.

Now think like this. You have a stack of 8 of some item in your hand, plus 6 more stacks of 20 in your inventory, plus the hand marked reserved slot that the items were taken from. The total in both is 128. Would you want 128 to be shown on your cursor, or only 8?
Personally, I'd want it to say 8, because when I press Q, 8 items will be returned to your inventory, that's how many are actually in my hand, but I could understand why you might say 128.

Alternate scenario. You have 128 items in your inventory, you just grab another stack of 20 from a chest then press E to close the window. Should it say 20 because that is what is in your hand, or should it display 148, because that's the total if you were to press Q and move the items to your inventory?

Assume the change is made, you just have that stack in your hand and it says 148 now. Open a chest, click on an empty slot in the chest to place the items in the chest. Do you expect it to place a full stack being 20, or do you expect it to place 148 because that's what the game is telling you is in your hand?


Have I made my point yet?

holding / total (EG my example "20 / 148") would be reasonable I guess, but that is a fair amount of text to cram on your cursor.

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 2:26 pm
by Darinth
bobingabout wrote:
Fri Mar 01, 2019 9:54 am
that would confuse the crap out of me.

the quickbar is literally just a shortcut. when you click on the item it grabs ONE SINGLE STACK of the item from your inventory, and that quantity is shown in your hand.
what if you do something more like me and often grab items directly out of your inventory, not using the quickbar. should that show the stack quantity, or the quantity of your entire inventory?

keep in mind that while you have ONE SINGLE STACK in your hand, that stack is REMOVED from your inventory, you're holding it in your cursor, it's not in the inventory anymore.

Now think like this. You have a stack of 8 of some item in your hand, plus 6 more stacks of 20 in your inventory, plus the hand marked reserved slot that the items were taken from. The total in both is 128. Would you want 128 to be shown on your cursor, or only 8?
Personally, I'd want it to say 8, because when I press Q, 8 items will be returned to your inventory, that's how many are actually in my hand, but I could understand why you might say 128.

Alternate scenario. You have 128 items in your inventory, you just grab another stack of 20 from a chest then press E to close the window. Should it say 20 because that is what is in your hand, or should it display 148, because that's the total if you were to press Q and move the items to your inventory?

Assume the change is made, you just have that stack in your hand and it says 148 now. Open a chest, click on an empty slot in the chest to place the items in the chest. Do you expect it to place a full stack being 20, or do you expect it to place 148 because that's what the game is telling you is in your hand?


Have I made my point yet?

holding / total (EG my example "20 / 148") would be reasonable I guess, but that is a fair amount of text to cram on your cursor.
Items grabbed from inventory should actually be that stack, because that's what you have on your cursor. When using the quickbar, the items shouldn't ever actually go to your cursor. The shortcut should be 'on your cursor'. Whenever you go to use that shortcut, it should reference your inventory and use items from it if possible, but no items are ever directly on your cursor when you do so. I'm a little surprised that this isn't how it works, and it unfortunately might be a substantive bit of code to get it working like that because I suspect there isn't support for your cursor holding such a shortcut.

Yes, there are other details to be worked on (how does this interact with trying to insert half-a-stack of an item into something?) but all of these that I was able to think of are actually very intuitive in what they should do (if you've got your shortcut on the cursor and try to insert half-a-stack... it should insert half-a-stack or as much as is available). When the conceptually simple change is made that items aren't on your cursor when you use the quickbar, just the shortcut, all of the behavior that people are expecting makes perfect sense and the behavior it should have becomes reasonably intuitive.

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 2:43 pm
by bobingabout
Darinth wrote:
Fri Mar 01, 2019 2:26 pm

Items grabbed from inventory should actually be that stack, because that's what you have on your cursor. When using the quickbar, the items shouldn't ever actually go to your cursor. The shortcut should be 'on your cursor'. Whenever you go to use that shortcut, it should reference your inventory and use items from it if possible, but no items are ever directly on your cursor when you do so. I'm a little surprised that this isn't how it works, and it unfortunately might be a substantive bit of code to get it working like that because I suspect there isn't support for your cursor holding such a shortcut.

Yes, there are other details to be worked on (how does this interact with trying to insert half-a-stack of an item into something?) but all of these that I was able to think of are actually very intuitive in what they should do (if you've got your shortcut on the cursor and try to insert half-a-stack... it should insert half-a-stack or as much as is available). When the conceptually simple change is made that items aren't on your cursor when you use the quickbar, just the shortcut, all of the behavior that people are expecting makes perfect sense and the behavior it should have becomes reasonably intuitive.
There is no difference between grabbing from the quickbar or grabbing from your inventory, the quickbar is just a shortcut.
there's no reason why you can't put coal for example on the quickbar, and put it in furnaces, the methods will be the same as if you grabbed it from your inventory.

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 3:05 pm
by Darinth
bobingabout wrote:
Fri Mar 01, 2019 2:43 pm
There is no difference between grabbing from the quickbar or grabbing from your inventory, the quickbar is just a shortcut.
there's no reason why you can't put coal for example on the quickbar, and put it in furnaces, the methods will be the same as if you grabbed it from your inventory.
I know it is, I'm saying it shouldn't be. The quickbar should put a shortcut on your cursor, not the actual item.

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 4:01 pm
by bobingabout
Darinth wrote:
Fri Mar 01, 2019 3:05 pm
bobingabout wrote:
Fri Mar 01, 2019 2:43 pm
There is no difference between grabbing from the quickbar or grabbing from your inventory, the quickbar is just a shortcut.
there's no reason why you can't put coal for example on the quickbar, and put it in furnaces, the methods will be the same as if you grabbed it from your inventory.
I know it is, I'm saying it shouldn't be. The quickbar should put a shortcut on your cursor, not the actual item.
that would break A LOT of mods that look to see what's in your hand when placing items. Do you report what the shortcut is? a stack of 148 coal? do you report a single stack that's in the shortcut, 8 coal, or say you don't actually have anything in your hand (the actual case) because it's a shortcut?

what is the mod trying to read when looking to see what's in your hand?

Re: Suggestion: Item count in hand

Posted: Fri Mar 01, 2019 4:37 pm
by saors
Also, if the hand was you just holding every item, instead of one stack, you wouldn't be able to shift-[left/right]-click to insert partial amounts into turrets/assembly machines/etc.

Shift-click would either attempt to put 100% or 50% of the total amount from your inventory, as opposed to 100 or 50% of the stack in your hand.

Re: [0.17.x] Save and Load Quickbar Layouts like blueprints

Posted: Mon Mar 04, 2019 4:53 am
by CloSteam
can we also add total amount to the hand as well why are we still getting the stack amount wen we have something on hand. the total amount in both your hand and the quickbar makes more sense
[Koub] Moved from unrelated topic into the already existing suggestion thread.

Re: Suggestion: Item count in hand

Posted: Mon Mar 04, 2019 3:41 pm
by Darinth
bobingabout wrote:
Fri Mar 01, 2019 4:01 pm
Darinth wrote:
Fri Mar 01, 2019 3:05 pm
bobingabout wrote:
Fri Mar 01, 2019 2:43 pm
There is no difference between grabbing from the quickbar or grabbing from your inventory, the quickbar is just a shortcut.
there's no reason why you can't put coal for example on the quickbar, and put it in furnaces, the methods will be the same as if you grabbed it from your inventory.
I know it is, I'm saying it shouldn't be. The quickbar should put a shortcut on your cursor, not the actual item.
that would break A LOT of mods that look to see what's in your hand when placing items. Do you report what the shortcut is? a stack of 148 coal? do you report a single stack that's in the shortcut, 8 coal, or say you don't actually have anything in your hand (the actual case) because it's a shortcut?

what is the mod trying to read when looking to see what's in your hand?
I have to acknowledge that I don't know enough about the modding API to understand what mods are looking at your hand for. This might be some additional complexity for mods to have to deal with, which I'm never a fan of, but am still generally inclined to agree with for improvements in the functionality of the base game. If the API was done well, it'd probably be a simple if statement that would convert the in-hand shortcut in to an in inventory item stack. Yes, it'd break current implementations, but the resolution would be pretty straight forward for all of the broken mods.
saors wrote:
Fri Mar 01, 2019 4:37 pm
Also, if the hand was you just holding every item, instead of one stack, you wouldn't be able to shift-[left/right]-click to insert partial amounts into turrets/assembly machines/etc.

Shift-click would either attempt to put 100% or 50% of the total amount from your inventory, as opposed to 100 or 50% of the stack in your hand.
Absolutely not. That's ridiculous. The game would still work on the stack size, not on the whole inventory. Shift-click would simply put in a full or half stack.

Re: Suggestion: Item count in hand

Posted: Thu Mar 21, 2019 11:49 am
by Gandamir
Another option would be to list N / MaxN where N is stack size remaining, and MaxN is total item count. Solves all scenarios mentioned. :)

Re: Suggestion: Item count in hand

Posted: Thu Mar 21, 2019 12:09 pm
by mrvn
bobingabout wrote:
Fri Mar 01, 2019 9:54 am
keep in mind that while you have ONE SINGLE STACK in your hand, that stack is REMOVED from your inventory, you're holding it in your cursor, it's not in the inventory anymore.
Actually not quite, not always, but sometimes. When you put something in your hand the stack gets replaced by a hand symbol so you can always put the stack back. Sometimes that fails but I believe those are bugs. So in a sense the stuff in your hand is also just a link to your inventory.

The problem with showing stack vs. all items is that it depends on the use case. When you build transport belts then the total number in the inventory is relevant. On the other hand when you drop coal in a furnace the actual amount in the picked up stack matters.

So I would go with it showing 8/256, meaning both numbers. Only way to show the right value every time.

Re: Suggestion: Item count in hand

Posted: Thu Mar 21, 2019 2:00 pm
by bobingabout
mrvn wrote:
Thu Mar 21, 2019 12:09 pm
bobingabout wrote:
Fri Mar 01, 2019 9:54 am
keep in mind that while you have ONE SINGLE STACK in your hand, that stack is REMOVED from your inventory, you're holding it in your cursor, it's not in the inventory anymore.
Actually not quite, not always, but sometimes. When you put something in your hand the stack gets replaced by a hand symbol so you can always put the stack back. Sometimes that fails but I believe those are bugs. So in a sense the stuff in your hand is also just a link to your inventory.
the hand in the inventory of just a reserved slot, to make sure there's a space to put it back when you press Q.

Re: Suggestion: Item count in hand

Posted: Thu Mar 21, 2019 2:34 pm
by mrvn
bobingabout wrote:
Thu Mar 21, 2019 2:00 pm
mrvn wrote:
Thu Mar 21, 2019 12:09 pm
bobingabout wrote:
Fri Mar 01, 2019 9:54 am
keep in mind that while you have ONE SINGLE STACK in your hand, that stack is REMOVED from your inventory, you're holding it in your cursor, it's not in the inventory anymore.
Actually not quite, not always, but sometimes. When you put something in your hand the stack gets replaced by a hand symbol so you can always put the stack back. Sometimes that fails but I believe those are bugs. So in a sense the stuff in your hand is also just a link to your inventory.
the hand in the inventory of just a reserved slot, to make sure there's a space to put it back when you press Q.
That's what I said. As long as the hand symbol is in the inventory it's like a link. When the hand symbol disappears it's truly taken out. And when that happens you can not always put stuff back.