-
Notifications
You must be signed in to change notification settings - Fork 38
3.4.X Version
Hendrik Polczynski edited this page Nov 10, 2013
·
5 revisions
Follow these steps to integrate the Plugin SDK into your GameDLL.
- Clone the repository to your local machine to your Code directory e.g.
C:\CryENGINE_PC_vX.X.X\Code
. - Use a github UI version like Github for Windows
- or if you already have git installed
git clone https://github.com/hendrikp/Plugin_SDK.git
- Open the Solution
CryEngine_GameCodeOnly.sln
- Open
CryGame
Properties - Set the Dropdowns to All Configurations, All Platforms
- Add to C/C++ -> General -> Additional Include Directories:
;$(SolutionDir)..\Plugin_SDK\inc
- Apply those properties and close the dialog
- Inside the
CryGame
project (Solution Explorer) open the following file:Startup Files / GameStartup.cpp
- Add behind the existing includes the following:
#include <IPluginManager_impl.h>
- Find the function CGameStartup::Init
- Add in the middle of the function (before
REGISTER_COMMAND("g_loadMod", RequestLoadMod,VF_NULL,"");
) the following:
PluginManager::InitPluginManager(startupParams);
PluginManager::InitPluginsBeforeFramework();
REGISTER_COMMAND("g_loadMod", RequestLoadMod,VF_NULL,""); // <--
- Add at the end of the function (before
return pOut;
) the following:
PluginManager::InitPluginsLast();
return pOut; // <--
- Inside the
CryGame
project (Solution Explorer) open the following file:Game Files / Game.cpp
- Add behind the existing includes the following:
#include <IPluginManager_impl.h>
- Find the function CGame::RegisterGameFlowNodes
- Add at the end of the function the following:
PluginManager::RegisterPluginFlownodes();
} // <--
At this point no plugin is using this, but its integrated in the prebuilt version:
- If you want to use the WinProc Injector to query or block window messages the game receives follow this guide: GameDLL Integration Winproc Injector