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

This commit is contained in:
Eddoursul 2022-09-07 13:26:42 +02:00
parent 17eda9b80c
commit 4af0bac863
13 changed files with 21 additions and 6 deletions

View File

@ -22,7 +22,8 @@ Beware, spoilers ahead!
- Merged Armor Addon Fix for Qyranians and Arazealeans by SatansFetusLegs (thanks!). - Merged Armor Addon Fix for Qyranians and Arazealeans by SatansFetusLegs (thanks!).
- Fixed incorrect water type near a bandit camp near Ark (reported by Atmene). - 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. - 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. - 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. - You can now keep the second Rune Key from the Abandoned Temple.
- Added the VendorItemFoodRaw keyword to fruits and vegetables. - Added the VendorItemFoodRaw keyword to fruits and vegetables.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -130,7 +130,7 @@ Function PlayKiss()
_00E_MC_CaliaREF.UnEquipItem(Torch01, True) _00E_MC_CaliaREF.UnEquipItem(Torch01, True)
_FS_TheriantrophistControlQuest.TransformBackIfTransformed() _FS_TheriantrophistControlQuest.TransformBackIfTransformed()
If Player.GetRace() == HighElfRace If Player.GetRace() == HighElfRace
fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.92)
EndIf EndIf
Int iHand = 0 Int iHand = 0

View File

@ -49,7 +49,7 @@ Function PlayKissAnimation()
_00E_QuestFunctions.EndWerewolfModeWhenTransformed() _00E_QuestFunctions.EndWerewolfModeWhenTransformed()
If Player.GetRace() == HighElfRace If Player.GetRace() == HighElfRace
fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.92)
EndIf EndIf
If PlayerREF.GetEquippedShield() != None If PlayerREF.GetEquippedShield() != None

View File

@ -15,7 +15,7 @@ Function SetUpScene()
MQ10a_SC1_HeartParentREF.Enable() MQ10a_SC1_HeartParentREF.Enable()
Levelsystem.RemoveSilence() Levelsystem.RemoveSilence()
PlayerREF.MoveTo(PlayerStartMarkerNew) PlayerREF.MoveTo(PlayerStartMarkerNew)
fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.85)
Levelsystem.SkipTimeToHour(18.4) Levelsystem.SkipTimeToHour(18.4)
Game.ForceFirstPerson() Game.ForceFirstPerson()
_00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0 _00E_QuestFunctions.PlayerAIWalkStop() ; workaround for the "uncompiled scripts bug" of patch 1.5.8.0

View File

@ -254,7 +254,7 @@ Function StartSC03()
_00E_QuestFunctions.PlayerAIWalkStop() _00E_QuestFunctions.PlayerAIWalkStop()
Game.ShowFirstPersonGeometry(False) Game.ShowFirstPersonGeometry(False)
Game.RequestAutoSave() Game.RequestAutoSave()
fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.85) fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.85)
TimeScale.SetValue(0.1) TimeScale.SetValue(0.1)
Levelsystem.SkipTimeToHour(18.5) Levelsystem.SkipTimeToHour(18.5)
ImageSpaceModifier.RemoveCrossFade(3) ImageSpaceModifier.RemoveCrossFade(3)

View File

@ -486,7 +486,7 @@ EndFunction
Function PlayKiss() Function PlayKiss()
If PlayerREF.GetActorBase().GetRace() == HighElfRace If PlayerREF.GetActorBase().GetRace() == HighElfRace
fPlayerScale = _00E_QuestFunctions.SetActorScale(PlayerREF, 0.92) fPlayerScale = _00E_SetActorScale.Change(PlayerREF, 0.92)
EndIf EndIf
PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true) PlayerREF.UnequipItem(PlayerREF.GetEquippedShield(), false, true)

View File

@ -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