Disable mount and house renaming without SKSE

This commit is contained in:
Eddoursul 2024-02-08 17:51:59 +01:00
parent f53bca8765
commit 5bb922c425
15 changed files with 70 additions and 36 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -2,7 +2,7 @@ Scriptname _00E_DonkeyNameAlias extends ReferenceAlias Hidden
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
If _00E_MuleOwned.GetValue() as Int != 0 If SKSE.GetVersion() && _00E_MuleOwned.GetValue() as Int != 0
if NQ06_Freda.sMuleName != "" if NQ06_Freda.sMuleName != ""
_00E_NQ06Bonni.SetName(NQ06_Freda.sMuleName) _00E_NQ06Bonni.SetName(NQ06_Freda.sMuleName)

View File

@ -2,7 +2,7 @@ Scriptname _00E_HorseNameAlias extends ReferenceAlias Hidden
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
If _00E_HorseOwned.GetValue() as Int != 0 If SKSE.GetVersion() && _00E_HorseOwned.GetValue() as Int != 0
if NQ06_Freda.sHorseName != "" if NQ06_Freda.sHorseName != ""
(PlayerHorseAlias.GetReference() as Actor).GetActorBase().SetName(NQ06_Freda.sHorseName) (PlayerHorseAlias.GetReference() as Actor).GetActorBase().SetName(NQ06_Freda.sHorseName)

View File

@ -2,14 +2,18 @@ Scriptname _00E_NQ06_ShadowAlias extends ReferenceAlias Hidden
GlobalVariable Property _00E_FathersShadowOwned Auto GlobalVariable Property _00E_FathersShadowOwned Auto
_00E_NQ06_Functions Property NQ06_Freda Auto
Actor Property FS_NQR05_FatherShadowREF Auto
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
If (_00E_FathersShadowOwned.GetValue() as Int) > 0 If SKSE.GetVersion() && (_00E_FathersShadowOwned.GetValue() as Int) > 0
String sShadowName = (GetOwningQuest() as _00E_NQ06_Functions).sFathersShadowName String sShadowName = NQ06_Freda.sFathersShadowName
if sShadowName != "" if sShadowName != ""
(GetReference() as Actor).GetActorBase().SetName(sShadowName) FS_NQR05_FatherShadowREF.GetActorBase().SetName(sShadowName)
endif endif
EndIf EndIf

View File

@ -93,6 +93,7 @@ function OnActivate(ObjectReference akActionRef)
elseif iButton == 5 elseif iButton == 5
if SKSE.GetVersion()
Cell cCurrentCell = Self.GetParentCell() Cell cCurrentCell = Self.GetParentCell()
String sHouseName = NQ24.ChooseHouseName() String sHouseName = NQ24.ChooseHouseName()
cCurrentCell.SetName(sHouseName) cCurrentCell.SetName(sHouseName)
@ -102,6 +103,9 @@ function OnActivate(ObjectReference akActionRef)
ElseIf cCurrentCell == CapitalCityPlayerHouseUpper ElseIf cCurrentCell == CapitalCityPlayerHouseUpper
Player.sHouseNobleQuarterName = sHouseName Player.sHouseNobleQuarterName = sHouseName
EndIf EndIf
else
Debug.Notification("Renaming requires SKSE")
endif
elseif iButton == 6 elseif iButton == 6

View File

@ -14,18 +14,21 @@ Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldCo
PlayerREF.AddItem(kyHouseKey, 1) PlayerREF.AddItem(kyHouseKey, 1)
objNoteRef.Disable() objNoteRef.Disable()
cHouseCell.SetActorOwner(PlayerREF.GetActorBase()) cHouseCell.SetActorOwner(PlayerREF.GetActorBase())
HouseBoardREF.Enable()
if SKSE.GetVersion()
sHouseName = NQ24.ChooseHouseName() sHouseName = NQ24.ChooseHouseName()
If sHouseName == "" If sHouseName == ""
sHouseName = DefaultHouseName.GetName() sHouseName = DefaultHouseName.GetName()
EndIf EndIf
cHouseCell.SetName(sHouseName) cHouseCell.SetName(sHouseName)
HouseBoardREF.Enable()
If cHouseCell == CapitalCityPlayerhouse If cHouseCell == CapitalCityPlayerhouse
Player.sHouseMarketQuarterName = sHouseName Player.sHouseMarketQuarterName = sHouseName
ElseIf cHouseCell == CapitalCityPlayerHouseUpper ElseIf cHouseCell == CapitalCityPlayerHouseUpper
Player.sHouseNobleQuarterName = sHouseName Player.sHouseNobleQuarterName = sHouseName
EndIf EndIf
endIf
If !NQ24.IsCompleted() If !NQ24.IsCompleted()
If !NQ24.IsRunning() If !NQ24.IsRunning()

