diff --git a/For the Greater Good fixes.esp b/For the Greater Good fixes.esp new file mode 100644 index 00000000..da595dcd Binary files /dev/null and b/For the Greater Good fixes.esp differ diff --git a/scripts/PF_MQ14_SC06_ToriusStandStil_0003C597.pex b/scripts/PF_MQ14_SC06_ToriusStandStil_0003C597.pex new file mode 100644 index 00000000..f7768b22 Binary files /dev/null and b/scripts/PF_MQ14_SC06_ToriusStandStil_0003C597.pex differ diff --git a/scripts/_00e_mq14_functions.pex b/scripts/_00e_mq14_functions.pex index 70870c91..7d5e5d85 100644 Binary files a/scripts/_00e_mq14_functions.pex and b/scripts/_00e_mq14_functions.pex differ diff --git a/scripts/_00e_mq15_functions.pex b/scripts/_00e_mq15_functions.pex index 53cb894f..5f487b92 100644 Binary files a/scripts/_00e_mq15_functions.pex and b/scripts/_00e_mq15_functions.pex differ diff --git a/scripts/sf_mq14_sc07_planning_0014342f.pex b/scripts/sf_mq14_sc07_planning_0014342f.pex index 2b9a34fc..f45517bd 100644 Binary files a/scripts/sf_mq14_sc07_planning_0014342f.pex and b/scripts/sf_mq14_sc07_planning_0014342f.pex differ diff --git a/source/scripts/PF_MQ14_SC06_ToriusStandStil_0003C597.psc b/source/scripts/PF_MQ14_SC06_ToriusStandStil_0003C597.psc new file mode 100644 index 00000000..86146132 --- /dev/null +++ b/source/scripts/PF_MQ14_SC06_ToriusStandStil_0003C597.psc @@ -0,0 +1,18 @@ +;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment +;NEXT FRAGMENT INDEX 3 +Scriptname PF_MQ14_SC06_ToriusStandStil_0003C597 Extends Package Hidden + +;BEGIN FRAGMENT Fragment_2 +Function Fragment_2(Actor akActor) +;BEGIN CODE +MQ14_SC06_FlammentrunkREF.MoveTo(MQ14_SC06_TraitorRef) +MQ14_SC06_FlammentrunkREF.SetLookAt(MQ14_SC06_TraitorRef) +;END CODE +EndFunction +;END FRAGMENT + +;END FRAGMENT CODE - Do not edit anything between this and the begin comment + +Actor Property MQ14_SC06_FlammentrunkREF Auto + +Actor Property MQ14_SC06_TraitorRef Auto diff --git a/source/scripts/_00e_mq14_functions.psc b/source/scripts/_00e_mq14_functions.psc index 80c4ccd9..d732a911 100644 --- a/source/scripts/_00e_mq14_functions.psc +++ b/source/scripts/_00e_mq14_functions.psc @@ -395,48 +395,48 @@ Function MoveLeora() EndFunction -Function LeoraUnequipTorch() - - _00E_MC_LeoraREF.UnequipItem(Torch01, true) - _00E_MC_LeoraREF.RemoveItem(Torch01) - -EndFunction - Function FillTraitorScene() MQ14_SC06_TraitorRef.Enable() - MQ14_SC06_FlammentrunkREF.MoveTo(MQ14_SC06_TraitorRef) akCompanion.MoveTo(MQ14_SC06_CompanionMarker) - _00E_BloodyFXShader.Play(MQ14_SC06_TraitorRef) _00E_MC_YuslanREF.MoveTo(MQ14_SC06_CompanionMarker001) - int iIndex = MQ14_SC06_AvoidNPCFormlist.GetSize() - 1 + + ; _00E_MQ14_SC04_RemoveNPCsFromBeaconSC makes a mess in SC08_SpectatorNPCArray, better clear it + int iIndex = SC08_SpectatorNPCArray.Length - 1 + While iIndex >= 0 + SC08_SpectatorNPCArray[iIndex].Clear() + iIndex -= 1 + Endwhile + + iIndex = MQ14_SC06_AvoidNPCFormlist.GetSize() - 1 While iIndex >= 0 Actor akCurrentActor = MQ14_SC06_AvoidNPCFormlist.GetAt(iIndex) as Actor - akCurrentActor.UnequipItem(Torch01, true, false) - akCurrentActor.RemoveItem(Torch01) - Debug.SendAnimationEvent(akCurrentActor, "returnToDefault") - akCurrentActor.MoveTo(MQ14_SC06_TraitorMarker) - akCurrentActor.SetLookAt(MQ14_SC06_TraitorRef) if Utility.RandomInt(0, 1) >= 0.5 MQ14_SC06_ArkanistFormlist.AddForm(akCurrentActor) - akCurrentActor.SetName("Arkanist") + ;akCurrentActor.GetActorBase().SetName(MQ14_SC04_ArcanistREF.GetActorBase().GetName()) akCurrentActor.SetOutfit(_25E_HolyOrder_ArcanistOutfitNoHood) EndIf - - int NPCsFilled - NPCsFilled += 1 - SC06_AvoidNPCArray[iIndex].ForceRefTo(akCurrentActor) + + akCurrentActor.UnequipItem(Torch01, true, false) + akCurrentActor.RemoveItem(Torch01, 99) akCurrentActor.MoveTo(MQ14_SC06_StandMarkerFormlist.GetAt(iIndex) as ObjectReference) + _00E_QuestFunctions.WaitForReferenceToLoad(akCurrentActor as ObjectReference) + Debug.SendAnimationEvent(akCurrentActor, "IdleStop_Loose") + SC06_AvoidNPCArray[iIndex].ForceRefTo(akCurrentActor) + akCurrentActor.SetLookAt(MQ14_SC06_TraitorRef) iIndex -= 1 Endwhile - MQ14_SC06_FlammentrunkREF.MoveTo(MQ14_SC06_TraitorRef) + ; SE: Moved teleporting MQ14_SC06_FlammentrunkREF to the beginning of his scene package, he goes home if teleported at this point + + _00E_QuestFunctions.WaitForReferenceToLoad(MQ14_SC06_TraitorRef as ObjectReference) + _00E_BloodyFXShader.Play(MQ14_SC06_TraitorRef) EndFunction @@ -452,14 +452,20 @@ Function FadeToBlackTraitor() Utility.Wait(3) MQ14_SC06_TraitorRef.MoveTo(MQ06_SC2_CaliaPortToMarkerSceneDUPLICATE003) MQ14_SC07_KurariumGuard.Enable() - _00E_MC_LeoraREF.UnequipItem(Torch01, True, True) - _00E_MC_LeoraREF.RemoveItem(Torch01, 1) MQ14_SC06_FlammentrunkREF.MoveToMyEditorLocation() _00E_MC_LexREF.MoveTo(MQ14_SC06_SpectatorMarker009) + + int iIndex = MQ14_SC06_AvoidNPCFormlist.GetSize() - 1 + While iIndex >= 0 + (MQ14_SC06_AvoidNPCFormlist.GetAt(iIndex) as Actor).SetLookAt(_00E_MC_TealorREF) + iIndex -= 1 + Endwhile + FadeToBlackBackIMOD.ApplyCrossFade(afFadeDuration = 3.0) + Utility.Wait(1) MQ14_SC07_Planning.ForceStart() - + EndFunction Function AddMusic() @@ -474,22 +480,7 @@ Function StartSC08() MQ14_SC08_LastSpeech.ForceStart() - int iIndex = MQ14_SC08_SpectatorFormlist.GetSize() - 1 - - While iIndex >= 0 - - Actor akCurrentActor = MQ14_SC08_SpectatorFormlist.GetAt(iIndex) as Actor - akCurrentActor.UnequipItem(Torch01, true, false) - akCurrentActor.RemoveItem(Torch01) - Debug.SendAnimationEvent(akCurrentActor, "returnToDefault") - SC06_AvoidNPCArray[iIndex].ForceRefTo(akCurrentActor) - akCurrentActor.SetLookAt(_00E_MC_TealorREF) - SC08_SpectatorNPCArray[iIndex].ForceRefTo(akCurrentActor) - iIndex -= 1 - - Endwhile - - iIndex = 0 + int iIndex = 0 While iIndex < MQ14_SC06_AvoidNPCFormlist.GetSize() @@ -498,8 +489,6 @@ Function StartSC08() akCurrentActor.RemoveItem(Torch01) SC06_AvoidNPCArray[iIndex].ForceRefTo(akCurrentActor) - int NPCsFilled - NPCsFilled += 1 Debug.SendAnimationEvent(akCurrentActor, "returnToDefault") akCurrentActor.SetLookAt(_00E_MC_TealorREF) @@ -507,6 +496,32 @@ Function StartSC08() iIndex += 1 Endwhile + + iIndex = MQ14_SC08_SpectatorFormlist.GetSize() - 1 + + While iIndex >= 0 + + Actor akCurrentActor = MQ14_SC08_SpectatorFormlist.GetAt(iIndex) as Actor + akCurrentActor.UnequipItem(Torch01, true, false) + akCurrentActor.RemoveItem(Torch01) + SC08_SpectatorNPCArray[iIndex].ForceRefTo(akCurrentActor) + + ; SE: Spectators never reach the speech location through doors in time, so we teleport them to doors, and they go by foot from there + if akCurrentActor.GetWorldspace() != SuntempleWorldspace + if Utility.RandomInt(0, 1) >= 0.5 + akCurrentActor.MoveTo(SunTempleEmporiumFrontDoorREF) + else + akCurrentActor.MoveTo(SunTempleQuartersDoorREF) + EndIf + Utility.wait(2.0) + akCurrentActor.ResetAI() + endif + + akCurrentActor.SetLookAt(_00E_MC_TealorREF) + + iIndex -= 1 + + Endwhile EndFunction @@ -590,21 +605,21 @@ Function PlayApplauseAndCheer() MQ14_SC09_Tealor.ForceStart() - iIndex = 0 + iIndex = SC06_AvoidNPCArray.Length - 1 - While iIndex <= MQ14_SC06_AvoidNPCFormlist.GetSize() + While iIndex >= 0 SC06_AvoidNPCArray[iIndex].Clear() - iIndex += 1 + iIndex -= 1 Endwhile - iIndex = 0 + iIndex = SC08_SpectatorNPCArray.Length - 1 - While iIndex <= MQ14_SC08_SpectatorFormlist.GetSize() + While iIndex >= 0 SC08_SpectatorNPCArray[iIndex].Clear() - iIndex += 1 + iIndex -= 1 Endwhile @@ -777,4 +792,7 @@ Scene Property MQ14_SC07_Planning Auto Scene Property MQ14_SC08_LastSpeech Auto Scene Property MQ14_SC09_Tealor Auto -Worldspace Property SuntempleWorldspace Auto \ No newline at end of file +Worldspace Property SuntempleWorldspace Auto +ObjectReference Property SunTempleEmporiumFrontDoorREF Auto + +ObjectReference Property SunTempleQuartersDoorREF Auto diff --git a/source/scripts/_00e_mq15_functions.psc b/source/scripts/_00e_mq15_functions.psc index d6b43369..70595d28 100644 --- a/source/scripts/_00e_mq15_functions.psc +++ b/source/scripts/_00e_mq15_functions.psc @@ -27,25 +27,19 @@ Function SetUp() iIndex -= 1 endwhile - ChooseCompanion() - MQ15_SC01_Flavor_Leora.ForceStart() - - MQ16_StubbornGuardREF.Enable() _00E_SuntempleChroniker02REF.Enable() _00E_SuntempleChroniker02REF.MoveTo(MQ12b_SC14_TealorMarkerREF) MQ16_StubbornGuardREF.MoveTo(MQ07a_SC13_PlayerTeleport) - MQ15_SC02_Flavor_Gate.ForceStart() - If akCompanion.IsDisabled() akCompanion.Enable() EndIf akCompanion.MoveTo(MQ15_SC01_CompanionBenchMarker) MQ15_SC02_DoorREF.BlockActivation(True) - + EndFunction Function ChooseCompanion() diff --git a/source/scripts/sf_mq14_sc07_planning_0014342f.psc b/source/scripts/sf_mq14_sc07_planning_0014342f.psc index 3d0fcdb7..859b2e10 100644 --- a/source/scripts/sf_mq14_sc07_planning_0014342f.psc +++ b/source/scripts/sf_mq14_sc07_planning_0014342f.psc @@ -21,7 +21,8 @@ EndFunction ;BEGIN FRAGMENT Fragment_7 Function Fragment_7() ;BEGIN CODE -MQ14.LeoraUnequipTorch() +_00E_MC_LeoraREF.UnequipItem(Torch01, true) +_00E_MC_LeoraREF.ResetInventory() ;END CODE EndFunction ;END FRAGMENT @@ -45,4 +46,5 @@ EndFunction ;END FRAGMENT CODE - Do not edit anything between this and the begin comment _00E_QuestFunctions Property Levelsystem Auto -_00E_MQ14_Functions Property MQ14 Auto +Actor Property _00E_MC_LeoraREF Auto +Light Property Torch01 Auto \ No newline at end of file