Jump to content
Erik

Inventory overhaul

Recommended Posts

The inventory in VS is  very unfinished, so I got a small idea on how to expand it.

First, I'll introduce a new property for blocks and items: The type. Types are just categories for items and  blocks, a type can be attached to any item or block via json. Custom types can only added by code mods, using an IType interface. Some types can also require additional data in the json file to fully work. Possible types: Backfit (for backpacks and the like), Helmet, Chestplate, Tool, Weapon, Pouch, Ore, Ground, Flower, Food,...

Now, I'll introduce the item slot types:

  1. Normal slot: A absolutely normal slot, every item fits in.
  2. Filtered slots: These slots only fit items and blocks of a specific type. They render as a black slot with the type image in it. The type image is defined in the types code.
  3. Action slots: Action slots are type slots with the ability to utilize the item inside the slot. The handling of the item is described in the onEquip, onEquipped and onUnequip functions of the corresponding type (in the class that implemented IType), using properties defined in the items json file. Action slots look like filtered slots, but have a bar next to them and are surrounded by an inventory box.
  4. Custom slots: Can be added using mods to add special functionality to inventories, like the inventory of a furnace. They can be created by inheriting from the abstract CustomSlot class. Their appearance can also be defined using coding.

Technically speaking, all slots implement the IInventoryElement interface and all inherit form the CustomSlot class

An example for an action slot:

Backfit type action slot. Used for backpacks and barrels:

mAHEioe.png

When the player puts a backpack in the slot, the action slot "expands" and adds new slots to the inventory, some of them even being action slots:

qu4Y3ZO.png

When the backpack is pulled out of the action slot, it keeps the items stored inside the item, making swapping out backpacks easy. Armor is also using the action slots to be equipped.

Now that we have covered slots, we will quickly cover my vision for a moddable inventory system. An inventory is defined via json. The inventory has a size (width, height in % of screen). There are multiple elements that can be fit inside an inventory, notably slots, filtered slots, action slots, custom slots, other inventories and other inventory elements. There are three types of inventories: static, floating and custom inventories. Inside static inventories the elements are statically fit using coordinates in percentages of the inventory. Floating inventories have the elements inside positioning oneself by order, like floating in css. Floating inventories also have a scrollbar, when the elements inside would not fit the width and height of the inventory. Custom inventories are often dynamically inserted into inventories, using action slots. They can also be defined in json or generated by code, the coded approach being more common, like in the case of the backpack. Custom inventories are also either static or floating. An inventory that is not inside another inventory is the window object. Custom inventory elements, like progress bar or buttons can be defined by implementing the IInventoryElement interface.

The coding of inventory handling should be very reminiscent of Javascript DOM scripting, having to append objects, getting objects by class or id and so forth. Inventories in the survival mod should be stored in json files as mach as possible, to warrant maximum modding compatibility. I know there is some html/css like system in place for GUIs right now, but right now it isn't moddable, and I thought of this as one way to solve this. Implementing these changes would obviously be a massive, but worthwhile, undertaking, as it is basically a rewrite of most of the GUI system, things like shift-click behavior on items have to be entirely rewritten etc.

This was a very technical description of a easily moddable system, and while my "how to design it code-wise"-suggestions might not work so well, the basic premise of a floating player inventory with action slots is what should definitely be implemented somehow.

Edited by Erik
  • Like 1

Share this post


Link to post
Share on other sites

Love the idea, specific where it concerns to having specific type slots.
I have been asking for inventory expandable containers that are made to carry only specific items or blocks.
I.e. a straw basket for seeds and food items.
A wood container, like a chest or barrel for ores.

 

Share this post


Link to post
Share on other sites

I'm unclear what problem this proposal is solving.   And yes, I get you're trying to make the inventory 'moddable', but what problem is *that* solving?   What do we get from this system we can't get from the current?  Giving mods the ability to expand the inventory beyond the current max?

Share this post


Link to post
Share on other sites
15 minutes ago, redram said:

I'm unclear what problem this proposal is solving.   And yes, I get you're trying to make the inventory 'moddable', but what problem is *that* solving?   What do we get from this system we can't get from the current?  Giving mods the ability to expand the inventory beyond the current max?

