diff --git a/SKSE/Plugins/fs.dll b/SKSE/Plugins/fs.dll index 78c9668d..47a78d76 100644 --- a/SKSE/Plugins/fs.dll +++ b/SKSE/Plugins/fs.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2799e4abbbb01be55a30e5a7043480c1df177bd28b447a83745d5bcc6626d970 -size 172032 +oid sha256:99c536fbac8293f73b56ae823c24b95457237000fd0e689729845fa9ded036a0 +size 176128 diff --git a/SKSE/Plugins/fs_se.dll b/SKSE/Plugins/fs_se.dll index feae111c..2cdd1600 100644 --- a/SKSE/Plugins/fs_se.dll +++ b/SKSE/Plugins/fs_se.dll @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5328d160149691265036ef59c674196d134ed44b25a402021b9a5f079f96531e -size 170496 +oid sha256:0f903c871bf8231f023cf5220b858e2db7ea774bc9dec82ee448f092e196664f +size 176128 diff --git a/scripts/_00e_playersetupscript.pex b/scripts/_00e_playersetupscript.pex index 69d7273d..97a20192 100644 Binary files a/scripts/_00e_playersetupscript.pex and b/scripts/_00e_playersetupscript.pex differ diff --git a/scripts/enderallib.pex b/scripts/enderallib.pex index 934566d5..a7411c88 100644 Binary files a/scripts/enderallib.pex and b/scripts/enderallib.pex differ diff --git a/source/fs.dll/fs/main.cpp b/source/fs.dll/fs/main.cpp index 86d6481d..b2f6ec40 100644 --- a/source/fs.dll/fs/main.cpp +++ b/source/fs.dll/fs/main.cpp @@ -51,7 +51,7 @@ struct SKSEPluginVersionData void SKSEMessageHandler(SKSEMessagingInterface::Message* msg) { - if (msg->type == SKSEMessagingInterface::kMessage_PostLoadGame || msg->type == SKSEMessagingInterface::kMessage_NewGame) { + if ((msg->type == SKSEMessagingInterface::kMessage_PostLoadGame && msg->data) || msg->type == SKSEMessagingInterface::kMessage_NewGame) { if (g_NewGameStarted < 2) { g_NewGameStarted++; } @@ -155,6 +155,18 @@ extern "C" { return true; }); + g_papyrus->Register([](VMClassRegistry* registry) { + registry->RegisterFunction(new NativeFunction0("HasIncompatibleMods", "EnderalLib", [](StaticFunctionTag* tag) { + TESWorldSpace* world = (TESWorldSpace*)LookupFormByID(0x3C); + if (world && std::string(world->editorId.Get()) != "MQP01Home") { + return true; + } + return false; + }, registry)); + _MESSAGE("Register Succeeded: HasIncompatibleMods"); + return true; + }); + return true; } }; \ No newline at end of file diff --git a/source/scripts/_00e_playersetupscript.psc b/source/scripts/_00e_playersetupscript.psc index 890f95a6..76683ee4 100644 --- a/source/scripts/_00e_playersetupscript.psc +++ b/source/scripts/_00e_playersetupscript.psc @@ -394,6 +394,11 @@ Function Maintenance() If Game.GetModByName("Enderal_FS_More_Affinities.esp") != 255 FixMoreAffinitiesMod() EndIf + + if EnderalLib.NewGameCount() == 1 && EnderalLib.HasIncompatibleMods() + Utility.wait(2.0) + Debug.Notification("Some installed mods are incompatible with Enderal.") + endif EndFunction diff --git a/source/scripts/enderallib.psc b/source/scripts/enderallib.psc index 5feba6de..e4bf82db 100644 --- a/source/scripts/enderallib.psc +++ b/source/scripts/enderallib.psc @@ -6,6 +6,8 @@ Potion function CreatePotion(MagicEffect[] effects, float[] magnitudes, int[] ar int function NewGameCount() native global +bool function HasIncompatibleMods() native global + bool function IsDLLLoaded() global return (SKSE.GetPluginVersion("fs_skse_functions") != -1) endfunction