In this article, we'll explore a specific type of modding – altering configuration files – and then cover the crucial step of packaging your mod. Packaging is necessary to turn your project files into a format the S.T.A.L.K.E.R. 2 game can actually read and use.
Creating a Configuration Mod
Some aspects of the game's behavior and settings are controlled by simple text-based configuration files (often with a .cfg extension). You can modify these to tweak gameplay elements without needing to work with complex assets.
- Create a New Mod Project: If you haven't already, start by creating a new mod project using the Zone Kit (see how to do it in the first article “Getting Started: First Steps in the Zone's Code”).
- Locate the Configuration file: Navigate through the game's extracted Content folder structure to find the specific configuration file (.cfg) that contains the settings you want to change.
- Copy the file to your Mod folder: Copy this configuration file from the game's Content directory into your active mod's folder. It is essential to replicate the exact, full folder hierarchy from the original Content folder within your mod's folder.
- Example: If the original file was located at ...\Content\GameLite\GameData\Credits.cfg within the game's content, you must place the copied file in your mod's folder (e.g., located at ...\Mods\your_mod\) such that the path becomes ...\Mods\your_mod\Content\GameLite\GameData\Credits.cfg. The Content\GameLite\GameData\ part must be recreated inside your mod's folder.
- Edit the File: Open the copied configuration file within your mod's folder using any standard text editor. Make your desired changes to the values or lines within the file.
- Save the File: Save the changes you made in the text editor.
- Package the Mod: Once you have finished editing the configuration file(s), you need to package your mod project. Follow the steps outlined in the "Packaging Your Mod" section below.
Packaging Your Mod
Before Packaging: Always ensure your mod is selected as the active mod in the top toolbar of the Zone Kit.
Steps to Package a Mod:
- Launch the Zone Kit.
- Set the folder where the configuration was copied as the active mod.
- Select the Package Mod button to cook the mod.
- To track the packaging process, select Show Output Log in the pop-up in the bottom-right corner.
- A confirmation message will appear in the bottom-right pop-up once the cooking is done successfully.
- After successful packaging, the resulting files will be placed in a specific directory: inside your Mod SDK installation path, navigate to s2gamebuild\SavedMods\Staged\. Inside this folder, you will find another folder named after your mod (e.g., your_mod). This is where the ready-to-use mod files are located.
Checking packaged Mod files with UnrealPak
If your mod doesn’t work as expected in the game, one common troubleshooting step is to verify which files were actually included in the packaged file:
- Open your Mod SDK installation directory and navigate to the s2editor\Engine\Binaries\Win64 folder.
- Open a Command Prompt (cmd) window in this directory.
- In the Command Prompt, enter the command: UnrealPak path to pak/utoc/ucas file -list.
- Example: If your SDK is on drive D: and your mod is named test_cfg, the command might look like: UnrealPak D:\SDK\s2gamebuild\SavedMods\Staged\test_cfg\Windows\Stalker2\Mods\test_cfg\Content\Paks\Windows\test_cfgStalker2-Windows.pak -list
- Press Enter. The command prompt will display a list of all files that were successfully included inside that specific packaged file.
NOTE: To get a complete list of all files included in your packaged mod, you should repeat step 3 for all three file types (.pak, .utoc, and .ucas) found in your packaged mod's folder.