View Issue Details

IDProjectCategoryView StatusLast Update
0006528The Dark ModFeature proposalpublic28.04.2024 07:28
ReporterFrost_Salamander Assigned To 
PrioritynormalSeveritynormalReproducibilityN/A
Status newResolutionopen 
PlatformPCOSWindowsOS Version11
Product VersionTDM 2.12 
Summary0006528: Feature request: Support for nested .pk4s in FM releases
DescriptionIf you are developing an FM and wish to use an 'asset pack' (usually a .pk4 provided by some other mapper), you can just place it in the root folder of your FM working directory and all the assets will get loaded by TDM. This is very convenient and keeps everything nice and tidy.

However once you go to release your FM you need to unzip the asset pack(s) into your FM directory before you package it up into your own .pk4. That is, you cannot have 'nested .pk4 files). This is NOT convenient or very tidy.

Supporting nested .pk4s would have the following benefits:
- clean separation between the FM files and the asset pack files
- new versions of the asset pack could be easily swapped in
- asset packs could be easily removed from an FM - just remove the .pk4. No need to hunt down files one by one
- asset packs could contain their own license and readme files so the FM author wouldn't need to worry about those
- easy to identify at a glance what asset packs an FM is using

I'm sure there are more benefits, and I can't think of any downsides at all.
TagsNo tags attached.

Activities

stgatilov

stgatilov

28.04.2024 07:23

administrator   ~0016668

This is not possible: the engine can locate each individual files inside pk4/zip and load it independently.
But if you put pk4 inside pk4, then it is no longer possible.
The only way to load anything inside pk4 is to completely unpack the whole nested archive.
So either it is unpacked by mapper, or whole mission is repacked on player's machine every time he starts mission.

If such asset packs are popular and each is a separate bunch of files, then maybe it's time to use strict naming conventions.
For instance, prefix all files with "apvolta_" to show that this is Volta asset pack.
stgatilov

stgatilov

28.04.2024 07:28

administrator   ~0016669

Another option is to store each asset pack separately in the mission archive.
For instance, you send 3 pk4 files instead of 1, then e.g. nbohr1more unpacks each of them and puts each in a separate "xyz.pk4_dir" directory.
The script on TDM server merges all the files in single directory and packs into single pk4.

I don't think this is very good idea, because if there are any name collisions, then released pk4 will work differently from your local version.
And if you use good naming conventions, then separating asset packs is not a problem anyway.

Issue History

Date Modified Username Field Change
27.04.2024 20:18 Frost_Salamander New Issue
28.04.2024 07:23 stgatilov Note Added: 0016668
28.04.2024 07:28 stgatilov Note Added: 0016669