So I’m currently working on an RPG game with lots of randomized dungeon spawning and also lots of different items. The main problem I’m having is creating the Inventory System/UI. There are many different ways to collect/be rewarded items in the game, and I wanted to know what would be the best way to create it so that exploiters cannot just give themselves any item they want.
What I have in mind
My original plan was to give every time of item collecting method its own local script and each item its own unique 4-digit ID Code (0000-9999).
When the player is to receive an item, the script will Invoke a Bindable Function, sending the ID of the item to be given as an argument.
Then a Script containing all of the items in an organized dictionary will be sent to a Local Script that controls the Inventory GUI and Datastore on Invoke. The LocalScript will also activate on Invoke but wait to receive the item dictionary.
Once the item dictionary is received, the LocalScript would sort through the ID’s, looking for the an ID that matches the one received on Invoke, and the matching ID will contain the item’s traits and be saved to a “PlayersItems” table and also the Inventory Datastore
Problems I’m Having
- I have not yet created the system, because I don’t want to go through it all and it still be unsecure, so would the provided method above work?
- Is this a sufficient way to create the inventory system? Can I change anything to make it more organized?
- How can I further secure it to prevent exploiters from cheating the system?
- Is there any way I can make the system more compact, without losing effectiveness?
I’m sorry I could not provide pictures as examples, I did the best I could to explain. If there are questions, I can edit the post to further provide detail.