Battle of Europe .wpk files

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
Puterboy1
Posts: 382
Joined: Wed Sep 12, 2018 2:22 am

Battle of Europe .wpk files

Post by Puterboy1 »

I was wondering if you could open these with a BMS script since Game Extractor doesn't seem to produce cohesive results.
akintos
Posts: 88
Joined: Tue May 08, 2018 7:48 pm

Re: Battle of Europe .wpk files

Post by akintos »

Code: Select all

get FILECOUNT long
get TABLEOFFSET long

idstring "Whirlwind"

goto TABLEOFFSET

for i = 0 < FILECOUNT
   get FILENO long
   get FILEOFFSET[FILENO] long
   get FILESIZE[FILENO] long
   get UNK1 long
   get UNK2 long
next i

math FILENO = 0 # FILENO 0 is for name table
goto FILEOFFSET[FILENO]

math FILECOUNT - 1

for i = 0 < FILECOUNT
   get FILENO long
   get FILENAME string
   log FILENAME FILEOFFSET[FILENO] FILESIZE[FILENO]
   padding 4
next i


only tested with data0000.wpk file. try this script with bigger files.
I'm still learning bms(my main language is python) so if anyone find bad code, please let me know.
Puterboy1
Posts: 382
Joined: Wed Sep 12, 2018 2:22 am

Re: Battle of Europe .wpk files

Post by Puterboy1 »

akintos wrote:

Code: Select all

get FILECOUNT long
get TABLEOFFSET long

idstring "Whirlwind"

goto TABLEOFFSET

for i = 0 < FILECOUNT
   get FILENO long
   get FILEOFFSET[FILENO] long
   get FILESIZE[FILENO] long
   get UNK1 long
   get UNK2 long
next i

math FILENO = 0 # FILENO 0 is for name table
goto FILEOFFSET[FILENO]

math FILECOUNT - 1

for i = 0 < FILECOUNT
   get FILENO long
   get FILENAME string
   log FILENAME FILEOFFSET[FILENO] FILESIZE[FILENO]
   padding 4
next i


only tested with data0000.wpk file. try this script with bigger files.
I'm still learning bms(my main language is python) so if anyone find bad code, please let me know.

Thank you, it works.
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battle of Europe .wpk files

Post by aluigi »

@akintos
Very good solution for handling this format.
Well done.
LotharVon771
Posts: 1
Joined: Thu Jul 23, 2020 10:25 am

Re: Battle of Europe .wpk files

Post by LotharVon771 »

i'm kinda late in here, but is there any way to pack it again to .wpk?
aluigi
Site Admin
Posts: 12984
Joined: Wed Jul 30, 2014 9:32 pm

Re: Battle of Europe .wpk files

Post by aluigi »

In theory reimport2.bat should be able to reinjected the edited files back in the original archive.