Replay Files Documentation - EpicKitten/PUBG-Resources GitHub Wiki
Creation of Replay Files
PlayerUnknown’s Battlegrounds otherwise known as “PUBG” uses Unreal Engine 4 otherwise known as “UE4” as the game’s engine. UE4 has an pre built-in Replay System that PUBG uses.
Simplifying heavily from the Unreal Engine Documentation on the Replay System, Replay files are created by capturing the traffic between the player and the server and saves it for later viewing. Currently this includes to our knowledge: All information you see in-game (Health, the kill log, etc) Care Package contents Other players health, death location, etc
UE4 records the replays in three different ways, The NULL Streamer, The Memory Streamer, and the HTTP streamer. The NULL and Memory streamers that we know are in PUBG, the NULL streamer records the replays directly to the disk while the Memory streamer is used for the death cam.
Replays will not be created until the player is moved into the plane at the start of the match.
Storage of Replay Files
PUBG Replay files are stored at %localappdata%\TslGame\Saved\Demos and are stored in folders following this format:
PUBG Replay files are stored in this file structure:
Replay Files - PUBG.replayinfo
The PUBG.replayinfo file contains basic information about the match, the replay recorder (the person that the replay came from), the replay’s clip status, and the replay itself.
The file contains these values:
LengthInMS - The length of the replay in milliseconds
NetworkVerison - The version of netcode used when the replay was created
FriendlyName - A string array separated by periods. It contains:
-
MatchType - either official or custom
-
UpdateTypeOrHoster - either the update type (2018-01, 2018-02) or the custom game hoster’s PUBG name
-
Region - The region the replay was played in (na, as, etc)
-
Mode - The mode played in the replay file but isn’t the same, it also tells PUBG if the custom game was normal or zombie, this should be used over there other Mode in this file because of its more accurate data
-
Year - the year the replay was recorded
-
Month - the month the replay was recorded
-
Day - the day the replay was recorded
UUID - Used to look up the match on the API, the last 5 characters are the Server ID it was played on.
DemoFileLastOffset - The size of the replay in bytes
Changelist - Always 0, UE4 has it commented as “Engine changelist built from”
SizeInBytes - Always 0, No UE4 value for it, meaning it was added by PUBG
Timestamp - The unix time value of when the replay was recorded
bIsLive - Always false, UE4 does have a IsLive function that’s called when watching the replay but the value in PUBG.replayinfo doesn't change
bIncomplete - Always false, also created by PUBG, No UE4 information
bIsServerRecording - Always false, created by PUBG, No UE4 information, I assume replays are also kept server-side
bShouldKeep - If the replay is locked or not, if it is, PUBG won’t auto delete it when creating new replays
Mode - The mode played in the replay file. The mode’s are:
- solo
- solo-ffp
- duo
- duo-ffp
- squad
- squad-ffp
- custom (squad is used regardless if it was 1, 2, or 3-Man Squad)
RecordUserId - Recording user’s Steam64ID in MD5 hash
RecordUserNickName - Recording user’s PUBG name
MapName - The map the replay was recorded on
bAllDeadOrWin - Unknown usage, always true unless the game crashes... sometimes
(Added 2/22/2018) bIsClip - only used in zipped clipped replays
(Added 2/22/2018) ClipTime - how long the clip is? (Should always be 1 min)
(Added 2/22/2018) ClipStartTime - The time the clip starts
(Added 2/22/2018) ClipEndTime - The time the clip ends
(Added 2/22/2018) ClipTargetUserId - The SteamID64 of the person being reported
(Added 2/22/2018) ClipTargetNickName - The PUBG name of the person being reported
(Added 2/22/2018) ReportToken - A Base64 encoded JWT