Skip to content

3.4.X Version

Hendrik Polczynski edited this page Nov 10, 2013 · 5 revisions

C++ Integration (3.4.X)

Follow these steps to integrate the Plugin SDK into your GameDLL.

Repository Setup

  • 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

Compiler Settings

  • 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

Modify CryEngine GameDLL Source Files

  • 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();
} // <--

Optional Steps

At this point no plugin is using this, but its integrated in the prebuilt version: