Closed MikeGamerGuy closed 3 years ago
Breaking this down for those who may not be familiar with Factorio (myself included) to better understand...
Assuming that the user currently has the below hotbar, with a full inventory (aside from empty slots on hotbar):
Hotbar | Slot 1 | Slot 2 | Slot 3 | Slot 4 |
---|---|---|---|---|
Configuration | (reserved) Spear | (open) Any Item | (reserved) Shield | (open) Any Item |
Equipped | Spear | None | None | Torch |
The user then walks over a 2 Hammers to collect them. A single hammer would then populate Slot 2. The second hammer would not be able to be picked up, as Slot 3 is reserved for shields only.
Hotbar | Slot 1 | Slot 2 | Slot 3 | Slot 4 |
---|---|---|---|---|
Configuration | (reserved) Spear | (open) Any Item | (reserved) Shield | (open) Any Item |
Equipped | Spear | Hammer | None | Torch |
If the user were to later walk over a shield to collect it. The shield would auto populate in slot 3. Anytime that a shield is picked up, it tries to assign itself to slot 3. | Hotbar | Slot 1 | Slot 2 | Slot 3 | Slot 4 |
---|---|---|---|---|---|
Configuration | (reserved) Spear | (open) Any Item | (reserved) Shield | (open) Any Item | |
Equipped | Spear | Hammer | Shield | Torch |
Yes. That's the idea. You've covered all the examples that are critical. In table three, if we imagine that more "Open" and empty inventory slots existed, the first "Banded Shield", would go into the slot three reservation for "Banded Shield". Other banded shields and other items would populate open and empty inventory slots as normal. You could potentially vaguely define categories of item so that it would accept any item of that category, like Shields, Spears, Food, or Food-Meat, but i don't know if that effort would be worth it. If it's not necessary in Factorio, a game that's literally about logistics, efficiency, organizing and manufacturing absurd quantities of materials. I can't imagine it being necessary here.
We you seem to understand perfectly, but I'm gonna get long-winded now because it's the internet and can be easy to miscommunicate, and also just I'm long winded.
The way the interface works in Factorio is as follows. If you always want a spot reserved for "Rocket Fuel" or "Uranium Rounds Magazine" you can simply put the item in that slot and Middle Click it, or you can Middle Click a blank slot and select the item's icon from what is essentially the game's crafting menu. Either way a faded ghost icon of that item is put in that spot which indicates that it is reserved. You Middle Click the reserved spot again to remove the reservation. While reserved, nothing can go there but the reserved item. So if you have Ancient Bark Spear reserved ("filtered" in Factorio) for Slot 1, only an Ancient Bark Spear can go there. You could assign Turnip Soup, Serpent Stew, and Fish Wraps to Row 4, Column 6, 7, and 8 respectively. That way you always know you are going to have those foods in the exact same spot every time they are in your inventory. Or if you never want to be without stone and wood you reserve slots for stone and wood. Farming for Thistle? Reserve a slot or two for it. Any extras populate inventory as normal. All this is done by using a single hotkey on an inventory slot. You can even go so far as to set caps on how many of that item you want to pick up, though Factorio only does that for logistics robot deliveries which is a whole other thing, but I could see it being useful in Valheim as weight is a concern. In Factorio you can carry stacks of locomotives in your pocket. As far as user friendly features and interface, I think Factorio is probably one of the best at it that I've ever seen. There are a ton of good ideas for QOL regarding all kinds of things in that game.
TLDR: I think you've nailed what I'm talking about but if you need a video to clarify anything, it shouldn't take long to demostrate in Factorio.
Makes sense, especially with the follow-up posts.
This would be an amazing quality of life change for the game (in my opinion).
As for 'Banded Shield' vs 'Shield', I haven't done any development here yet, so I too am unsure of implementation details. One example I have seen of these broader item 'type' classifications is in the current ItemDrop.cs source. Could be an inspiration for someone.
switch (__instance.m_shared.m_itemType)
...
case ItemDrop.ItemData.ItemType.TwoHandedWeapon:
...
case ItemDrop.ItemData.ItemType.Shield:
I'm a spear user and when I throw my spear and run over it, I usually end up with it right back in my hand. However that doesn't happen if my inventory is full and something is pulled into my inventory first. I would like to be able to set an inventory slot to be reserved for a particular item similar to how Factorio allows you to do the same. In this way nothing would end up in my spear slot and I would have my spear right back in my hand every time. This could also be useful for standardizing the way a person chooses to sort their inventories.
Thanks for all your work! I really appreciate what you guys do.