Skip to content

add pk3dir and dpkdir support

Thomas Debesse requested to merge illwieckz/netradiant:dpkdir into master

Hi, this is code adding support for both legacy pk3dir vfs and dependency based vfs from Dæmon.

That's an old code written by neumond but they were many if game is unvanquished tests hardcoded to handle all the specificities of the Dæmon's dependency based file-system.

The best way to fix these ugly hardcoded tests was to admit the Dæmon VFS is just another format, dpk is the suggested file extension, see this thread on Unvanquished's forum and this pull request on Dæmon's side. Using the dpk extension helped to fix some Dæmon issues in legacy pk3 management, which is welcomed for Xonotic, it means a future Dæmon based Xonotic will be able to fully benefit from Dæmon dependency based file-system for official package, while keeping legacy pk3 support for legacy maps. It means a Dæmon based game with legacy pk3 support is ensured to always load its owns dpk over third-party legacy pk3.

So, this PR adds pk3dir support for legacy games, and dpkdir support for Dæmon based games. the radiant code already supports version handling, the q3map2 currently loads dpk/dpkdir the same way it already loads legacy pk3/pk3dir.

A Dæmon based game needing legacy pk3 support can defines it supports both dpk and pk3 writing archivetypes="dpk pk3" line in radiant .game file.

Merge request reports