Helllo i have been working on a small rpg game that has multiplayer, and im seeking advice on where to store certain stats, from what i understand i should be storing these in a player state blueprint, and that’s where im currently storing the players Strength, Defense, Speed, Health, Money, level, Exp, And how much EXP is need for level and a few others and want to make sure that’s where they should go, i also am woundering if this is where i should create my players damage based on current strength and sword damage stat, and is it safe to handle these stats here to help prevent hacking. just wanna get this straight before i go anyfurther
player state should contain public information about player, the stats that effects game play code should be stored safely in non-replicated PlayerController, so keep copy in stats. If you don’t want duplication you could also try to configure replication in the way that it ignores data coming from clients to change those variables.
so if i am understanding correctly, i want to put the character Level, Strength, Defense, Money, health, damage in the player controller and stuff like . kills, copy of character level, in player state?
Yes if oyu don’t want to shere that information to the other players, PlayerController is best place for those