Creating your first S.T.A.L.K.E.R.: Call of Pripyat mod!
A tutorial brought to you by Beacon, creator of CoP: Redux.
Welcome to the 'Your First Mod' tutorial for S.T.A.L.K.E.R.: Call of Pripyat - brought to you by CoP: Redux.
So you've played through Call of Pripyat, and think you can make it better, or tweak it to better suit your own goals or playing style? Maybe you want to create a great mod that goes down in modding history, or get a start on a portfolio, but don't know how, and want an easy to follow tutorial to guide your first steps?
If this describes you, then you're in the right place.
In this tutorial I'm going to show you how to extract the CoP Database files, tell you where the most commonly-edited files are, and what you should use to edit them, as well as set out a small example task.
So - let's get started.
Step 1: - Extracting the Databases.
A.) The first thing we need to do is extract the game files, allowing us to actually modify them, and use them in a mod.
Download this .zip file and open it in WinZip/WinRAR/7-Zip etc:
B.) Extract the files inside into a folder named 'resources' which you must create in your main Call of Pripyat directory:
C.) Then run the 'CS_full_unpack' batch file, making sure you have at least 3.5GB of space on your hard-drive for the database files.
After doing this, you should get the following screen and folders and files will begin appearing in the 'unpacked' folder which will be created in the 'resources' folder.
D.) Eventually the process will finish and you will get a 'press any key to continue' prompt. Do so, and the window will close. Step 1 - finished!
Step 2: - What are these files, and what do I do with them?
A.) So we've extracted the files and folders from the game, and now we (should) have the following folders in the 'unpacked' folder:
As well as a few '.xr' files.
If you have all of these, then you successfully carried out step 1, and we can start modding!
B.) Create a folder named 'gamedata' within your root Call of Pripyat directory. Then edit the 'fsgame.ltx' file and change the line:
$game_data$ = false| true| $fs_root$| gamedata\
$game_data$ = true| true| $fs_root$| gamedata\
Any files you want to modify should be placed in the 'gamedata' folder, and the game will automatically over-write the vanilla game files with the ones you have in that folder when it loads. A great little modding system if you ask me.
C.) What do I do now, I hear you ask? Well, firstly you should download the program Notepad++ - this great alternative to Windows' Notepad is free and open-source, and extremely useful when it comes to editing S.T.A.L.K.E.R. files - it highlights specific areas of code and syntax, as well as providing a better overall working area when compared to Notepad. Highly recommended.
D.) Next up - what do these folders and files do? Most of the folders are self-explanatory:
'Configs' is probably the folder you'll be editing most - it contains almost everything that possesses 'values': weaponry, armour, outfits, mutants/stalkers, etc.
'Meshes' contains the .ogf model files for stuff like stalkers and mutants, weapons etc.
'Textures' contains, obviously, the textures for the same stuff as above.
'Spawns' contains the 'all.spawn' file - an extremely important file that defines the location of everything from items and stashes to objects and smart-locations for NPCs. You can't edit it without a special decompiler, the use of which I'll cover in a future tutorial.
Step 3: - An example mod to get you started.
A.) Let's work on one of the most-popular and asked about mods - adjusting the weight the player can carry.
For this we'll be focusing on two files, 'system.ltx' - located in the main 'configs' folder, and 'actor.ltx' - located in the configs/creatures folder.
B.) Copy the two files to your gamedata folder, making sure to keep file structure. That means, making sure that within your gamedata folder you have the same folder structure as you do in your unpacked folder. E.G:
You must make sure you maintain file and folder-structure if you want your modded files to be loaded on game-start.
C.) Open the 'system.ltx' file in Notepad++ and scroll down to line 107.
This defines the maximum weight your character can carry before he stops being able to run - choose whatever you want; a lower value for a realism/difficulty mod, and higher for a fun/silly mod.
Next open up 'actor.ltx' and scroll down to line 22.
Change this value to whatever you changed the 'system.ltx' value to, they do the same thing,
Neeeeext, scroll down to line 181 in 'actor.ltx'.
THIS value determines how much weight you can carry if you still want to be able to walk at all.
Pretty simple, and that's basically how much of the modding in Call of Pripyat is done - changing values and references.
I hope you've learned something, and I hope this was easy enough to understand. If you have any comments, feel free to leave them below (plus a thank-you never hurt anyone, if you found this useful!)
Creator of Call of Pripyat: Redux