diff --git a/Enderal SE v2.0.12 Changelog.txt b/Enderal SE v2.0.12 Changelog.txt index 68300779..af4aa22c 100644 --- a/Enderal SE v2.0.12 Changelog.txt +++ b/Enderal SE v2.0.12 Changelog.txt @@ -22,7 +22,8 @@ Beware, spoilers ahead! - Merged Armor Addon Fix for Qyranians and Arazealeans by SatansFetusLegs (thanks!). - Fixed incorrect water type near a bandit camp near Ark (reported by Atmene). - Added a bug report link to the main menu, opening the Enderal SE discord. -- To work around the engine bug, causing skills to level up after starting new game twice, Enderal now requires full game restart, if user wants to start a new game after quitting to the main menu. +- To work around the engine bug, causing skills to level up, Enderal now requires full game restart, if user wants to start a new game after quitting to the main menu. +- Moved SetActorScale from _00E_QuestFunctions to a dedicated script to workaround the issue, when users overwrite _00E_QuestFunctions installing outdated mods and break player rescaling. - Fixed behavior of two dogs in the Noble Quarter, they no longer sit in one place through the whole game. - You can now keep the second Rune Key from the Abandoned Temple. - Added the VendorItemFoodRaw keyword to fruits and vegetables. diff --git a/scripts/_00e_cqc05_functions.pex b/scripts/_00e_cqc05_functions.pex index 72a4949a..b92f5d6e 100644 Binary files a/scripts/_00e_cqc05_functions.pex and b/scripts/_00e_cqc05_functions.pex differ diff --git a/scripts/_00e_cqj05_functions.pex b/scripts/_00e_cqj05_functions.pex index 8afe11a6..9b69ad9b 100644 Binary files a/scripts/_00e_cqj05_functions.pex and b/scripts/_00e_cqj05_functions.pex differ diff --git a/scripts/_00e_mq10a_functions.pex b/scripts/_00e_mq10a_functions.pex index 72351d8d..8db627ec 100644 Binary files a/scripts/_00e_mq10a_functions.pex and b/scripts/_00e_mq10a_functions.pex differ diff --git a/scripts/_00e_mq12c_functions.pex b/scripts/_00e_mq12c_functions.pex index 0ebd72ba..a4076906 100644 Binary files a/scripts/_00e_mq12c_functions.pex and b/scripts/_00e_mq12c_functions.pex differ diff --git a/scripts/_00e_nq_g_07_functions.pex b/scripts/_00e_nq_g_07_functions.pex index bc2099ec..0d9b8755 100644 Binary files a/scripts/_00e_nq_g_07_functions.pex and b/scripts/_00e_nq_g_07_functions.pex differ diff --git a/scripts/_00e_setactorscale.pex b/scripts/_00e_setactorscale.pex new file mode 100644 index 00000000..b53eae6c Binary files /dev/null and b/scripts/_00e_setactorscale.pex differ diff --git a/source/scripts/_00e_cqc05_functions.psc b/source/scripts/_00e_cqc05_functions.psc index 20bd3cbb..34680a14 100644 --- a/source/scripts/_00e_cqc05_functions.psc +++ b/source/scripts/_00e_cqc05_functions.psc @@ -130,7 +130,7 @@ Function PlayKiss() _00E_MC_CaliaREF.UnEquipItem(Torch01, True) _FS_TheriantrophistControlQuest.TransformBackIfTransformed() If Player.GetRace() == HighElfRace - fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) + fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.92) EndIf Int iHand = 0 diff --git a/source/scripts/_00e_cqj05_functions.psc b/source/scripts/_00e_cqj05_functions.psc index b73f0669..bd55fa0b 100644 --- a/source/scripts/_00e_cqj05_functions.psc +++ b/source/scripts/_00e_cqj05_functions.psc @@ -49,7 +49,7 @@ Function PlayKissAnimation() _00E_QuestFunctions.EndWerewolfModeWhenTransformed() If Player.GetRace() == HighElfRace - fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) + fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.92) EndIf If PlayerREF.GetEquippedShield() != None diff --git a/source/scripts/_00e_mq10a_functions.psc b/source/scripts/_00e_mq10a_functions.psc index 8ee16e07..93b64fdd 100644 --- a/source/scripts/_00e_mq10a_functions.psc +++ b/source/scripts/_00e_mq10a_functions.psc @@ -15,7 +15,7 @@ Function SetUpScene() MQ10a_SC1_HeartParentREF.Enable() Levelsystem.RemoveSilence() PlayerREF.MoveTo(PlayerStartMarkerNew) - fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) + fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.85) Levelsystem.SkipTimeToHour(18.4) Game.ForceFirstPerson() _00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0 diff --git a/source/scripts/_00e_mq12c_functions.psc b/source/scripts/_00e_mq12c_functions.psc index b02dc706..4ec48364 100644 --- a/source/scripts/_00e_mq12c_functions.psc +++ b/source/scripts/_00e_mq12c_functions.psc @@ -254,7 +254,7 @@ Function StartSC03() _00E_QuestFunctions.PlayerAIWalkStop() Game.ShowFirstPersonGeometry(False) Game.RequestAutoSave() - fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) + fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.85) TimeScale.SetValue(0.1) Levelsystem.SkipTimeToHour(18.5) ImageSpaceModifier.RemoveCrossFade(3) diff --git a/source/scripts/_00e_nq_g_07_functions.psc b/source/scripts/_00e_nq_g_07_functions.psc index d64f7feb..49505129 100644 --- a/source/scripts/_00e_nq_g_07_functions.psc +++ b/source/scripts/_00e_nq_g_07_functions.psc @@ -486,7 +486,7 @@ EndFunction Function PlayKiss() If PlayerREF.GetActorBase().GetRace() == HighElfRace - fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) + fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.92) EndIf PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) diff --git a/source/scripts/_00e_setactorscale.psc b/source/scripts/_00e_setactorscale.psc new file mode 100644 index 00000000..5053590e --- /dev/null +++ b/source/scripts/_00e_setactorscale.psc @@ -0,0 +1,14 @@ +Scriptname _00E_SetActorScale Hidden + +Float Function Change(Actor akActor, Float fNewScale) Global + + ; Sets the scale of akActor to fNewScale and returns the old scale. + ; This is a workaround for GetScale() returning the cumulative scale of Race.Height * Actor.Scale for actors. + ; So it results in a messed up scale if the value returned by GetScale() is used to revert the scale change for an actor whose race has a non-1.00 height (for example, HighElfRace) + + Float fOriginalScale = akActor.GetScale() + akActor.SetScale(fNewScale) + ; Now use the known fNewScale and the return of GetScale() to get the race height coeff, and apply that coeff to fOriginalScale to calculate the true actor's reference scale. + Return fOriginalScale * fNewScale / akActor.GetScale() + +EndFunction