Necrogiant
Leviathan January - 17 - 2012 News, ArticlesADD COMMENTS

This is a small tutorial on converting any custom singleplayer level to be compatible with the Custom Level Loader. This is useful for levels with names that don’t begin with SP_ or levels which are run as a separate mod. With this tutorial you will be able to access all custom levels from a single menu.

You can get the Custom Level Loader here.

You may need to know how to extract PAK or PKM files- you can find a guide on how to do this by clicking here.

Converting to SP

First, make sure you have the Custom Level Loader as well as a custom level installed. Find the custom level’s folder within the Levels folder of your Painkiller/Data directory- if you don’t see it then the level was installed as a PAK or PKM file (read the next section). Once you’ve found the level’s folder rename it so that it begins with SP_ (like in SP_TreeOfWoe). Keep in mind that you cannot use spaces.

Now inside that folder you should see two files (a LUA and a CLevel) among the many folders. Rename both of those files to match the name of the folder you just renamed. Open the LUA file with any word processor (like Notepad or Wordpad). In this file you should see at least one instance of the following line:

function LEVELNAME:

LEVELNAME will appear as the name of the level… just change it to match the new name. Do this for every instance of “function LEVELNAME:” within the LUA file.

That’s it- save the LUA file, run Painkiller and the level will appear in the Custom Level Loader menu.

Installers, PAKs, and PKMs

Some levels come as an installer, PAK, or PKM file- for these there are a few extra steps involved:

If the level comes as an installer it’s best to install to a new folder so you can see the exact contents of the level. After you install, extract the resulting PAK (or PKM).

Now copy all of the folders from the extracted contents of the PAK/PKM file EXCEPT for the LScripts folder- it may contain custom menus that will override the Custom Level Loader. For even the most basic of custom levels the Maps and Levels folder ARE REQUIRED- if you do not copy these folders then the custom level will not work! Other folders like Textures, Models, etc are also important.

Now just paste the custom level’s folders into Painkiller’s Data folder. Remember to also copy over the Sounds and Music folder if the level has them (they will be separate from the PAK/PKM). Then proceed with the steps in the above section (Converting Zip Archive Levels). Once you’re finished you’ll want to remove the original PAK/PKM, you won’t be needing it anymore.

Repacking Custom Levels

If you want you can package the folders of a custom level into a PAK or PKM file that allows for more convenient uninstalling, organizing, etc while still being fully compatible with the Custom Level Loader. Remember not to add the Music or Sounds folders to the PAK or PKM… the files within these folders must be placed directly in the Data folder. You can even package all of your custom levels into a single PAK or PKM if you want, just make sure to leave out the Music and Sounds folders and copy them to Painkiller’s Data folder instead.

Once you’ve got the PAK or PKM you will need to load it… there are a few ways to do this:

(1) If you made a PKM file just place it in the Data folder and Painkiller will automatically load it.

(2) Click here for a guide on how to make and use a mod loader that will work for all custom levels. For each custom level you will only need to add a single line of code to your loader- the “FS.RegisterPack…” line. If you have powermad installed then you already have a mod loader in the included loader.lua file (just click the above link to learn how to use it).

(3) Click here for info on running the custom level through a shortcut with a parameter (info is towards the end of the linked article).

Happy modding!

~ Leviathan

Categories

Painkiller is a first-person shooter game released on April 12, 2004. The game takes place in Purgatory and Hell. The main character is Daniel Garner.