Downloading, installing, setting up and using it, all covered! Learn how to convert Call of Pripyat maps for use in the level editor!
Posted by Beac on Jan 7th, 2011
A tutorial brought to you by Beacon, creator of CoP: Redux.
Welcome once more to a tutorial on the joys of modding for S.T.A.L.K.E.R. Call of Pripyat!
Today I'll be talking about something brand new, the CoP Software Development Kit.
The generous guys on the STALKER Dev Team at GSC Game World have graciously given us a wonderful Christmas/New Years present - the SDK for Call of Pripyat!
Simply put, the SDK or Software Development Kit, is the set of tools that the developers of STALKER used to make the game.
It contains the following modules:
Each of these is used to modify different parts of the base game, and for this tutorial we'll be focusing on the Level Editor.
First thing you'll want to do is download the SDK installer, but the official link from GSC is terribly slow so you'll want to use this much quicker link.
Once downloaded, install it to the default directory (should be C:\Program Files\X-Ray CoP SDK or suchlike).
Next, if you already know what level it is you're looking to edit within the Level Editor, find its folder within the 'resources' folder in your CoP directory (resources/unpacked/levels/) and copy it into your SDK Root/editors/gamedata/levels/ folder, then copy the two files from within that level's terrain folder into the SDK Root/editors/gamedata/textures/terrain folder.
Without doing this, A: you won't have a level to import to the editor, and B: you'll be missing the ground textures of your level!
The next thing we need to do is convert the level you want to edit from the game format to the level editor format - to do this we need a tool developed by some great Stalker modders, to whom we are eternally grateful!
1: Download the converter tools then extract fsconverter_cop.ltx, converter.ini and converter.exe to your SDK Root/editors folder.
2: Rename fsconverter_cop.ltx to fsconverter.ltx, then open it in a notepad application (Notepad++!).
3: Find the line beginning with $sdk_root$ and replace c:\program files\X-Ray CoP SDK\editors\ with the correct directory for your PC - mine for instance is C:\Program Files (x86)\X-Ray CoP SDK\editors\
4: Edit converter.ini again with a notepad application, then scroll almost to the bottom of the file and find the line that begins with ; 3870+ - firstly edit the line two below it, beginning with $game_data$ and replace E:\Games\COP\gamedata\ with a link to your CoP SDK's gamedata folder - mine is C:\Program Files (x86)\X-Ray CoP SDK\editors\gamedata\.
Finally, do the same thing with the $game_levels$ line, but add '\levels' to the end, e.g C:\Program Files (x86)\X-Ray CoP SDK\editors\gamedata\levels\
Now we can go about the process of actually converting levels for use in the Level Editor!
Go to your start menu and type 'cmd'.
This should open up a black command prompt box, into which you need to type 'cd ~SDK Directory leading to the editors folder~
This takes you into the 'editors' folder of the SDK Root, meaning we can now launch the converter.
Type the following into the command prompt box:
converter -level cop:pripyat -mode le -with_lods
Let's run through this command for an idea of what it does;
Simple enough, right?!
To convert other levels, simply replace 'cop:pripyat' with 'cop:levelname' where 'levelname' is obviously, the name of the level you want to convert!
Having inserted this command, the program should begin running and start converting your level - this will take a bit of time, especially the converting of lods.
Once finished, your level will be ready for use in the SDK Root/editors/rawdata/levels folder!
Now we get to the more interesting part - actually editing a level.
Navigate to your SDK Root/editors folder and proceed to launch '!LevelEditor.cmd' - launching the LE through any other method will lead to problems, so make sure to use this .cmd!
The Level Editor will start up, and eventually you'll get your first look at the editor's workspace.
Movement is done via the use of the Shift key and your mouse buttons:
Look to the top-right, click the 'file' button, and hit 'load' - then select the level you've converted, and the LE will load it into the workspace.
This is the Edit Mode tab, over on the middle-right of the screen.
Here you can choose what parts of the map you would like to see, and edit.
The eye icons to the left of each selection show what you can see of the map - when these are shown, you can see that part, and when they're not, you can't!
To the right of the eye icons are little checkboxes - to be able to actually edit the part you want, it has to be selected - this is done by selecting it's checkbox (as you can see, 'Object' is currently selected.
So, let me run down the most important/interesting parts of this box:
This is the editing toolbar in the top-left of the screen. It's very important!
From left to right:
And there, we go, that's the basics of setting up and using the SDK to open a converted level from Call of Pripyat!
I hope this has been helpful, and may you go out and create some awesome stuff with its help!
'Till next time, keep safe brothers!
Creator of Call of Pripyat: Redux