Necrogiant
HV July - 27 - 2010 News, Articles21 COMMENTS

This tutorial will teach you how to create an amateur mod which will delete Singleplayer menu options like in multiplayer mods, what will show you:

  • how to extract PAK files,
  • how to edit game scripts,
  • how to create PAK files,
  • how to run game with your mod.

The Painkiller\Data folder is the directory with the game content (PAK’s), sample files:

  • LScripts.pak – main file to editing game scripts, very popular in Painkiller mods,
  • Maps.pak – file with maps in MPK file format,
  • Textures.pak – there are all textures which are used in the game.

Extracting data from PAK

Run the game with parameter: -script FS.ExtractPack(‘../Data/Filename.pak’,’../Data/Foldername’)

  • Filename.pak is the name of PAK file which you want extract.
  • Foldername is the name of directory where PAK will extract.

Example:

  • Clik Start => Run => Enter the path to your Painkiller directory like below:
Code:


"C:\Program Files\Painkiller\Bin\Painkiller.exe" -script FS.ExtractPack('../Data/LScripts.pak','../Data/LScripts')

Remember that the path you want to extract to has to exist, else nothing happens and you won’t even get a notice.

Editing scripts

Go to C:\Program Files\Painkiller\Data\LScripts\HUD\Menu. Open with the Notepad (you can use another programs like Notepad++, Lua Edit) MainMenuBlack.lua (or MainMenuBlack.lua if you use Painkiller Black Edition). There is a function MainMenu(). Delete the singleplayer code which is selected on image:

Notepad

Save the MainMenuBlack.lua file. If you want you can change X & Y values like below, it will change the position of text.

Notepad

Run game, you will see:

Painkiller menu

Creating PAK file

Run the game with parameter: -script FS.CreatePack(‘../Data/Filename.pak’,’../Data/Foldername’, true)

  • Filename.pak is the name of PAK file which you want tu use.
  • Foldername is the name of directory where are files which you want to package to PAK.

Example:

  • Clik Start => Run => Enter the path to your Painkiller directory like below:
Code:


"C:\Program Files\Painkiller\Bin\painkiller.exe" -script FS.CreatePack('../Data/LScriptsmod.pak','../Data/LScripts', true)

Check used name, there is LScriptsmod.pak, no LScripts.pak.

Run game with your mod

All OK, but what if want to play the singleplayer. A solution is a method which use mods like PK++ or Hills. When is finished your mod, delete LScripts directory from Data

Run the game with parameter: -lscript Filename.pak

  • Filename.pak is the name of your PAK file.

Example:

  • Clik Start => Run => Enter the path to your Painkiller directory like below:
Code:


"C:\Program Files\Painkiller\Bin\painkiller.exe" -lscript LScriptsmod.pak

You will see the menu of your mod. When you run only Painkiller.exe (without the parameter) you will see classic menu with singleplayer options.

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.