Skip to content

Record and Play Replays

The host records every match it plays through the network layer. You do not turn recording on. This guide shows where the file goes, how to play it, how to seek, and how to build a small replay screen.

A replay stores commands, not video. Playback runs the real simulation again, so it only plays on the same build, settings and map it was recorded on. Read Saves and Replays for the format and the rules.

In Project Settings > Plugins > SeinARTS, category Network / Replay:

Setting Default Effect
Checkpoint Interval (turns) 3000 Turns between state checkpoints. 3000 turns is five minutes at the default turn rate. A smaller number makes seeking faster and the file larger.
Maximum File Size (MiB) 16384 Recording stops before a file passes this size.

Both affect only the file on the host’s disk. They do not change the match, and players do not need to agree on them.

Host a match the usual way: the lobby’s Host flow, a listen server, or a dedicated server. Hosting a match against the computer counts. A map you start directly with Play in a standalone game is not recorded.

On the host, type Sein.Net.Status in the console. The line Recording=1 confirms a recording is open.

The file is written as Replay_<date>_<time>.seinreplay.tmp in the game’s Saved/Replays folder, and renamed when it is finished. It finishes when the match ends, when it aborts, or when you run Sein.Net.SaveReplay on the host. After Sein.Net.SaveReplay the recording stops for the rest of that match. The log line Replay: saved N turn(s) to ... gives the path.

A client does not record. Copy the file from the host.

Playback runs in a standalone game, with no network session, on the map the replay was recorded on.

  1. Open the recorded map in a standalone game: Play > Standalone Game, or run the packaged game and open the map.
  2. Open the console and run:
Sein.Net.LoadReplay Replay_20261101_142530

The name is a file in Saved/Replays, with or without .seinreplay, or a full path. An optional second number is the turn to start from: Sein.Net.LoadReplay Replay_20261101_142530 600. The replay starts from the nearest checkpoint at or before that turn and runs forward to it.

Local input never reaches a replay. The simulation runs the recorded commands.

To seek to a turn, run Sein.Net.SeekReplay 4500. One turn is one over the Turn Rate seconds, so turn 4500 is 450 seconds in at the defaults. The replay jumps to the nearest earlier checkpoint and runs forward as fast as it can, up to Max Ticks Per Frame ticks per rendered frame. To stop, run Sein.Net.StopReplay. The world keeps the state it reached.

There are no replay nodes in the Blueprint library, so a screen sends the console commands:

  1. Create a widget with an Editable Text ReplayName, a Play button, a Spin Box TurnBox, a Seek button and a Stop button.
  2. Play: Execute Console Command with the command text Sein.Net.LoadReplay followed by the text of ReplayName (use Append).
  3. Seek: Execute Console Command with Sein.Net.SeekReplay followed by the Spin Box value converted to an integer.
  4. Stop: Execute Console Command Sein.Net.StopReplay.

Replay file names have no spaces, so the console splits the arguments correctly. A Play button needs the right map open first: save the map name beside each replay in your own Save Game object when the match ends, and open that map before running LoadReplay.

A Shipping build has no console to type in, and Execute Console Command there depends on whether the target keeps exec commands (bUseExecCommandsInShipping). Test the screen in a Shipping package before you depend on it. If it does nothing, use the C++ route.

The same operations exist on the net subsystem:

#include "Engine/GameInstance.h"
#include "Engine/World.h"
#include "HAL/FileManager.h"
#include "SeinNetSubsystem.h"
#include "SeinReplay.h"
void UMyReplayLibrary::ListReplays(TArray<FString>& OutFiles)
{
IFileManager::Get().FindFiles(OutFiles, *(SeinReplay::GetDirectory() / TEXT("*.seinreplay")), true, false);
}
bool UMyReplayLibrary::Play(UWorld& World, const FString& Name, int32 StartTurn)
{
USeinNetSubsystem* Net = World.GetGameInstance()->GetSubsystem<USeinNetSubsystem>();
FString Error;
if (!Net || !Net->PlayReplay(World, Name, StartTurn, Error))
{
UE_LOG(LogTemp, Warning, TEXT("Replay: %s"), *Error);
return false;
}
return true;
}

Seek with Net->SeekReplay(Turn, Error), stop with Net->StopReplay(), and ask Net->IsPlayingReplay(). Add SeinARTSNet to your module’s dependencies.

A replay of the host’s own match, played on the host’s own build, should reproduce every recorded checksum. Play one to the end and stop it. The log reports:

Replay stopped (N checksum(s) matched, 0 differed).

A non-zero second number means the simulation read something that is not in its state or commands. The log also names the turn: Replay checksum differs from the recording at turn N. This finds nondeterminism with no second machine. A match that aborted on a desync still saves its recording, so you can replay the host’s side of it. See Debug a Desync.

  1. Host a match against the computer, play two minutes and concede.
  2. Check Saved/Replays for the new file.
  3. Run a standalone game on the same map, and Sein.Net.LoadReplay with the name. The match plays back.
  4. Run Sein.Net.SeekReplay with a turn about halfway. The replay jumps, and units stand where they stood then.
  5. Run Sein.Net.StopReplay after the end and read the matched count in the log.
Message or symptom Cause
“Replays play in a standalone world outside a network match.” You are in a network session. Leave the lobby and open the map as a standalone game.
“Could not read …” The name is wrong, or the file is on another machine. Copy it into Saved/Replays.
“is not a replay of this version” The file is from an older framework container version, or is not a replay.
“made by build …, this is …” The game was rebuilt since the recording, or its simulation content or settings changed. Replays play only on the build that made them.
“made on map …, this is …” Open the recorded map first.
“has no info or no checkpoint”, “is truncated” The file is damaged, or is a .tmp from a recording still in progress or a crash.
No file after the match The host log says “This match is not recorded: …” with the reason, or the match was not hosted through the network layer.
The replay stops partway The recording reached Maximum File Size (“reached the maximum file size; recording stops”) and kept only the part before it.
“Replay checksum differs from the recording” The simulation is not reproducible. See Debug a Desync.
Sein.Net.LoadReplay prints its usage It needs a file name. The optional start turn must be a whole number.