The problem with the current system is the implementation on the four pouch slots: Other than carrying four backpacks being absurd, the player doesn't know, which item is stored inside which pouch. Having the pouches placed next to the quickbar is an odd design decision, as it ruins symmetry and has no real practical use, other than obstructing the players view. What the modding api currently lacks is the ability to create GUIs with inventory slots. The proposed system wouldn't only allow for easy creation of new GUIs, it would also allow for easy modification of existing GUIs.  For example: A mod that adds capes could simply add a new type and add an action slot of that type to the players inventory via coding or json patching. Multiple mods can add multiple things to the same GUI without compatibility issues.

Share this post


Link to post
Share on other sites
1 hour ago, Erik said:

The problem with the current system is the implementation on the four pouch slots: Other than carrying four backpacks being absurd, the player doesn't know, which item is stored inside which pouch. 

If you hover over the pouch, it'll show you a list of what's inside it

Share this post


Link to post
Share on other sites

As far as differentiating containers, I think each slot should impart a different color to the background of the inventory slots it applies to.  This would make it very simple to tell which container goes with which slots.   I do agree that having four backpacks is ridiculous, it should be just 1 backpack allowed imo.  But I have no problem with the four slots being where they are.  But these things don't require an overhaul to accomplish.   I guess I'm unclear what the 'action slots' are accomplishing as well.  Is it really entirely un-moddable now?  Even minecraft can have adjustments made to the inventory by mods...

Share this post


Link to post
Share on other sites
11 minutes ago, Balduranne said:

 If you hover over the pouch, it'll show you a list of what's inside it

Well, I guess I learned something new.

5 minutes ago, redram said:

As far as differentiating containers, I think each slot should impart a different color to the background of the inventory slots it applies to.  This would make it very simple to tell which container goes with which slots.   I do agree that having four backpacks is ridiculous, it should be just 1 backpack allowed imo.  But I have no problem with the four slots being where they are.  But these things don't require an overhaul to accomplish.   I guess I'm unclear what the 'action slots' are accomplishing as well.  Is it really entirely un-moddable now?  Even minecraft can have adjustments made to the inventory by mods...

The current system, as far as I know, is not moddable in any way, which really is a shame. Color coding would indeed be something nice. I thought of action slots, because I thought, the inventory system needed some standardization to be moddable. Action slots are an easy way for modders to expand the functionality of the inventory, like adding new types if armor. The moddability using action slots could be so easy, as modders could remove the option for multiple backpacks by just editing the json files. Implementing the system wouldn't be 'as hard', as the game already has some form of a html/css-like GUI system (It's only mentioned in one of the first news posts), it would "only" require some major refactoring.

Share this post


Link to post
Share on other sites

I cover my thoughts on this in a general VS remake thread. I'll copy over the stuff that pertains to this topic.

  • carryable containers can also be set on the ground. (allows for quick switching of inventories)
  • There can be category specific slots that prevent all items outside of the specific category from being equipped in that slot. (adds diversity)
  • The bag slots are all specific category slots with three pouch slots and one back slot. Some things require being carried on the back. (Adds an interesting mechanic)
  • Bags act like chests in that instead of one inventory, each opens in its own window. (helps with keeping things organized)
  • items no longer take up multiple slots in a container, i.e no stack limit. (helps with inventory management)
  • all items have volume. (used in bag mechanic)
  • Instead of a set number of slots for non-specific item slots, there is always a slot open and the number grows until maximum volume has been reached at which point stacks can no longer grow and no new items can be placed in the container. (Helps out early game and prevents loading up an entire basket with two seeds. Used to limit the types of materials instead of the number of materials.)
  • all items have weight. (used in bag mechanic)
  • All containers have a weight limit. (used to limit bags and provide upgraded alternatives that cost more)
  • all containers have durability. Durability decreases when a container is over its weight limit and moved. At zero durability the bag drops to the ground and can't be picked up until repaired. (right now only bag progression is in the number of slots. This adds progression in the form of a maximum amount of weight carried.)
  • As player weight increases past a certain point it starts to use energy. (Limits what the player can take where. Adds interesting gameplay where you may pick something up, climb a bit to the first rest point, etc. Adds a choice of carrying something heavy or fighting.)

energy, stamina(exhaustion) - doing work such as sprinting, swimming, jump, climbing, or using tools takes energy. When completely out of energy you can no longer perform activities that require energy. Requires saturation and a break from activities that cost energy. Wearing armor does not require energy but does increase the cost of all energy activities. (adds limits to the player for engaging gameplay, ties in with other systems)

