Create and release a PK3 file

In this tutorial, I would like to show you how you can assemble the content you have created for World of Padman in a PK3 file and publish it for the [PAD]Community. A PK3 file is basically nothing more than a ZIP archive file whose file suffix has been renamed to PK3. This nomenclature was introduced by id Software for the game Quake III Arena, whose engine World of Padman is based on. To create a PK3 file, you can use any packing programme that supports the ZIP file format, e.g. 7-Zip as a free alternative. However, it also works with Windows on-board tools.

Naming convention

I recommend that you always publish your content in separate PK3 files. By this I mean that you should not, for example, put a skin you created for a player model together with a map you created in one PK3 file. It should also be immediately recognisable to the user from the file name alone which content it is. Therefore, I recommend the following PK3 naming convention, which is based on the recommendation of Paul Jaquays from id Software:

  • wopmdl-xxx.pk3 – Player model you created with associated model, skin, texture, shader and sound files
  • wopbot-xxx.pk3 – Bot files created by you for a player model, may contain additional model or skin, texture and shader files
  • wopskn-xxx.pk3 – Skin created by you for a player model with associated skin, texture and shader files
  • wopmap-xxx.pk3 – Map(s) created by you with associated arena, shader, texture and sound files
  • woptex-xxx.pk3 – Textures and shader files created by you
  • wopsnd-xxx.pk3 – Sound files created by you
  • wopmus-xxx.pk3 – Music packages created by you
  • woppfb-xxx.pk3 – Prefabs for maps created by you, can also contain map objects in ASE and MD3 format.

Basically, the file name should always begin with “wop” so that it is clear that the file is intended for World of Padman. Also, a hyphen should always be used instead of an underscore, as hyperlinks on the Internet are often underlined, making it immediately obvious whether the file name contains a space or not.

Content

Your PK3 file should only contain content that you have created yourself or purchased with an appropriate licence. Appropriate details should be included in a readme file, which is usually stored in the root directory within the PK3 file. As a general rule, your PK3 file should not contain any content, i.e. textures, models, shaders etc. from other PK3 files, especially if you have modified them for your purposes.

The problem is that these contents may “overwrite” the original contents of World of Padman or those of other authors, even if the PK3 files are named differently. This is due to the fact that the engine first loads the content from the last PK3 file in terms of order and thus systematically works its way from the end to the beginning. This ensures that a file delivered with a patch in “wop_006.pk3” will certainly overwrite the file previously delivered with “wop_001.pk3” in the same path.

This means for you that your own or modified files must always be stored in subdirectories named individually by you (e.g. ./textures/mytextures/). The same applies to the naming of your shader files and the shader paths they contain. Names that start with “wop_” or “pad_” should generally be taboo for you. If, for example, you want to provide an existing, original texture from WoP with your own shader with other individual properties, you can refer to the original texture with the keyword “map” in the shader, but the shader itself must contain an individual shader path chosen by you. You do not have to unpack textures for this purpose and copy them into your texture directory, you only need to reference them via a shader.

Version management

The term version management actually involves much more, but with the knowledge from the previous section in mind, I strongly recommend versioning your final PK3 file, because sometimes it is not as final as you think. To do this, you can simply append a version number of your choice to the file name, e.g. wopmap-mymap01.pk3. In my opinion, two digits should be enough, because there should certainly not be more than 99 versions of your map. Versioning has the advantage that you can publish a wopmap-mymap02.pk3 in case of subsequent error corrections, which only contains the changed and new files and thus supplements or corrects the contents of wopmap-mymap01.pk3. In this case, the user then needs both PK3 files.

Even if you decide to deliver all files of the map completely with the new PK3 file, the new PK3 file must not have the same name as the old PK3 file. If the server and client have PK3 files with the same name and different contents, the user will have to abort the loading process with a rather cryptic error message. For the user, the cause of the problem is not immediately obvious, which can cause a lot of frustration. So stay as clean as possible and your readme file should document the changes of the new version in a kind of changelog.

Packing

Before you create your PK3 file, I strongly recommend that you create a separate folder somewhere, which can have the same name as the PK3 file, e.g. /wopmdl-myplayermodel01 If, like me, you are working on several projects at the same time, it is easier to ensure that unnecessary files and directories do not end up in the PK3 file by mistake. It is important that you do not pack the folder you created, but only the subfolders it contains. To do this, go into your folder and select the complete contents, i.e. all subfolders as well as the parallel readme file. Under Windows you can right-click on the context menu and select 7-Zip > Add to Archive… if you have installed 7-Zip before.

