This is the folder loading branch from @LZA's repository (https://github.com/Lactozilla/SRB2/tree/folder)
with a minor QoL improvement to the -file
and -folder
CLI arguments.
With this branch, you can load an add-on from a PK3-structured folder, making development easier for modders, as instead of having to import and export resources to and from SLADE, they can instead manipulate them as files using any external software they like.
When ready for a public release, the folder can be turned into a PK3 by simply zipping it and renaming the extension from .zip to .pk3, making it easy to distribute.
There are currently two ways to load folders:
-folder <folder path>
argument from the command-line,addfolder <folder path>
console command.
In both cases, the path should be either absolute, or relative to SRB2's folder.Due to a number of quirks in the PK3 (and more generally ZIP) format, there are a few things to be aware of when converting your add-on to a folder, including:
MAPXX
, SECTORS
, LINEDEFS
, etc
lumps contained directly inside your Maps/
folder.POSSA3A7
and POSSA1
should be in the same folder, but SPOSA3A7
in a different one.TEXTURES
lump at the root,
since there is already a folder named Textures/
there.
To solve this specific case, you can add an arbitrary extension,
such as TEXTURES.gfz
or TEXTURES.thz
.
This is especially important to keep in mind if you are using a OS other than Windows,
as it would be case-sensitive and thus may appear to work locally, but break for other users.Do note that this feature is only intended for add-on development, not for distribution. As such, the in-game downloader does not support transferring add-ons.
Additionally, the limit of 65535 lumps in WADs and PK3s also applies to folder add-ons.