I’m making a pet/item system and giving each of them a GUID (api / basically a unique ID) when created to try and easily counter duplication. However, how would I actually check if the GUID is already in use?
The only thing I’ve really thought of trying was saving a table of GUID’s that are in use and looping through them, but that wouldn’t really work for many reasons (constantly sending saving requests, potentially having billions to loop through each time… etc)
The way I’m saving inventories is like this:
Data store
[player id] = {
[GUID] = {}-- random item info like type, name, level...
}
If anyone has an idea on how to do this or maybe how to save the inventories better I would appreciate a reply!