Compare commits
2 Commits
9442c10d26
...
e3b11ce1ac
| Author | SHA1 | Date | |
|---|---|---|---|
| e3b11ce1ac | |||
| 96f0e89d72 |
@ -5,3 +5,4 @@ AchievementFix = true
|
||||
VideoInterruptPatch = true
|
||||
ForceBorderless = true
|
||||
AttachLightHitEffectCrashFix = true
|
||||
AutoScaleHeroMenu = true
|
||||
|
||||
Binary file not shown.
@ -23,7 +23,8 @@ static std::map<std::string, bool> g_settings{
|
||||
{ "AchievementFix", true },
|
||||
{ "VideoInterruptPatch", true },
|
||||
{ "ForceBorderless", true },
|
||||
{ "AttachLightHitEffectCrashFix", true }
|
||||
{ "AttachLightHitEffectCrashFix", true },
|
||||
{ "AutoScaleHeroMenu", true }
|
||||
};
|
||||
|
||||
namespace {
|
||||
@ -191,14 +192,14 @@ SKSEPluginLoad(const LoadInterface* skse) {
|
||||
|
||||
GetPapyrusInterface()->Register(Papyrus::Bind);
|
||||
|
||||
LoadINI(&g_settings, "Data/SKSE/Plugins/EnderalSE.ini");
|
||||
|
||||
MainMenuPatch::Install();
|
||||
DialogueMenuPatch::Install();
|
||||
HeroMenuPatch::Install();
|
||||
HeroMenuPatch::Install(g_settings.at("AutoScaleHeroMenu"));
|
||||
TweenMenuPatch::Install();
|
||||
HUDMenuPatch::Install();
|
||||
|
||||
LoadINI(&g_settings, "Data/SKSE/Plugins/EnderalSE.ini");
|
||||
|
||||
if (g_settings.at("AchievementFix")) {
|
||||
logger::info("Patching achievements...");
|
||||
AchievementFix::Install();
|
||||
|
||||
@ -21,8 +21,14 @@ RE::BSEventNotifyControl HeroMenuPatch::ProcessEvent_Hook(RE::InputEvent** a_eve
|
||||
return _ProcessEvent(this, a_event, a_source);
|
||||
}
|
||||
|
||||
void HeroMenuPatch::Install()
|
||||
void HeroMenuPatch::Install(bool aAutoScaleHeroMenu)
|
||||
{
|
||||
HeroMenuPatch::bAutoScaleHeroMenu = aAutoScaleHeroMenu;
|
||||
|
||||
if (HeroMenuPatch::bAutoScaleHeroMenu) {
|
||||
logger::info("Hero menu autoscaling has been enabled.");
|
||||
}
|
||||
|
||||
// Patch MenuControls to close the menu
|
||||
REL::Relocation<std::uintptr_t> vTable(RE::VTABLE_MenuControls[0]);
|
||||
_ProcessEvent = vTable.write_vfunc(0x1, &HeroMenuPatch::ProcessEvent_Hook);
|
||||
@ -80,7 +86,7 @@ void HeroMenuPatch::FillMenuValues()
|
||||
return;
|
||||
}
|
||||
|
||||
if (!REL::Module::IsVR()) {
|
||||
if (HeroMenuPatch::bAutoScaleHeroMenu && !REL::Module::IsVR()) {
|
||||
// Fit the movie into the screen (widescreen support)
|
||||
uiMovie->SetViewScaleMode(RE::BSScaleformManager::ScaleModeType::kShowAll);
|
||||
}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
class HeroMenuPatch : public RE::MenuControls
|
||||
{
|
||||
public:
|
||||
static void Install();
|
||||
static void Install(bool bAutoScaleHeroMenu = true);
|
||||
|
||||
static uint64_t OpenStats(uint32_t arg_1, uint32_t arg_2, uint32_t arg_3, uint32_t arg_4, uint32_t arg_5);
|
||||
|
||||
@ -19,4 +19,6 @@ public:
|
||||
|
||||
using ProcessEvent_t = decltype(static_cast<RE::BSEventNotifyControl (RE::MenuControls::*)(RE::InputEvent* const*, RE::BSTEventSource<RE::InputEvent*>*)>(&RE::MenuControls::ProcessEvent));
|
||||
static inline REL::Relocation<ProcessEvent_t> _ProcessEvent;
|
||||
|
||||
inline static bool bAutoScaleHeroMenu;
|
||||
};
|
||||
|
||||
@ -1,11 +1,15 @@
|
||||
Scriptname _00E_Complex_AddSilenceSC extends ObjectReference
|
||||
|
||||
; Eddoursul: Reworked in 2.1.4 to use states and the OnTrigger() event to encure silence track removal
|
||||
|
||||
Event OnTriggerEnter(ObjectReference akActionRef)
|
||||
|
||||
If akActionRef == PlayerREF
|
||||
If (__Config_QuestToSet.GetCurrentStageID() >= __Config_iMinStage) && (__Config_QuestToSet.GetCurrentStageID() <= __Config_iMaxStage)
|
||||
_00E_SilenceLongTransitionHighPriority.Add()
|
||||
bActive = true
|
||||
If (__Config_QuestToSet.GetCurrentStageID() >= __Config_iMinStage) && (__Config_QuestToSet.GetCurrentStageID() <= __Config_iMaxStage)
|
||||
if GetState() == ""
|
||||
_00E_SilenceLongTransitionHighPriority.Add()
|
||||
GoToState("WaitLeave")
|
||||
endif
|
||||
EndIf
|
||||
EndIf
|
||||
|
||||
@ -15,27 +19,52 @@ Event OnTriggerLeave(ObjectReference akActionRef)
|
||||
|
||||
If akActionRef == PlayerREF
|
||||
_00E_SilenceLongTransitionHighPriority.Remove()
|
||||
GoToState("")
|
||||
UnregisterForUpdate()
|
||||
bActive = false
|
||||
;Debug.Notification("Leaving area")
|
||||
EndIf
|
||||
|
||||
EndEvent
|
||||
|
||||
; 2.1.4 Failsafe to ensure silence removal when OnTriggerLeave does not fire
|
||||
Event OnTrigger(ObjectReference akActionRef)
|
||||
If bActive && akActionRef == PlayerREF
|
||||
RegisterForSingleUpdate(3.0)
|
||||
EndIf
|
||||
EndEvent
|
||||
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
|
||||
;
|
||||
endEvent
|
||||
|
||||
Event OnUpdate()
|
||||
_00E_SilenceLongTransitionHighPriority.Remove()
|
||||
bActive = false
|
||||
EndEvent
|
||||
State WaitLeave
|
||||
|
||||
Event OnBeginState()
|
||||
RegisterForSingleUpdate(3.0)
|
||||
;Debug.Notification("Waiting to leave")
|
||||
EndEvent
|
||||
|
||||
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
|
||||
if akTarget == PlayerREF
|
||||
; Remove silence on combat start
|
||||
if aeCombatState == 1
|
||||
GoToState("")
|
||||
endif
|
||||
endif
|
||||
endEvent
|
||||
|
||||
Event OnTrigger(ObjectReference akActionRef)
|
||||
If akActionRef == PlayerREF
|
||||
RegisterForSingleUpdate(3.0)
|
||||
EndIf
|
||||
EndEvent
|
||||
|
||||
Event OnUpdate()
|
||||
GoToState("")
|
||||
EndEvent
|
||||
|
||||
Event OnEndState()
|
||||
_00E_SilenceLongTransitionHighPriority.Remove()
|
||||
;Debug.Notification("Leaving area")
|
||||
EndEvent
|
||||
|
||||
EndState
|
||||
|
||||
int Property __Config_iMinStage Auto
|
||||
int Property __Config_iMaxStage Auto
|
||||
Actor Property PlayerREF Auto
|
||||
Quest Property __Config_QuestToSet Auto
|
||||
MusicType Property _00E_SilenceLongTransitionHighPriority Auto
|
||||
bool bActive
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user