The bot currently keeps a journal of state modifications so it can retrace its steps. As part of syncing the game state to the manually run version available on the spreadsheet, there are some modifications that should be applied at a specific timestamp to the game history, to get the numbers back in sync with where they should be. A decent way to do this is to append these modifications to the journal directly, and then replay the journal chronologically to get the state to where it should be.
Currently the journal is an append-only NDJson log that has all the modification commands:
This can either be done as an admin operation behind the scenes (with a supplementary script that uses the game files) or added to the bot as a command (maybe admin-only?).
The bot currently keeps a journal of state modifications so it can retrace its steps. As part of syncing the game state to the manually run version available on the spreadsheet, there are some modifications that should be applied at a specific timestamp to the game history, to get the numbers back in sync with where they should be. A decent way to do this is to append these modifications to the journal directly, and then replay the journal chronologically to get the state to where it should be.
Currently the journal is an append-only NDJson log that has all the modification commands:
Replaying the log would look roughly like:
This can either be done as an admin operation behind the scenes (with a supplementary script that uses the game files) or added to the bot as a command (maybe admin-only?).