From 8ba471d63392e5b07a00c3e563b545191cf96a96 Mon Sep 17 00:00:00 2001 From: shad0wshayd3 Date: Thu, 16 May 2024 16:09:00 -0600 Subject: [PATCH] misc fixes --- .gitmodules | 2 +- Plugin/src/Menus/Scaleform.h | 18 ++++++++--------- Plugin/src/Systems/Skills.cpp | 38 +++++++++++++++++------------------ Plugin/src/main.cpp | 5 ++--- extern/CommonLibF4 | 2 +- 5 files changed, 32 insertions(+), 33 deletions(-) diff --git a/.gitmodules b/.gitmodules index 2cfb81d..d05d334 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,6 @@ [submodule "extern/CommonLibF4"] path = extern/CommonLibF4 - url = https://github.com/FalloutCascadia/CommonLibF4.git + url = https://github.com/shad0wshayd3-FO4/CommonLibF4.git [submodule "extern/DKUtil"] path = extern/DKUtil url = https://github.com/shad0wshayd3/DKUtil.git diff --git a/Plugin/src/Menus/Scaleform.h b/Plugin/src/Menus/Scaleform.h index 29c0963..e2cd92d 100644 --- a/Plugin/src/Menus/Scaleform.h +++ b/Plugin/src/Menus/Scaleform.h @@ -285,15 +285,15 @@ namespace RE bool RegisterScaleform(Scaleform::GFx::Movie* a_view, Scaleform::GFx::Value* a_value) { - Scaleform::GFx::Value currentSWFPath; - if (a_view->asMovieRoot->GetVariable(¤tSWFPath, "root.loaderInfo.url")) - { - if (_stricmp(currentSWFPath.GetString(), "Interface/DialogueMenu.swf") == 0) - { - a_view->asMovieRoot->Invoke("root.XDI_Init", nullptr, nullptr, 0); - INFO("root.XDI_Init"); - } - } + // Scaleform::GFx::Value currentSWFPath; + // if (a_view->asMovieRoot->GetVariable(¤tSWFPath, "root.loaderInfo.url")) + // { + // if (_stricmp(currentSWFPath.GetString(), "Interface/DialogueMenu.swf") == 0) + // { + // a_view->asMovieRoot->Invoke("root.XDI_Init", nullptr, nullptr, 0); + // INFO("root.XDI_Init"); + // } + // } return true; } } diff --git a/Plugin/src/Systems/Skills.cpp b/Plugin/src/Systems/Skills.cpp index 607467a..ba240c3 100644 --- a/Plugin/src/Systems/Skills.cpp +++ b/Plugin/src/Systems/Skills.cpp @@ -228,27 +228,27 @@ namespace RE bool DefineSkillsFormsFromGame() { // Cascadia Actor Values - CascadiaActorValues.Barter = TESDataHandler::GetSingleton()->LookupForm(996845, "FalloutCascadia.esm"); //HEX: F35ED - CascadiaActorValues.EnergyWeapons = TESDataHandler::GetSingleton()->LookupForm(996846, "FalloutCascadia.esm"); //HEX: F35EE - CascadiaActorValues.Explosives = TESDataHandler::GetSingleton()->LookupForm(996847, "FalloutCascadia.esm"); //HEX: F35EF - CascadiaActorValues.Guns = TESDataHandler::GetSingleton()->LookupForm(996848, "FalloutCascadia.esm"); //HEX: F35F0 - CascadiaActorValues.Lockpick = TESDataHandler::GetSingleton()->LookupForm(996849, "FalloutCascadia.esm"); //HEX: F35F1 - CascadiaActorValues.Medicine = TESDataHandler::GetSingleton()->LookupForm(996850, "FalloutCascadia.esm"); //HEX: F35F2 - CascadiaActorValues.MeleeWeapons = TESDataHandler::GetSingleton()->LookupForm(996851, "FalloutCascadia.esm"); //HEX: F35F3 - CascadiaActorValues.Repair = TESDataHandler::GetSingleton()->LookupForm(996852, "FalloutCascadia.esm"); //HEX: F35F4 - CascadiaActorValues.Science = TESDataHandler::GetSingleton()->LookupForm(996853, "FalloutCascadia.esm"); //HEX: F35F5 - CascadiaActorValues.Sneak = TESDataHandler::GetSingleton()->LookupForm(996854, "FalloutCascadia.esm"); //HEX: F35F6 - CascadiaActorValues.Speech = TESDataHandler::GetSingleton()->LookupForm(996855, "FalloutCascadia.esm"); //HEX: F35F7 - CascadiaActorValues.Survival = TESDataHandler::GetSingleton()->LookupForm(996856, "FalloutCascadia.esm"); //HEX: F35F8 - CascadiaActorValues.Unarmed = TESDataHandler::GetSingleton()->LookupForm(996857, "FalloutCascadia.esm"); //HEX: F35F9 + CascadiaActorValues.Barter = TESDataHandler::GetSingleton()->LookupForm(0x0F35ED, "FalloutCascadia.esm"); + CascadiaActorValues.EnergyWeapons = TESDataHandler::GetSingleton()->LookupForm(0x0F35EE, "FalloutCascadia.esm"); + CascadiaActorValues.Explosives = TESDataHandler::GetSingleton()->LookupForm(0x0F35EF, "FalloutCascadia.esm"); + CascadiaActorValues.Guns = TESDataHandler::GetSingleton()->LookupForm(0x0F35F0, "FalloutCascadia.esm"); + CascadiaActorValues.Lockpick = TESDataHandler::GetSingleton()->LookupForm(0x0F35F1, "FalloutCascadia.esm"); + CascadiaActorValues.Medicine = TESDataHandler::GetSingleton()->LookupForm(0x0F35F2, "FalloutCascadia.esm"); + CascadiaActorValues.MeleeWeapons = TESDataHandler::GetSingleton()->LookupForm(0x0F35F3, "FalloutCascadia.esm"); + CascadiaActorValues.Repair = TESDataHandler::GetSingleton()->LookupForm(0x0F35F4, "FalloutCascadia.esm"); + CascadiaActorValues.Science = TESDataHandler::GetSingleton()->LookupForm(0x0F35F5, "FalloutCascadia.esm"); + CascadiaActorValues.Sneak = TESDataHandler::GetSingleton()->LookupForm(0x0F35F6, "FalloutCascadia.esm"); + CascadiaActorValues.Speech = TESDataHandler::GetSingleton()->LookupForm(0x0F35F7, "FalloutCascadia.esm"); + CascadiaActorValues.Survival = TESDataHandler::GetSingleton()->LookupForm(0x0F35F8, "FalloutCascadia.esm"); + CascadiaActorValues.Unarmed = TESDataHandler::GetSingleton()->LookupForm(0x0F35F9, "FalloutCascadia.esm"); // Cascadia Perks - CascadiaPerks.WeaponTypeEnergyWeaponsPerk = TESDataHandler::GetSingleton()->LookupForm(35626494, "FalloutCascadia.esm"); //HEX: 21F9DFE - CascadiaPerks.WeaponTypeExplosivesPerk = TESDataHandler::GetSingleton()->LookupForm(35626495, "FalloutCascadia.esm"); //HEX: 21F9DFF - CascadiaPerks.WeaponTypeMeleeWeaponsPerk = TESDataHandler::GetSingleton()->LookupForm(35626496, "FalloutCascadia.esm"); //HEX: 21F9E00 - CascadiaPerks.WeaponTypeGunsPerk = TESDataHandler::GetSingleton()->LookupForm(35626497, "FalloutCascadia.esm"); //HEX: 21F9E01 - CascadiaPerks.WeaponTypeUnarmedPerk = TESDataHandler::GetSingleton()->LookupForm(35626498, "FalloutCascadia.esm"); //HEX: 21F9E02 - CascadiaPerks.WeaponConditionHandlerPerk = TESDataHandler::GetSingleton()->LookupForm(35626499, "FalloutCascadia.esm"); //HEX: 21F9E04 + CascadiaPerks.WeaponTypeEnergyWeaponsPerk = TESDataHandler::GetSingleton()->LookupForm(0x1F9DFE, "FalloutCascadia.esm"); + CascadiaPerks.WeaponTypeExplosivesPerk = TESDataHandler::GetSingleton()->LookupForm(0x1F9DFF, "FalloutCascadia.esm"); + CascadiaPerks.WeaponTypeMeleeWeaponsPerk = TESDataHandler::GetSingleton()->LookupForm(0x1F9E00, "FalloutCascadia.esm"); + CascadiaPerks.WeaponTypeGunsPerk = TESDataHandler::GetSingleton()->LookupForm(0x1F9E01, "FalloutCascadia.esm"); + CascadiaPerks.WeaponTypeUnarmedPerk = TESDataHandler::GetSingleton()->LookupForm(0x1F9E02, "FalloutCascadia.esm"); + CascadiaPerks.WeaponConditionHandlerPerk = TESDataHandler::GetSingleton()->LookupForm(0x1F9E04, "FalloutCascadia.esm"); // Cascadia Skills List CascadiaSkillsList.emplace_back(CascadiaActorValues.Barter); diff --git a/Plugin/src/main.cpp b/Plugin/src/main.cpp index 8b660b8..85aebda 100644 --- a/Plugin/src/main.cpp +++ b/Plugin/src/main.cpp @@ -98,14 +98,13 @@ DLLEXPORT bool F4SEAPI F4SEPlugin_Load(const F4SE::LoadInterface* a_F4SE) return false; } - const F4SE::ScaleformInterface* scaleform = F4SE::GetScaleformInterface(); - /*if (!RE::Cascadia::CAS_DialogueMenu::Install()) { WARN("DialogueMenu - failed to install hooks."); }*/ - if (!scaleform->Register("Cascadia", RE::Cascadia::RegisterScaleform)) + const auto scaleform = F4SE::GetScaleformInterface(); + if (!scaleform || !scaleform->Register("Cascadia", RE::Cascadia::RegisterScaleform)) { FATAL("Failed to register scaleform callback, marking as incompatible."sv); return false; diff --git a/extern/CommonLibF4 b/extern/CommonLibF4 index 64b25f7..ae91c5e 160000 --- a/extern/CommonLibF4 +++ b/extern/CommonLibF4 @@ -1 +1 @@ -Subproject commit 64b25f76ae794089a949b6342b3e10e3c6510769 +Subproject commit ae91c5e112d6c19b50a29e6520a69fe4e4b2d22e