weight - All items and blocks have weight. Carrying over X amount of weight will start to cost energy. The more over X weight the quicker you'll burn through your energy. (ties a bunch of systems together)

Comparing ideas it looks like we have similar ideas that tackle some of the same issues. Quick swapping containers and filtered slots seem to be tackled about the same way. Different takes on normal slots and separating inventories so you know what is in what. No mention of volume, weight, and durability in your post @Erik but I assume that's because you want to keep it simple. I know I'm going to be told at least once that bag durability is a bad idea and that people would rather be limited by slots and stacks than weight and volume.

Share this post


Link to post
Share on other sites
1 hour ago, Stroam said:
  • Bags act like chests in that instead of one inventory, each opens in its own window. (helps with keeping things organized)

Not a huge fan of this.  I think I'd prefer to see everything I'm carrying at once.

In your weight vs energy system Stroam, does the player ever get autmoatically immobilized by too much weight?  Or Beyond a certain point it drains energy so fast you effectively can only move 1 block or something?

Share this post


Link to post
Share on other sites
1 hour ago, Stroam said:

 Comparing ideas it looks like we have similar ideas that tackle some of the same issues. Quick swapping containers and filtered slots seem to be tackled about the same way. Different takes on normal slots and separating inventories so you know what is in what. No mention of volume, weight, and durability in your post @Erik but I assume that's because you want to keep it simple.

Well, this system would probably also work well with weight, but it's more of a framework for the gui than for gameplay. Introducing weight may be a good idea, because it helps to keep inventory management very simple, but it requires different controls for the gui and the quickbar would require to only be virtual, with no items actually being stored there. Only introduce weight or volume, as introducing both would make inventory management really difficult again.

1 hour ago, Stroam said:

I know I'm going to be told at least once that bag durability is a bad idea

Bag durability is a bad idea, only serves being tedious.

Share this post


Link to post
Share on other sites
1 hour ago, redram said:

Not a huge fan of this.  I think I'd prefer to see everything I'm carrying at once.

In your weight vs energy system Stroam, does the player ever get autmoatically immobilized by too much weight?  Or Beyond a certain point it drains energy so fast you effectively can only move 1 block or something?

Hitting e would open/close all your bags at once so no loss there.

Maybe another weight limit set at twice the first one will apply a slowness debuff that increases as the weight increases past that point. (Hey that would be an interesting ability. Increase targets experienced gravity to x2 potentially causing it to slow or stop). Though if something is not meant to be picked up it shouldn't have an item form.

43 minutes ago, Erik said:

Only introduce weight or volume, as introducing both would make inventory management really difficult again.

Because humans are innately already familiar with size and volume from irl, I don't think it will be that difficult. It's unlearning video game logic.

43 minutes ago, Erik said:

Bag durability is a bad idea, only serves being tedious.

I don't understand how bag durability is special and different than tool and item durability. If you find one tedious then all must be.

Edited by Stroam

Share this post


Link to post
Share on other sites
27 minutes ago, Stroam said:

Though if something is not meant to be picked up it shouldn't have an item form.

In order to be picked up, it first must be created and placed, unless it's naturally occurring but that's a very limited set of items.   Then the question would be, are any crafted items going to be heavy enough to not be moved? I would propose yes.  If so, then they have to have an item form.  Unless they are 'in-world' crafted in place, which is an option certainly, though of course the most code-costly option, in terms of having to make such a process for each item.

Share this post


Link to post
Share on other sites

If it's so large you can't pick it up then it needs to be handled differently than items. It could be broken down into individual items that are assembled in place. It could have a special mechanism for moving it like wooden cranes loading it onto a suitable transport mechanism such as a train or minecart. Could be a combination of things needing to be moved by mechanisms to be assembled in place. 
could also be manufactured on site with say a multiblock mold.

Edited by Stroam

Share this post


Link to post
Share on other sites
43 minutes ago, Stroam said:

Because humans are innately already familiar with size and volume from irl, I don't think it will be that difficult. It's unlearning video game logic.

I didn't mean the player wouldn't be able to understand the concept, I just think it would add a lot of tedium to the inventory management. Players would have to constantly move items around their inventory, to make everything fit although the idea behind the weight mechanic was to make inventory management less relevant.

