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.

21 Comments

SlavOK

28. July 2010 03:38

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

28. July 2010 05:25

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

greentechb

28. July 2010 07:36

nice tutorial 😀

HV

28. July 2010 21:30

I hope that will be useful :]

SlavOK

29. July 2010 16:56

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

29. July 2010 17:28

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

SlavOK

29. July 2010 22:06

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

30. July 2010 07:30

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

30. July 2010 14:34

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

1. August 2010 20:56

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

SlavOK

2. August 2010 07:03

🙁

Janusz Wou017aniak

29. May 2011 14:01

Don’t works with black editon.

Janusz Wou017aniak

29. May 2011 14:01

Don’t works with black editon.

    HV

    29. May 2011 16:42

    What doesn’t work?

    HV

    29. May 2011 16:42

    What doesn’t work?

    P&C Games

    3. June 2011 21:36

    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 🙂

seo bangalore

30. May 2011 06:45

A very good tutorial thanks for sharing.

Making a Mod Loader

4. January 2012 12:40

[…] Each mod may contain a different set of LUA files (or none at all). In order to add the proper DoFile lines you must know which LUA files are in the mod’s PAK file. You can’t see these files until you extract the PAK- for a guide on how to do this click here. […]

Alastor

12. April 2013 03:13

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

Leave a Reply

You must be logged in to post a comment.

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.