Hello Reader,
So, I have been trying to figure out for a long time how to set up just a basic Inventory system that I can use for all of my future projects. Tutorial after tutorial, I have watched, and I have learned a lot from them. The only thing that appears to be consistent between them is that they all have, for the most part, the same functions. i.e. “AddItem”, “RemoveItem”, “FindSlot” and so on. However they are all built slightly different, with the different structs info, per tutorial.
That being said, this is what I am trying to build. I have already done most of the leg work for my UI Layout to include the Inventory Window and Inventory Slot widgets, along with a few additional ones that I will need for my system.
Want to include:
-WorldItem / PickupItem
-Inventory to be Attachable to: Player or Backpack or Container(Like a chest or something)
(For Example, I may want one project where the player just has an inventory. Or another project I may want the inventory to be tied to a Backpack, where the contents follow the backpack rather than the player. I Figure this would be done using an Actor Component)
-Drag Item From Inventory to World or Container
-Should use a DataTable with my ItemStruct.
-An Editor Function I have been trying to figure out on my own, but have since failed. For my Row Names, I am using a numerical ID system, as I plan on have a pretty large index. So I am trying to Get the RowName from the Table and using the ItemName via a Lookup. so that when I place the Pickup in the world, I can type the Item name, vs the Row Name(ItemID). (If this isn’t Possible, then I suppose I could take an alternative route where I just Add yet another Variable for the ItemID)
-My Pickup I want as a look at, rather than stand-on or Radius. However I was having a hard time trying to figure out how to use the “isValid” output and always returned as NotValid (Im sure part of this problem is that I was following a tutorial using a radius check to get the actors, while I modified it to use a Line Trace and HitActor): Part #1 - @24:00
-And of course I need it to be replicated for Multiplayer.
I will also need to be able to implement an ActionBar/HotBar, Equipment Window, and Crafting. But I haven’t got that far to begin trying to build those. Attached is the UI I put together for my Inventory.
Bottom Line, I want to make the system myself, however I need some help / guidance figuring out what Arrays I need/should to use for the inventory contents and how to use the Item data for my items and in it’s most basic form, how the different functions should be built, so that I can expand on them.