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,15 +93,19 @@ function OnActivate(ObjectReference akActionRef)
elseif iButton == 5 elseif iButton == 5
Cell cCurrentCell = Self.GetParentCell() if SKSE.GetVersion()
String sHouseName = NQ24.ChooseHouseName() Cell cCurrentCell = Self.GetParentCell()
cCurrentCell.SetName(sHouseName) String sHouseName = NQ24.ChooseHouseName()
cCurrentCell.SetName(sHouseName)
If cCurrentCell == CapitalCityPlayerhouse
Player.sHouseMarketQuarterName = sHouseName If cCurrentCell == CapitalCityPlayerhouse
ElseIf cCurrentCell == CapitalCityPlayerHouseUpper Player.sHouseMarketQuarterName = sHouseName
Player.sHouseNobleQuarterName = sHouseName ElseIf cCurrentCell == CapitalCityPlayerHouseUpper
EndIf Player.sHouseNobleQuarterName = sHouseName
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())
sHouseName = NQ24.ChooseHouseName()
If sHouseName == ""
sHouseName = DefaultHouseName.GetName()
EndIf
cHouseCell.SetName(sHouseName)
HouseBoardREF.Enable() HouseBoardREF.Enable()
If cHouseCell == CapitalCityPlayerhouse if SKSE.GetVersion()
Player.sHouseMarketQuarterName = sHouseName sHouseName = NQ24.ChooseHouseName()
ElseIf cHouseCell == CapitalCityPlayerHouseUpper If sHouseName == ""
Player.sHouseNobleQuarterName = sHouseName sHouseName = DefaultHouseName.GetName()
EndIf EndIf
cHouseCell.SetName(sHouseName)
If cHouseCell == CapitalCityPlayerhouse
Player.sHouseMarketQuarterName = sHouseName
ElseIf cHouseCell == CapitalCityPlayerHouseUpper
Player.sHouseNobleQuarterName = sHouseName
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,22 +75,26 @@ EndFunction
Function RenameMount(bool _bReturnToSelection) Function RenameMount(bool _bReturnToSelection)
int iRenameSelection = _00E_NQ06_RenameMountSelection.Show() if SKSE.GetVersion()
If iRenameSelection == 0 int iRenameSelection = _00E_NQ06_RenameMountSelection.Show()
SetMuleName() If iRenameSelection == 0
ElseIf iRenameSelection == 1 SetMuleName()
SetHorseName() ElseIf iRenameSelection == 1
ElseIf iRenameSelection == 2 SetHorseName()
SetFatherShadowName() ElseIf iRenameSelection == 2
EndIf SetFatherShadowName()
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