Let's talk: Custom Inventory?

Hi -

I’m here to generate some ideas and methods of operating my custom inventory.



How does this work?

Currently, my Custom Inventory is a BilboardGui that is Parented to the PlayerGui - The adornee is then set to the Player’s HumanoidRootPart and the Camera is adjusted accordingly as seen above.

What I’m trying to do?

The inventory system works by checking which Values are present within the PlayerData’s folder - As this is the point of DataStore within my system.
image
I’m trying to find methods of Equipping and Saving the equipped tool for when the Player rejoins a Server.

I’ve been practising with updating the InventoryGui to represent what is available within the Player’s folders. This works fine. However, I’m struggling with figuring Methods of how to Equip and save as mentioned earlier.

Concepts

  • Copy the required Tool Edition of the Equipped Tool & Place into Backpack. Once done, fire the Humanoid:Equip() function // This will happen upon each Update of Equipped Value and / or when the Player joins a server and their Character is loaded.
  • Convert the Tools into Script formats that mimic a Tool [ Similar to Dungeon Quest ].

This thread will be updated as progress persists!

Thank you,
signature

2 Likes

Seems interesting, I like the system. Each item may have a button that represents it in the Inventory. Which means if that button is pressed, you can equip the tool that the button represents. For the data part, here’s where the hard comes. You can make a function that converts the tool into a table that contains each information about it, its name, (damage?), value, you name it. When loading, another function loads the information received and converts it into a physical object. You can always check if the data is legit or not so the system doesn’t create an item off the grid.

1 Like

That sort of DS isn’t much of an issue with the API I use as It’s capable of saving anything.
image
I could have the Sword like this and all the relevant Data is loaded into the Sword once equipped. However, I’m struggling with the concept of Equipping the tools themselves. As the tools aren’t registered to the Hotbar - The aim is to equip them solely through the UI.

Perhaps each time Equip() is called on an Inventory item, the corresponding is :Clone() into the Players Backpack and then equipped? - This tool’s name is then added to the “Equipped” value for when the Player rejoins.

But then this brings about the issue of multiple versions of the same item. If the Player has 2 swords with different Stats but the same make - Saving the name of it would confuse the system and possibly load the wrong sword. (( BUUUUTTT - I could add an ID value to each item? So that when it is equipped, it’ll search for the corresponding names & IDs? ))

Looks like a good start! I like how you organized it in folders to keep it organized but tbh it would be a better option to store inventory in a table. I would recommend creating multi dimensional arrays for your slots and data storing them because it’s a lot more efficient and there is no need to create unnecessary instances. Good luck!

1 Like

UPDATE 1.0

Nothing too flashy right now.
But modified the Gui to add abit of a shadow-y tinge.

Also added a custom scrolling system! :smiley:



UPDATE 1.1

Added icons, done more coding to the functions.

2 Likes

I like the updates you added, you are a great UI designer!

I could add an ID value to each item? So that when it is equipped, it’ll search for the corresponding names & IDs?

No, that would be more complicated and makes it harder for you.

Saving the name of it would confuse the system and possibly load the wrong sword

Even if the Swords’ names are identical, I believe that doesn’t change anything. The script will basically get the Player’s data, in our case, the data found has two tables in the Inventory table. The first data is a script that is identical to the second data. The script will read the data, convert it to a tool, replicate the given data, (Icon? Name? Damage? Value?), then parent it into the Player’s inventory folder. The inventory folder will detect two new tools, instances two buttons and that’s it.

1 Like

Thank you! This is actually the first I’ve designed.

Ah yes, I see your point.
So even though they share identical stats - it won’t matter as the Stats are sent over to the sword / staff / etc.

1 Like

What I mean is even if they are the same somehow, they are still two different tables. I believe the way inventories work better is as every item is a table full of data. The inventory is a big table that contains many more tables.