Exporting Replays in text-format

I currently have a replay system in my game and alongside saving local replays into demo files, I also want to provide an option for users to export the demo into a text-formatted (human readable) file so that the community can work with the files in any shape or form. The file would export all the events that occur during gameplay replay.

How would I go about doing this? Is it possible to also provide an API for users to do this externally?

I’ve noticed it’s a really old post only after writing my solution, but it’s still unanswered so here goes :slight_smile:

I have created a simple logging logging function to record time, type of log and additional data (basically a string) using [this][1] JSON plugin (Only using its “Write String To File” function though, so if you have an alternative to saving files it wont matter)

In my case it’s set to get and stamp the time since begin play but you can set it to stamp the local time too.
once you have this function, just use it whenever you wish to log an action.

The attached example prompts this log:

<0:0:13:374><PMT> {"amnt1":0,"amnt2":200}

270254-log.png