I have a 2D tile based RPG for which I'm developing save game function. In particular, I'm trying to save this structure:
A caster can have multiple buffs that he maintains. Each buff can have multiple effects applied to players or monsters. The pattern has links both ways (caster has buff, buff knows who cast it)
If I serialize caster, buffs and effects, how can i restore the relationship: caster - buff - effect - target?
Would I need to implement something like unique identifiers for monster, buffs and players and then link them all together once the save game is loaded?