View File

@ -7,6 +7,11 @@ Scriptname _00E_NQ06_Functions extends Quest
Function SetHorseName() Function SetHorseName()
_00E_HorseOwned.SetValueInt(1) _00E_HorseOwned.SetValueInt(1)
if ! SKSE.GetVersion()
return
endif
sHorseName = SetMountName() sHorseName = SetMountName()
ActorBase PlayerHorseBase = PlayerHorse.GetActorReference().GetActorBase() ActorBase PlayerHorseBase = PlayerHorse.GetActorReference().GetActorBase()
If sHorseName != "" If sHorseName != ""
@ -23,6 +28,11 @@ EndFunction
Function SetMuleName() Function SetMuleName()
_00E_MuleOwned.SetValueInt(1) _00E_MuleOwned.SetValueInt(1)
if ! SKSE.GetVersion()
return
endif
sMuleName = SetMountName() sMuleName = SetMountName()
ActorBase PlayerMuleBase = Bonni.GetActorReference().GetActorBase() ActorBase PlayerMuleBase = Bonni.GetActorReference().GetActorBase()
If sMuleName != "" If sMuleName != ""
@ -39,6 +49,11 @@ EndFunction
Function SetFatherShadowName() Function SetFatherShadowName()
_00E_FathersShadowOwned.SetValueInt(1) _00E_FathersShadowOwned.SetValueInt(1)
if ! SKSE.GetVersion()
return
endif
sFathersShadowName = SetMountName() sFathersShadowName = SetMountName()
ActorBase PlayerFathersShadowBase = FS_NQR05_FatherShadow.GetActorReference().GetActorBase() ActorBase PlayerFathersShadowBase = FS_NQR05_FatherShadow.GetActorReference().GetActorBase()
If sFathersShadowName != "" If sFathersShadowName != ""
@ -60,6 +75,7 @@ EndFunction
Function RenameMount(bool _bReturnToSelection) Function RenameMount(bool _bReturnToSelection)
if SKSE.GetVersion()
int iRenameSelection = _00E_NQ06_RenameMountSelection.Show() int iRenameSelection = _00E_NQ06_RenameMountSelection.Show()
If iRenameSelection == 0 If iRenameSelection == 0
SetMuleName() SetMuleName()
@ -70,12 +86,15 @@ Function RenameMount(bool _bReturnToSelection)
EndIf EndIf
ReturnToSelection(_bReturnToSelection) ReturnToSelection(_bReturnToSelection)
else
Debug.Notification("Renaming requires SKSE")
endif
EndFunction EndFunction
Function ReturnToSelection(bool _bReturnToSelection) Function ReturnToSelection(bool _bReturnToSelection)
If _bReturnToSelection == true If _bReturnToSelection
((Self as Quest).GetAliasByName("HorseFlute") as _00E_HorseFlute_SC).PrepareTeleport() ((Self as Quest).GetAliasByName("HorseFlute") as _00E_HorseFlute_SC).PrepareTeleport()
EndIf EndIf

View File

@ -6,6 +6,10 @@ Scriptname _00E_PlayerHousing_CellNameSC extends ReferenceAlias
;===================================================================================== ;=====================================================================================
Event OnPlayerLoadGame() Event OnPlayerLoadGame()
if ! SKSE.GetVersion()
return
endif
If sHouseNobleQuarterName != "" If sHouseNobleQuarterName != ""
CapitalCityPlayerHouseUpper.SetName(sHouseNobleQuarterName) CapitalCityPlayerHouseUpper.SetName(sHouseNobleQuarterName)
Else Else