I need some help on a strategy for level transitions and persisting character data in an rpg setting. I have a set of data that belongs to a character such as health, xp, inventory etc. I want this data to persist across level loads and be able to ‘attach’ it somehow to whatever pawn/controller combo I want to represent this character.
Imagine a scenario that involves an npc named Billy. Billy shows up in two areas, you first meet him in the town square then you meet him later inside a shop. I expect to place Billy in the town square map and as well in the shop map. These would be completely different Character Pawns and AI Controllers but they would share some persistent data that would allow them to represent ‘Billy’ in the game. I would expect if I gave Billy some gold in the town square, that he would have the gold when I meet him later in the shop.
I’m looking for the place in UE4 where I can serialize this group of persistent data from an AICharacter then give it to another one at a later time, as well as being able to serialize all the data to implement a Save and Load game during level play.