Disable sIntroSequence with DLL, removed redundant functions
This commit is contained in:
parent
8a4e3ef71b
commit
623789c5bf
BIN
SKSE/Plugins/EnderalSE.dll
(Stored with Git LFS)
BIN
SKSE/Plugins/EnderalSE.dll
(Stored with Git LFS)
Binary file not shown.
@ -3,6 +3,7 @@
|
|||||||
#include "Util.h"
|
#include "Util.h"
|
||||||
|
|
||||||
// Based on Ryan McKenzie's Flat Map Markers
|
// Based on Ryan McKenzie's Flat Map Markers
|
||||||
|
// CommonLibSSE-NG update by Eddoursul
|
||||||
namespace FlatMapMarkers
|
namespace FlatMapMarkers
|
||||||
{
|
{
|
||||||
inline void Hook_WorldPtToScreenPt3(RE::NiCamera* a_camera, RE::NiPoint3& a_in, float& a_xOut, float& a_yOut, float& a_zOut, float a_zeroTolerance)
|
inline void Hook_WorldPtToScreenPt3(RE::NiCamera* a_camera, RE::NiPoint3& a_in, float& a_xOut, float& a_yOut, float& a_zOut, float a_zeroTolerance)
|
||||||
@ -13,7 +14,7 @@ namespace FlatMapMarkers
|
|||||||
|
|
||||||
inline void Install()
|
inline void Install()
|
||||||
{
|
{
|
||||||
REL::Relocation<std::uintptr_t> offset{ RELOCATION_ID(52224, 53111), IsSE() ? 0x22F : 0x21F };
|
REL::Relocation<std::uintptr_t> offset{ REL::RelocationID(52224, 53111), REL::Relocate(0x22F, 0x21F) };
|
||||||
SKSE::AllocTrampoline(14);
|
SKSE::AllocTrampoline(14);
|
||||||
auto& trampoline = SKSE::GetTrampoline();
|
auto& trampoline = SKSE::GetTrampoline();
|
||||||
trampoline.write_call<5>(offset.address(), &Hook_WorldPtToScreenPt3);
|
trampoline.write_call<5>(offset.address(), &Hook_WorldPtToScreenPt3);
|
||||||
|
|||||||
@ -42,13 +42,13 @@ namespace {
|
|||||||
if (message->type == MessagingInterface::kPostLoad) {
|
if (message->type == MessagingInterface::kPostLoad) {
|
||||||
if (g_settings.at("StayAtSystemPage")) {
|
if (g_settings.at("StayAtSystemPage")) {
|
||||||
if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("StayAtSystemPage"); pluginInfo) {
|
if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("StayAtSystemPage"); pluginInfo) {
|
||||||
MessageBoxW(NULL, L"Stay At The System Page is already included in Enderal, please, disable it.", L"Error", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Stay At The System Page is already included in Enderal, please, disable it.", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (g_settings.at("FlatMapMarkers")) {
|
if (g_settings.at("FlatMapMarkers")) {
|
||||||
if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("FlatMapMarkersSSE"); pluginInfo) {
|
if (const auto pluginInfo = GetLoadInterface()->GetPluginInfo("FlatMapMarkersSSE"); pluginInfo) {
|
||||||
MessageBoxW(NULL, L"Flat Map Markers is already included in Enderal, please, disable it (remove file Data\\SKSE\\Plugins\\FlatMapMarkersSSE.dll).", L"Error", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Flat Map Markers is already included in Enderal, please, disable it (remove file Data\\SKSE\\Plugins\\FlatMapMarkersSSE.dll).", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,11 +60,11 @@ namespace {
|
|||||||
const auto dataHandler = RE::TESDataHandler::GetSingleton();
|
const auto dataHandler = RE::TESDataHandler::GetSingleton();
|
||||||
if (dataHandler) {
|
if (dataHandler) {
|
||||||
if (!dataHandler->LookupLoadedModByName("Update.esm")) {
|
if (!dataHandler->LookupLoadedModByName("Update.esm")) {
|
||||||
MessageBoxW(NULL, L"Update.esm is not loaded!", L"Error", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Update.esm is not loaded!", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
if (!dataHandler->LookupLoadedModByName("Enderal - Forgotten Stories.esm")) {
|
if (!dataHandler->LookupLoadedModByName("Enderal - Forgotten Stories.esm")) {
|
||||||
MessageBoxW(NULL, L"Enderal - Forgotten Stories.esm is not loaded!", L"Error", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Enderal - Forgotten Stories.esm is not loaded!", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -117,18 +117,23 @@ SKSEPluginLoad(const LoadInterface* skse) {
|
|||||||
};
|
};
|
||||||
for (int i = 0; i < 4; i++) {
|
for (int i = 0; i < 4; i++) {
|
||||||
if (std::filesystem::exists(std::format("Data\\SKSE\\Plugins\\{}", filenames[i]))) {
|
if (std::filesystem::exists(std::format("Data\\SKSE\\Plugins\\{}", filenames[i]))) {
|
||||||
MessageBoxA(NULL, std::format("Found a leftover file from a previous version of Enderal SE. Please, delete Data\\SKSE\\Plugins\\{}.", filenames[i]).c_str(), "Error", MB_OK | MB_ICONERROR);
|
MessageBoxA(NULL, std::format("Found a leftover file from a previous version of Enderal SE. Please, delete Data\\SKSE\\Plugins\\{}.", filenames[i]).c_str(), "Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DataFileExists("Dawnguard.esm") || DataFileExists("Dragonborn.esm") || DataFileExists("HearthFires.esm") || DataFileExists("Update.esm")) {
|
if (DataFileExists("Dawnguard.esm") || DataFileExists("Dragonborn.esm") || DataFileExists("HearthFires.esm") || DataFileExists("Update.esm")) {
|
||||||
MessageBoxW(NULL, L"Skyrim DLCs are incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Skyrim DLCs are incompatible with Enderal.", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (DataFileExists("Unofficial Skyrim Special Edition Patch.esp")) {
|
if (DataFileExists("Unofficial Skyrim Special Edition Patch.esp")) {
|
||||||
MessageBoxW(NULL, L"Unofficial Skyrim Special Edition Patch is incompatible with Enderal.", L"Error", MB_OK | MB_ICONERROR);
|
MessageBoxW(NULL, L"Unofficial Skyrim Special Edition Patch is incompatible with Enderal.", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!DataFileExists("Enderal - Forgotten Stories.esm")) {
|
||||||
|
MessageBoxW(NULL, L"Enderal - Forgotten Stories.esm is not loaded!", L"Enderal SE Error", MB_OK | MB_ICONERROR);
|
||||||
exit(EXIT_FAILURE);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -147,6 +152,10 @@ SKSEPluginLoad(const LoadInterface* skse) {
|
|||||||
Init(skse);
|
Init(skse);
|
||||||
InitializeMessaging();
|
InitializeMessaging();
|
||||||
|
|
||||||
|
auto setting = RE::INISettingCollection::GetSingleton()->GetSetting("sIntroSequence:General");
|
||||||
|
setting->data.s = nullptr;
|
||||||
|
RE::INISettingCollection::GetSingleton()->WriteSetting(setting);
|
||||||
|
|
||||||
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton());
|
SKSE::GetModCallbackEventSource()->AddEventSink(EventListener::GetSingleton());
|
||||||
RE::UI::GetSingleton()->AddEventSink<RE::MenuOpenCloseEvent>(EventListener::GetSingleton());
|
RE::UI::GetSingleton()->AddEventSink<RE::MenuOpenCloseEvent>(EventListener::GetSingleton());
|
||||||
|
|
||||||
@ -157,7 +166,7 @@ SKSEPluginLoad(const LoadInterface* skse) {
|
|||||||
AchievementFix::Install();
|
AchievementFix::Install();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!IsVR()) {
|
if (!REL::Module::IsVR()) {
|
||||||
if (g_settings.at("FlatMapMarkers")) {
|
if (g_settings.at("FlatMapMarkers")) {
|
||||||
logger::info("Initializing Flat Map Markers...");
|
logger::info("Initializing Flat Map Markers...");
|
||||||
FlatMapMarkers::Install();
|
FlatMapMarkers::Install();
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Based on powerofthree's Tweaks 1.8.1 by powerofthree (MIT)
|
|
||||||
namespace MapMarkerPlacement
|
namespace MapMarkerPlacement
|
||||||
{
|
{
|
||||||
constexpr std::uint8_t NOP{ 0x90 };
|
constexpr std::uint8_t NOP{ 0x90 };
|
||||||
@ -20,6 +19,7 @@ namespace MapMarkerPlacement
|
|||||||
static inline REL::Relocation<decltype(thunk)> func;
|
static inline REL::Relocation<decltype(thunk)> func;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Based on powerofthree's Tweaks 1.8.1 by powerofthree (MIT)
|
||||||
void InstallPlacementDiscoveredFix()
|
void InstallPlacementDiscoveredFix()
|
||||||
{
|
{
|
||||||
// Place a marker, if a location has been discovered and fast travel is disabled
|
// Place a marker, if a location has been discovered and fast travel is disabled
|
||||||
|
|||||||
@ -24,16 +24,6 @@ inline uint8_t NewGameCount(bool increment = false)
|
|||||||
return g_NewGameStarted;
|
return g_NewGameStarted;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool IsSE()
|
|
||||||
{
|
|
||||||
return GetLoadInterface()->RuntimeVersion().minor() == 5;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline bool IsVR()
|
|
||||||
{
|
|
||||||
return GetLoadInterface()->RuntimeVersion() == SKSE::RUNTIME_VR_1_4_15 || GetLoadInterface()->RuntimeVersion() == SKSE::RUNTIME_LATEST_VR;
|
|
||||||
}
|
|
||||||
|
|
||||||
inline void CheckIncompatibleMods()
|
inline void CheckIncompatibleMods()
|
||||||
{
|
{
|
||||||
bool bPrinted = false;
|
bool bPrinted = false;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user