vpk icon indicating copy to clipboard operation
vpk copied to clipboard

VPK v2 Support?

Open 0xFurtiv opened this issue 3 years ago • 5 comments

On developer.valvesoftware.com, this project is listed as supporting VPK v1 and v2. Is there support for writing VPK v2 archives? If not, is there a plan to support it?

0xFurtiv avatar Jun 14 '21 23:06 0xFurtiv

Yes, you can open v1 and v2. The creation of VPK files was only added later and is only for v1, single file.

Ideally, it would be best to rewrite the library and combine the reading and writing into a single class, but I have no plans to do that any time soon

rossengeorgiev avatar Jun 15 '21 07:06 rossengeorgiev

v1.4.0 now creates VPK v2 files by default. Chunking is still not supported, and would be best achieved by a full rewrite

rossengeorgiev avatar Dec 25 '21 18:12 rossengeorgiev

Dear Rossen, Would it be possible to add an option parameter to the CLI app to chose whether to export to v1 or v2 (e.g. -v1 or -v2)? I actually need to create v1 VPKs, but I don't see a way to do it with the current version. Thanks for your consideration!

jgg1971 avatar May 07 '22 08:05 jgg1971

@jgg1971 there already is -cv, see https://github.com/ValvePython/vpk/blob/3ff641e5fa7cf53a12c886153db0aab7a7872821/vpk/cli.py#L32

rossengeorgiev avatar May 07 '22 11:05 rossengeorgiev

OK, sorry, I didn't look at the source code. This option is not shown in the readme, so I didn't think it was implemented. Thanks for the quick answer and good work!

jgg1971 avatar May 07 '22 13:05 jgg1971