Mod Project Setup
This article will show you how to setup a C++ mod project.
Prerequisites
Step 1. Creating basic files
- Open your mod folder.
- Copy the contents of
Chairloader/ExampleMod
to your mod folder - Follow the guide in
Chairloader/ExampleMod/README.md
to set the name of the mod - Open
ModInfo.xml
and setdllName
toYourMod.dll
Step 2. Generating VS solution using CMake
- Create folder named
_build
in your mod folder - Open CMake GUI
- Configure CMake similarly to Building Chairloader until you get an error
- Set
CHAIRLOADER_COMMON_PATH
to[path to Chairloader source code]/Common
and press "Configure" - Set
MOD_DLL_PATH
to the same folder as your mod. This will place the DLL file in there automatically. - Press "Configure", "Generate", "Open Project"
Step 3. Configuring debugging settings
This is still WIP. Here's the basics.
- Open the project in Visual Studio
- Open mod project's properties
- "Configuration Properties" -> "Debugging"
- When using Preditor, set:
- "Command": path to Preditor.exe
- "Command Arguments":
-- -noaudio
(this will speed up loading considerably) - "Working directory": folder with Preditor.exe
- When using normal game, set:
- "Command": path to Prey.exe
- "Command Arguments":
-noaudio
(this will speed up loading considerably) - "Working directory": folder with Prey.exe
- Set the mod project as Startup Project
- Debug -> Launch