Keeping Track of World Events

Hello all,

I would like to implement a system that keeps track of every actor’s actions, positions, etc on each playthrough so that I can play them back later. For example, the player plays as one character. The player plays through that level and interacts with the world but once the player beats that level, they play through it again as a different character and their previous character is doing everything they did on the first playthrough. Any ideas?

Thank you,