A programme dialogue appears in which you can adjust further settings. In Archive you can change the file extension of the file name directly from wopmdl-myplayermodel01.zip to wopmdl-myplayermodel01.pk3. It is important that zip is still selected for Archive format and that Relative pathnames is selected for Path mode. This ensures that the subfolder structure is mapped correctly, but that upstream path specifications are ignored. Finally, you can select Ultra for Compression level to keep the PK3 file as small as possible. You can leave all other settings unchanged.

7-Zip programme dialogue "Add to Archive"

7-Zip programme dialogue “Add to Archive”

If you do not want to use 7-Zip, Windows has also supported the ZIP file format natively in the file explorer for many years. You can therefore create PK3 files without an additional programme by right-clicking on the context menu and selecting Send to > Compressed (zipped) folder, but you must then rename the file extension ZIP to PK3 manually. The paths should also be correct by default, i.e. stored relatively in the PK3 file. However, you cannot influence the compression level, so the file will probably be somewhat larger than with 7-Zip, but this is no longer a major disadvantage nowadays.

Release

Before you think about releasing it, you should first test your PK3 file with a clean installation of World of Padman. Only the PK3 files you need for your release should be present. If, for example, you use textures from ENTE’s PadPack for your new map or your new skin is for a player model that is not part of the standard WoP installation, these PK3 files must of course also be present. These dependencies should also be documented accordingly in the readme file. It would be wrong to simply put the textures you need from the PadPack or the player model into your PK3 file. Please also keep in mind the WoP user directory (Windows: %appdata%\Padman\wop\ | Linux: ~./padman/wop/), which may contain other PK3 files that could “contaminate” a clean WoP installation.

If you have tested everything and everything works, you can actually upload your PK3 file directly somewhere on the internet and inform the [PAD]Community about your new release. However, since not everyone knows what to do with a PK3 file and the readme file, which contains information about the installation, is then hidden in it, it has proven itself in practice to pack the PK3 file together with the readme file again in a ZIP file of the same name and only then to upload it. If you do not have your own web space, I can recommend two free options.

ModDB

On ModDB, the Modification Database, you can assign your content directly as an addon to the game profile of World of Padman. The advantage is that it is directly recognisable as an addon for WoP and the [PAD]Community on ModDB is automatically informed about it. Furthermore, there are predefined categories to which you can assign your content, e.g. Multiplayer Map, Weapon Skin, Music etc. All you need to upload your content to ModDB is an account.

Addons list of the WoP profile page on ModDB

Addons list of the WoP profile page on ModDB

Mod.io

A meanwhile much better possibility for distribution is offered by mod.io, a relatively new cross-platform for mod support of games from the creators of ModDB. World of Padman is also represented there with its own profile. We plan to integrate this platform more closely into our website to give you a better overview of the addons for World of Padman. Further steps up to an integration into World of Padman itself are not excluded, so it might make sense to upload your content there in the future.

Addons list of the WoP profile page on mod.io

Addons list of the WoP profile page on mod.io

An essential advantage is the tag system, which we can specify ourselves and according to which all contents can be filtered. We basically distinguish between mods and addons. Mods are modifications of World of Padman itself, which have to be installed in a separate subdirectory parallel to the wop subdirectory. Addons, on the other hand, are contents such as maps, models, music packs, sounds, etc. that have been created directly for WoP or a WoP modification. These must be installed in the wop subdirectory or the corresponding subdirectory of the modification. Your content will be moderated and authorised by us on mod.io. The assignment to mods or addons is done by us. However, you have the possibility to select from all other tag groups the ones that are suitable for your content. From the dropdown lists you can only assign one suitable entry at a time, while from the checkbox lists you can assign several entries at the same time. The tag system we have provided is not final and will certainly be subject to further adjustments with further content for World of Padman.

In addition to downloading content directly, the [PAD]Community on mod.io can also subscribe to your content and thus decide which content should be automatically installed and kept up to date via a possible future integration solution in World of Padman. All you need to upload your content to mod.io is an account.