kotiq / wt-tools

War Thunder resource extraction tools
29 stars 3 forks source link

Unpacking Wrplu FIles #18

Open Yay5379 opened 1 year ago

Yay5379 commented 1 year ago

I looked through a wrplu file and found some information that might be helpful when attempting to pull more data from wrplu files. The main thing that I found is the sequence of bytes that comes before information regarding battle awards and kills. the sequence of bytes is x02/x58/x78/xF0/xStreak id no. (8-bit integer)/x00/x3E/xPlayer id no. (8-bit integer)/x00/x00/x00/xString Legnth (8-bit integer)/xSrting. I attached a zip file with a replay, wrplu file, and a text file that shows the player ids and their corresponding username. Relpay_Files.zip

Yay5379 commented 1 year ago

It also seems like there is still a large amount of blk data in the wrplu files regarding things like vehicle decorations decals that can be unpacked. It would be appreciated if someone could look into unpacking this data.

Yay5379 commented 1 year ago

Update: I was able to pull some data from the wrplu files using the blk unpacker but the process on how I did so is kind of hard to explain. I attached some of the data I pulled and I can go into more detail if necessary. I only extracted data from the vehicles I used in the replay because I knew that data was correct because I could compare the blk file to the vehicle in the hangar. wrplu_blks.zip

STR-T commented 1 year ago

I've found those timestamped sequences contain floats related to vehicle rotation and mouse free look/aim positions floats

Yay5379 commented 1 year ago

@STR-T This is what I found regarding blk data and units. Untitled drawing

STR-T commented 1 year ago

My current very rough understanding of those patterns. This is in a simple replay with one player, in a server replay those patterns are much longer and things like aim and position are repeated with the header 00 00 86 40 for every player.

Pattern

Also Trigger header (user missions): x02 x58 x28 xF0 Artillery strike header (contains position of strike in float32 and a timestamp): x03 x08 xA6 xF0

I'm just going to focus on the server replays now as they appear to be quite different from local replays and contain more interesting information

Yay5379 commented 1 year ago

A lot of the stuff in the server replays is just mission info that can be found in other locations of the game's files if you unpack them. There may be some other things that they have that you can't see at a glance but overall I found more interesting things in the local replays like chat message logs. If you know what mission a replay was from you can find all of the info that would be in the server replay folder in the mis.vromfs.bin file.

STR-T commented 12 months ago

Believe it or not, Dagor just went open source. https://github.com/GaijinEntertainment/DagorEngine/

prandleman commented 10 months ago

There is also this but I couldn't even tell you what it is or if it would be useful for local replay files https://github.com/MoleSchizo/WarThunder-Data

obama commented 9 months ago

Believe it or not, Dagor just went open source. https://github.com/GaijinEntertainment/DagorEngine/

hi, is there already a cool replay parser made with help from the source files? or some general overview of WT tools?

Yay5379 commented 9 months ago

@obama not that I'm currently aware of. I'll try to look for one on the internet but I doubt there is anything and if there is it might be in Russian.

Yay5379 commented 7 months ago

@STR-T I made a replay parser that was based off of nilshellerhoff/warthunder-replay-parser. It is very basic and made with some high quality spaghetti code. It is currently optimized for client replays but you can still input server replay files 1 by 1 even though it would be a pain. https://github.com/Yay5379/warthunder-replay-parser/blob/main/parse_datablocks.py

TaLajans commented 6 months ago

I'm just going to focus on the server replays now as they appear to be quite different from local replays and contain more interesting information

Hey @STR-T! Have you made any breakthroughs in parsing the server reply files?