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()
If _00E_MuleOwned.GetValue() as Int != 0
If SKSE.GetVersion() && _00E_MuleOwned.GetValue() as Int != 0
if NQ06_Freda.sMuleName != ""
_00E_NQ06Bonni.SetName(NQ06_Freda.sMuleName)

View File

@ -2,7 +2,7 @@ Scriptname _00E_HorseNameAlias extends ReferenceAlias Hidden
Event OnPlayerLoadGame()
If _00E_HorseOwned.GetValue() as Int != 0
If SKSE.GetVersion() && _00E_HorseOwned.GetValue() as Int != 0
if 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
_00E_NQ06_Functions Property NQ06_Freda Auto
Actor Property FS_NQR05_FatherShadowREF Auto
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 != ""
(GetReference() as Actor).GetActorBase().SetName(sShadowName)
if sShadowName != ""
FS_NQR05_FatherShadowREF.GetActorBase().SetName(sShadowName)
endif
EndIf

View File

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

View File

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

View File

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

View File

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