Persistent data solutions

This is not something that is as readily available as you might have wanted. If this is not a persistent game, you can easily write a file to disk containing information about the player or even using a flatfile database like SQLite.

If you want persistence then you will want to create a backend server that can game servers can connect to and update stats or inventories (or whatever else) in a centralised database of some kind. That’s the hard part, getting your game to upload stuff about a player at intervals and/or when they leave is the easy part.