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.

  • Aloken
  • Aloken
  • SlavOK

    Does not want neither unpack, nor to pack through to “Clik Start => Run => Enter the path to your Painkiller directory like below:”! The code wrong can?

  • SlavOK

    I have understood! In the end it was necessary to put \
    From for it did not wish to unpack!
    Thanks for the information! 🙂

  • greentechb

    nice tutorial 😀

  • HV

    I hope that will be useful :]

  • SlavOK

    There are some notebooks which I cannot edit!!! Here http://pix.playground.ru/download/gallery/670564/eee3d25e8c330fb12203a5d074beaf2e.jpg After whereas I translate into Russian, and I save, game is not started and gives out an error. And in general that it for small squares. Can the program special is necessary to edit this notebook???
    Or here it is impossible to translate. If is not present, where then transfer of that on the screen, in game lies. For example: scoreboard how to translate in game, or an inscription “You killed …”?

  • HV

    Use Notepad++. You will see also what on your screenshot, but it save good.

  • SlavOK

    All the same an error gives out. I can not so change? The program new, I do not know this. There for some reason “in” by blue colour it is written!

  • SlavOK

    And that it small squares with words “NUL”, “STX”, “EOT”, “FF” and others. They can be deleted? I have noticed that it works only when the word has held in a line. And here if has translated also my transfer more than an original word it gives out an error. How to be?

  • SlavOK

    I still do not understand how to change these strange pads! It gives an error! For example: notepad “HUD2” changed the line “Match begins in:” to “Сражение начнется через:”. Saved. And the game has given just such a mistake http://pix.playground.ru/download/gallery/670564/0c52fb5e3c8036fad708169237980b97.jpg
    How to edit these strange notebooks? Help please : (

  • HV

    Sry, I can’t help, I don’t know how :[ I’m so sorry.

  • SlavOK

    🙁

  • Janusz Wou017aniak

    Don’t works with black editon.

  • Janusz Wou017aniak

    Don’t works with black editon.

    • HV

      What doesn’t work?

    • HV

      What doesn’t work?

    • P&C Games

      Because you must edit MainMenuBlack in Black Edition,not MainMenu.nI have Black Edition and MainMenu is for normal Painkiller,and MainMenuBlack is for Black Edition 🙂 hope this will help 🙂

  • A very good tutorial thanks for sharing.

  • Pingback: Making a Mod Loader()

  • Alastor

    Sorry for the extremely huge bump, but extracting isn’t working for me. I just get the following error, all the time:
    [string “FS.ExtractPack(‘C:/route/to/my/file.pak’,’C:/route/to/destination’)”]:1: attempted to call field `ExtractPack` (a nil value)
    it’s the same with:
    [string “FS.ExtractPack(‘../Data//file.pak’,’../Data/destination’)”]:1: attempted to call field `ExtractPack` (a nil value)

    On the other hand, CreatePack is working just fine.
    Could you please help me out? Any solutions are highly appreciated.
    Kind regards,
    Alastor

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.