Compare commits
6 Commits
6a32933f98
...
bb475b50d1
Author | SHA1 | Date |
---|---|---|
Eddoursul | bb475b50d1 | 3 months ago |
Eddoursul | f138873023 | 3 months ago |
Eddoursul | e8b554a48a | 3 months ago |
Eddoursul | de5bf15227 | 3 months ago |
Eddoursul | 8d9506695c | 3 months ago |
Eddoursul | ee06019992 | 3 months ago |
16 changed files with 138 additions and 54 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,73 @@ |
||||
#pragma once |
||||
|
||||
class MainMenuPatch : public RE::MainMenu |
||||
{ |
||||
public: |
||||
static void Install() |
||||
{ |
||||
REL::Relocation<uintptr_t> vtbl(RE::VTABLE_MainMenu[0]); |
||||
_ProcessMessage = vtbl.write_vfunc(0x4, &ProcessMessageEx); |
||||
} |
||||
|
||||
private: |
||||
void ProcessEx(RE::GPtr<RE::GFxMovieView> a_movie) |
||||
{ |
||||
RE::GFxValue entryList; |
||||
if (!uiMovie->Invoke("_root.MenuHolder.Menu_mc.MainList.__get__entryList", &entryList, nullptr, 0)) { |
||||
return; |
||||
} |
||||
|
||||
std::array values{ |
||||
"$CREATIONS", |
||||
"$CREATION CLUB", |
||||
"$DOWNLOADABLE CONTENT", |
||||
"$MOD MANAGER", |
||||
"$HELP", |
||||
}; |
||||
|
||||
bool bUpdated = false; |
||||
const auto size = entryList.GetArraySize(); |
||||
for (uint32_t i = size; i > 0; i--) { |
||||
RE::GFxValue entry; |
||||
if (!entryList.GetElement(i - 1, &entry)) |
||||
continue; |
||||
|
||||
RE::GFxValue entryText; |
||||
if (!entry.GetMember("text", &entryText)) |
||||
continue; |
||||
|
||||
const std::string text = entryText.GetString(); |
||||
|
||||
if (text.empty()) |
||||
continue; |
||||
|
||||
for (const auto name : values) { |
||||
if (text == name) { |
||||
bUpdated = true; |
||||
entryList.RemoveElement(i - 1); |
||||
} |
||||
} |
||||
} |
||||
|
||||
if (bUpdated) { |
||||
uiMovie->Invoke("_root.MenuHolder.Menu_mc.MainList.InvalidateData", nullptr, nullptr, 0); |
||||
} |
||||
} |
||||
|
||||
RE::UI_MESSAGE_RESULTS ProcessMessageEx(RE::UIMessage* a_message) |
||||
{ |
||||
if (a_message->type == RE::UI_MESSAGE_TYPE::kShow) { |
||||
_show = true; |
||||
} else if (_show && (iIterations < 15) && a_message->type == RE::UI_MESSAGE_TYPE::kUpdate) { |
||||
iIterations++; |
||||
ProcessEx(uiMovie); |
||||
} |
||||
|
||||
return _ProcessMessage(this, a_message); |
||||
} |
||||
|
||||
inline static REL::Relocation<decltype(&ProcessMessageEx)> _ProcessMessage; |
||||
|
||||
inline static bool _show{ false }; |
||||
inline static uint32_t iIterations{ 0 }; |
||||
}; |
@ -0,0 +1,39 @@ |
||||
Scriptname _00E_MQ101_QuickStart extends Quest |
||||
|
||||
function Init() |
||||
|
||||
MQP01.CompleteAllObjectives() |
||||
MQP01.CompleteQuest() |
||||
MQP01.Stop() |
||||
|
||||
MQP02.CompleteAllObjectives() |
||||
MQP02.CompleteQuest() |
||||
MQP02.Stop() |
||||
|
||||
Utility.wait(0.5) |
||||
|
||||
If _00E_VideoSkip.GetValueInt() == 0 && EnderalFunctions.VideoSupport() |
||||
Game.PlayBink("MQP03NearDeathExperience.bik", true) |
||||
EndIf |
||||
|
||||
Actor PlayerREF = Game.GetForm(0x14) as Actor |
||||
PlayerREF.MoveTo(_00E_ClassMenuOrigin) |
||||
|
||||
Debug.SendAnimationEvent(PlayerRef, "IdleForceDefaultState") |
||||
Game.ShowRaceMenu() |
||||
(MQP02 as _00E_MQP02_Functions).AddRacialAbilites() |
||||
|
||||
bool bDisableFighting = SKSE.GetVersion() > 0 && ! EnderalFunctions.IsVR() |
||||
Game.DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) |
||||
|
||||
MQP03.SetCurrentStageID(15) |
||||
|
||||
endfunction |
||||
|
||||
Quest Property MQP01 Auto |
||||
Quest Property MQP02 Auto |
||||
Quest Property MQP03 Auto |
||||
|
||||
GlobalVariable Property _00E_VideoSkip Auto |
||||
|
||||
ObjectReference Property _00E_ClassMenuOrigin Auto |
@ -1,47 +0,0 @@ |
||||
Scriptname _00E_MQP01_StartSC extends ObjectReference |
||||
|
||||
Event OnTriggerEnter (ObjectReference akActionREF) |
||||
|
||||
if akActionRef == PlayerREF && !bDone |
||||
bDone = true |
||||
Disable() |
||||
If ! MQP01.IsCompleted() && MQ10a.GetCurrentStageID() != 5 && !MQ10a.IsRunning() && !MQ12c.IsRunning() |
||||
if _00E_QuickStartPrompt.Show() > 0 |
||||
MQP01.CompleteAllObjectives() |
||||
MQP01.CompleteQuest() |
||||
MQP02.CompleteAllObjectives() |
||||
MQP02.CompleteQuest() |
||||
Utility.wait(0.5) |
||||
If _00E_VideoSkip.GetValueInt() == 0 && EnderalFunctions.VideoSupport() |
||||
Game.PlayBink("MQP03NearDeathExperience.bik", true) |
||||
EndIf |
||||
PlayerREF.MoveTo(_00E_ClassMenuOrigin) |
||||
Debug.SendAnimationEvent(PlayerRef, "IdleForceDefaultState") |
||||
Game.ShowRaceMenu() |
||||
bool bDisableFighting = SKSE.GetVersion() > 0 && ! EnderalFunctions.IsVR() |
||||
Game.DisablePlayerControls(false, bDisableFighting, true, false, true, false, false, true) |
||||
MQP03.SetCurrentStageID(15) |
||||
(MQP02 as _00E_MQP02_Functions).AddRacialAbilites() |
||||
else |
||||
MQP01.SetCurrentStageID(10) |
||||
endif |
||||
EndIf |
||||
EndIf |
||||
|
||||
EndEvent |
||||
|
||||
bool bDone |
||||
|
||||
Quest Property MQP01 Auto |
||||
Quest Property MQP02 Auto |
||||
Quest Property MQP03 Auto |
||||
Quest Property MQ12c Auto |
||||
Quest Property MQ10a Auto |
||||
|
||||
Actor Property PlayerREF Auto |
||||
|
||||
Message Property _00E_QuickStartPrompt Auto |
||||
|
||||
ObjectReference Property _00E_ClassMenuOrigin Auto |
||||
|
||||
GlobalVariable Property _00E_VideoSkip Auto |
Loading…
Reference in new issue