It should be easy to program.

If you rearrange your base, and then go do a battle replay, then you will see that the replay will use your previous base. It gets stored for the purpose of replay,...