Need help with multiplayer variables

Hello, I have couple of questions regarding storing variables in multiplayer. I have 2 years of experience in Unreal Engine 5 and after a couple of finished single-player games, I decided to tackle bigger fish (Multiplayer). So here is a couple of my questions:

  • Where should I store variables that represent my character’s Level, currencies (Like coins + premium currencies as well!), and where do I store if the player unlocked a weapon in the shop which would be located in the main menu? So when the player connects or creates a session these variables stay saved and transfer to levels and other sessions.

  • I read multiple forums where people have been mentioning saving this kind of variables to .json or mySql but I am doing my whole game in blueprints and I’m not quite sure how could I store it.

I would guess that storing player levels, XP, and currencies inside of the player state or character BP would be kind of bad as it would be very easy for hackers to play with it… As I said this questions might be a little bit stupid since I am not experienced with multiplayer.

Thank you in advance.

Playerstate is good because its replicated. manage all your variables server side so they cant cheat.

saving and loading is tricker though, you’d need a server side database otherwise yes they could cheat

Thanks for quick reply @Auran131. Do you have any good source of information about saving and loading it in the multiplayer using server database or if you can give me couple of examples how could I do it ?

what type of game are you making? if its a simple game the host can just save and load using the regular system.