48 minutes ago, Stroam said:

I don't understand how bag durability is special and different than tool and item durability. If you find one tedious then all must be.

Tools have durability is mainly implemented to slow the players progression, to keep him from cutting down whole forests and mining mountains. It also serves as a way to balance the amount of resources the player has, so the player has actually some reason go mine ores throughout the whole game. Replacing tools is also very easy, you even can carry multiple tools with you. I don't expect the player to carry multiple backpacks in your system. When your backpack breaks it  just drops to the ground? What happens to your items inside it? How can you repair it if you can't pick it up? I also imagine the breaking of a backpack taking a lot of the players time, as he is severely limited without one.

If I understand you correctly, there is a weight limit for containers, but it doesn't limit you from exceeding the limit, instead durability is used when the limit is exceeded. I would suggest  the weight limit to be limiting the items that you can carry, instead of having durability involved. That would also be easier for players to understand.

Share this post


Link to post
Share on other sites
14 minutes ago, Stroam said:

If it's so large you can't pick it up then it needs to be handled differently than items. It could be broken down into individual items that are assembled in place. It could have a special mechanism for moving it like wooden cranes loading it onto a suitable transport mechanism such as a train or minecart. Could be a combination of things needing to be moved by mechanisms to be assembled in place. 
could also be manufactured on site with say a multiblock mold.

Heh, I actually just made a separate post about block and tackles for moving heavy items.  Which I think is a good idea regardless of the inventory system used. 

Share this post


Link to post
Share on other sites
8 hours ago, Erik said:

When your backpack breaks it  just drops to the ground? What happens to your items inside it? How can you repair it if you can't pick it up?

Correct, drops where you were standing and can't pick up until it's repaired. Items stay inside. You apply a patch kit to the bag to give it back some durability back. Think outside the crafting grid like right click with the patch kit in hand. When an item would put a bag over the volume limit blocking the action and popping up a message saying there's no more room left should be sufficient. A warning each time an item is placed that puts it over weight should be fine. I would rather let the player have a choice even if it's a poor one than remove the possibility of making such a choice. Just as there's upgraded tools there can be reinforced bags for heavier loads. There's no reason you can't apply a patch before it breaks if you notice the durability getting low.

Share this post


Link to post
Share on other sites
On 6/22/2018 at 10:00 AM, redram said:

In order to be picked up, it first must be created and placed, unless it's naturally occurring but that's a very limited set of items.   Then the question would be, are any crafted items going to be heavy enough to not be moved? I would propose yes.  If so, then they have to have an item form.  Unless they are 'in-world' crafted in place, which is an option certainly, though of course the most code-costly option, in terms of having to make such a process for each item.

If we have the shape recognised by the game, and I think @Tyron was working or already has something like that, them once a block is created it does not need to go into the inventory ever. For example, the player places a stone block and uses a chisel to create the shape of a stone wheel to be used for the quern. Once it has the desired shape, the player hold shift right click to call the block create function. ( This is to avoid the situation of intermediary shapes, where the player is trying to create a simple chiselled block or another block altogether.)
The same process could be used for the creation of heavy wood blocks, like the Log Mortar, or a canoe,  (Using an Adze for sure ).

Share this post


Link to post
Share on other sites
21 hours ago, Stroam said:

Correct, drops where you were standing and can't pick up until it's repaired. Items stay inside. You apply a patch kit to the bag to give it back some durability back. Think outside the crafting grid like right click with the patch kit in hand. When an item would put a bag over the volume limit blocking the action and popping up a message saying there's no more room left should be sufficient. A warning each time an item is placed that puts it over weight should be fine. I would rather let the player have a choice even if it's a poor one than remove the possibility of making such a choice. Just as there's upgraded tools there can be reinforced bags for heavier loads. There's no reason you can't apply a patch before it breaks if you notice the durability getting low.

If the carryable containers were to have durability, I would only ask that they had a clear and very visible warning system to alert the player of how damaged it is and how soon it needs to be repaired.
I also would be in favour of leather items only be fixed in the player base, on a leatherworking table. 
As long as I am able to open my inventory and quickly see if any of my bahs or containers need fixing before I go out exploring or mining, I am OK with durability. I do not think we need a portable repair kit in this situation. 
Is the player responsibility to check all his equipment before going to venture into the wild world.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.