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:
- AI
- Anims
- Configs
- Levels
- Meshes
- Scripts
- Shaders
- Sounds
- Spawns
- Textures
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\
to
$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:
'gamedata\configs\system.ltx'
and
'gamedata\configs\creatures\actor.ltx'
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!)
Good luck,
- Beacon
Creator of Call of Pripyat: Redux
(buried)
Meh, I learned this just by looking at files with notepad and using my brain. Nothing to useful here.
Now if this was an AI guide...
gamedata/scripts/modules.script contains the different AI schemes. The are the different xr_*.script files. They are written in the LUA programming language. You can change what conditions stalker's require to call functions from other the schemes, change the functions, make your own functions, or if you're really brave you can even write your own scheme, or if you're REALLY brave you can rewrite all of the schemes.
If you need to know what all you can call for setting and checking conditions about NPC's, you can find a list a functions exported to LUA in gamedata/scripts/lua_help.script under the game object (includes ALL game object functions, but the ones applicable to NPC's should be farily obvious most of the time). There are also functions you can use in a handful of other .script files; off the top of my head I only recall utils.script having not only a list of many function headers, but the function body's as well.
Simply changing values for different AI parameters you can modify gamedata/configs/creatures/m_stalker.ltx where most stuff is named appropriately. If it isn't, translating the Russian comments using Google translate usually explains well enough.
Anything you can't find between all that is hard-coded, except AI prediction times, distances, and angles.
Hope that helps! :)
im no coding master but i know that coding or editing ai isnt somthing that can be explained in a quick tutorial on your first mod. And thanks for the tutorial ive allways wondered how people did this ^ ^
Thank you very much!
This tutorial was very useful, because I'm new to moding Stalker. I've modded other games but Stalker is something very different... Thanks for this tutorial, I'm looking forward to more if you can...
Hello im fairly new to modding and I downloaded the Cs_full_unpack and when it finished i had no unpack folder. Also I already had a gamedata and resources folders am i supposed to delete them? if you can post anything to help it'd be so much help.
same here.
maybe the unpacked folders are in other directory?
im trying to do it on windows7 64bit
I haven't even gotten the unpacked folder, please help somebody!
I want to edit a helmet, I want the respirator to have a new upgrade which will be nightvison third generation, Can you help?
Can you please help me with something?
Thank for posting this Beac! I am using this for some artifact changes as we speak.
THANKS!
This Is SO Great & Useful!!! But Here's A Problem... I Got Only "levels" Folder... What Do I Have To Do?
PS: Redux... What A Great Mod
Problem Fixed... You Just Got To Wait... Stupid Me :P
I Was Too Impatient. xD
Thanks a lot!
Howdy. I'm trying to add a few guns to a mod im working on , i have them put in and i want to get owl to sell them in the beginning. Under the gamedata/misc/trade folder , i found his file , how to i change the coding to make him sell what i want?
hi i have a question , can i copy in to my gamedata folder data from other mods ?
i dont have a single file unpackted in my resources folder.
Very helpful.
I was mainly looking for a clean gamedata folder with all contents but then learned that player weight was editable.
One problem:
The data that was placed in C:\Program Files\bitComposer Games\S.T.A.L.K.E.R. - Call of Pripyat\resources\unpacked
It is all empty, not a single character in any file. I opened them in Notepad++. I really cannot see the error.
Thanks for the tutorial really helpful for beginners :P
I have a question regarding armor suits what does the power loss line mean?
I believe that it means how the effectiveness is affected by dage to the suit, also I am having an issue with getting the .db files unpacked, would it be possible for someone to help me out or possibly send me theirs?
thanks man been a looking for a C.O.P. .db extracting tool.
ten out of ten for the tip on were to get the .db extractor tool.
oh and a good guide for the greenies indeed
Ty
This comment is currently awaiting admin approval, join now to view.
Hi, can you make a complete tutorial on how to mod s.t.a.l.k.e.r.? and thanks for extractor tools
Interesting article. Very useful details for beginners.
I could not delete enough stuff off my hard drive to fit this whole thing, so maybe thats the cause of my problem, but when I tried to edit the fsgame.ltx file it would not let me save, and I also had no unpacked folder
This comment is currently awaiting admin approval, join now to view.
Your stupid download brings me to some lame installer that tried to infect my computer with adware, make different download with something actually reliable and trust worthy like adfly or mediafire please >~<
That's just what I needed!! A simple, easy to understand tutorial for beginners. And thanks for those links to get started!
This comment is currently awaiting admin approval, join now to view.
I can't download!!!
help
Download problem improved!!!
no help needed:D
The file on the picture says COP Extractor.zip but when I download it, it says COP Extractor.zip.exe and my computer is trying to remove it and I cannot open it either.
Really helpful , thank you Beacon I couldn't find like this :)
Conventor is here Steamcommunity.com
Kovolsky, how did you do it?
"to better suit your own goals or playing style? Maybe you want to create a great mod that goes down in modding history," no I want to create a sex mod