#include "skse64/PluginAPI.h" // super #include "skse64_common/skse_version.h" // What version of SKSE is running? #include // CSIDL_MYCODUMENTS #include "PhasmalistInventoryFunctions.h" #include "CreatePotion.h" static PluginHandle g_pluginHandle = kPluginHandle_Invalid; static SKSEPapyrusInterface * g_papyrus = NULL; extern "C" { bool SKSEPlugin_Query(const SKSEInterface * skse, PluginInfo * info) { // Called by SKSE to learn about this plugin and check that it's safe to load it gLog.OpenRelative(CSIDL_MYDOCUMENTS, "\\My Games\\Enderal Special Edition\\SKSE\\FS.log"); gLog.SetPrintLevel(IDebugLog::kLevel_Error); gLog.SetLogLevel(IDebugLog::kLevel_DebugMessage); _MESSAGE("fs_skse_functions"); // populate info structure info->infoVersion = PluginInfo::kInfoVersion; info->name = "fs_skse_functions"; info->version = 1; // store plugin handle so we can identify ourselves later g_pluginHandle = skse->GetPluginHandle(); if (skse->isEditor) { _MESSAGE("loaded in editor, marking as incompatible"); return false; } else if (skse->runtimeVersion != RUNTIME_VERSION_1_5_97) { _MESSAGE("unsupported runtime version %08X", skse->runtimeVersion); return false; } // ### do not do anything else in this callback // ### only fill out PluginInfo and return true/false // supported runtime version return true; } bool SKSEPlugin_Load(const SKSEInterface * skse) { // Called by SKSE to load this plugin _MESSAGE("fs_skse_functions loaded"); g_papyrus = (SKSEPapyrusInterface *)skse->QueryInterface(kInterface_Papyrus); //Check if the function registration was a success... bool btest = g_papyrus->Register(PhasmalistScripts::RegisterFuncs); if (btest) { _MESSAGE("Register Succeeded: Phasmalist functions"); } btest = g_papyrus->Register(CreatePotion::RegisterFuncs); if (btest) { _MESSAGE("Register Succeeded: CreatePotion functions"); } return true; } };