Last active
March 23, 2022 13:27
-
-
Save mrowrpurr/d075745a36fbd705bbb533934334817d to your computer and use it in GitHub Desktop.
CommonLib SKSE Hello World
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <SKSE/SKSE.h> | |
| #include <RE/C/ConsoleLog.h> | |
| extern "C" __declspec(dllexport) bool SKSEAPI SKSEPlugin_Load(const SKSE::LoadInterface* skse) { | |
| SKSE::Init(skse); | |
| SKSE::GetMessagingInterface()->RegisterListener([](SKSE::MessagingInterface::Message* event){ | |
| if (event->type == SKSE::MessagingInterface::kDataLoaded) { | |
| RE::ConsoleLog::GetSingleton()->Print("Hello from mod."); | |
| } | |
| }); | |
| return true; | |
| } | |
| extern "C" __declspec(dllexport) bool SKSEAPI SKSEPlugin_Query(const SKSE::QueryInterface*, SKSE::PluginInfo* info) { | |
| info->infoVersion = SKSE::PluginInfo::kVersion; | |
| info->name = "SkySpecExample"; | |
| info->version = 1; | |
| return true; | |
| } | |
| extern "C" __declspec(dllexport) constinit auto SKSEPlugin_Version = [](){ | |
| SKSE::PluginVersionData version; | |
| version.PluginName("SkySpecExample"); | |
| version.PluginVersion({ 0, 0, 1 }); | |
| version.CompatibleVersions({ SKSE::RUNTIME_LATEST }); | |
| return version; | |
| }(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment