diff --git a/SetMountNames.esp b/SetMountNames.esp new file mode 100644 index 00000000..1ce6b644 Binary files /dev/null and b/SetMountNames.esp differ diff --git a/scripts/_00E_NQ06_DonkeyAlias.pex b/scripts/_00E_NQ06_DonkeyAlias.pex new file mode 100644 index 00000000..f0709f68 Binary files /dev/null and b/scripts/_00E_NQ06_DonkeyAlias.pex differ diff --git a/scripts/_00E_NQ06_ShadowAlias.pex b/scripts/_00E_NQ06_ShadowAlias.pex new file mode 100644 index 00000000..4d203e9d Binary files /dev/null and b/scripts/_00E_NQ06_ShadowAlias.pex differ diff --git a/scripts/_00e_nq06_functions.pex b/scripts/_00e_nq06_functions.pex index 2333369f..c72e3431 100644 Binary files a/scripts/_00e_nq06_functions.pex and b/scripts/_00e_nq06_functions.pex differ diff --git a/scripts/_00e_playersetupscript.pex b/scripts/_00e_playersetupscript.pex index 12e0148d..f460babd 100644 Binary files a/scripts/_00e_playersetupscript.pex and b/scripts/_00e_playersetupscript.pex differ diff --git a/scripts/playerhorsescript.pex b/scripts/playerhorsescript.pex new file mode 100644 index 00000000..68157071 Binary files /dev/null and b/scripts/playerhorsescript.pex differ diff --git a/source/scripts/_00E_NQ06_DonkeyAlias.psc b/source/scripts/_00E_NQ06_DonkeyAlias.psc new file mode 100644 index 00000000..ea671087 --- /dev/null +++ b/source/scripts/_00E_NQ06_DonkeyAlias.psc @@ -0,0 +1,17 @@ +Scriptname _00E_NQ06_DonkeyAlias extends ReferenceAlias Hidden + +GlobalVariable Property _00E_MuleOwned Auto + +Event OnPlayerLoadGame() + + If (_00E_MuleOwned.GetValue() as Int) > 0 + + String sMuleName = (GetOwningQuest() as _00E_NQ06_Functions).sMuleName + + if sMuleName != "" + (GetReference() as Actor).GetActorBase().SetName(sMuleName) + endif + + EndIf + +EndEvent diff --git a/source/scripts/_00E_NQ06_ShadowAlias.psc b/source/scripts/_00E_NQ06_ShadowAlias.psc new file mode 100644 index 00000000..57c5222d --- /dev/null +++ b/source/scripts/_00E_NQ06_ShadowAlias.psc @@ -0,0 +1,17 @@ +Scriptname _00E_NQ06_ShadowAlias extends ReferenceAlias Hidden + +GlobalVariable Property _00E_FathersShadowOwned Auto + +Event OnPlayerLoadGame() + + If (_00E_FathersShadowOwned.GetValue() as Int) > 0 + + String sShadowName = (GetOwningQuest() as _00E_NQ06_Functions).sFathersShadowName + + if sShadowName != "" + (GetReference() as Actor).GetActorBase().SetName(sShadowName) + endif + + EndIf + +EndEvent diff --git a/source/scripts/_00e_nq06_functions.psc b/source/scripts/_00e_nq06_functions.psc index dc791315..dfef617f 100644 --- a/source/scripts/_00e_nq06_functions.psc +++ b/source/scripts/_00e_nq06_functions.psc @@ -58,22 +58,6 @@ String Function SetMountName() EndFunction -Function RefreshNamesOnSaveLoad() -{makes sure that the names are saved} - If _00E_HorseOwned.GetValueInt() == 1 && sHorseName != "" - PlayerHorse.GetActorReference().GetActorBase().SetName(sHorseName) - EndIf - - If _00E_MuleOwned.GetValueInt() == 1 && sMuleName != "" - Bonni.GetActorReference().GetActorBase().SetName(sMuleName) - EndIf - - If _00E_FathersShadowOwned.GetValueInt() == 1 && sFathersShadowName != "" - FS_NQR05_FatherShadow.GetActorReference().GetActorBase().SetName(sFathersShadowName) - EndIf - -EndFunction - Function RenameMount(bool _bReturnToSelection) int iRenameSelection = _00E_NQ06_RenameMountSelection.Show() diff --git a/source/scripts/_00e_playersetupscript.psc b/source/scripts/_00e_playersetupscript.psc index 04502e4c..e0d6b37e 100644 --- a/source/scripts/_00e_playersetupscript.psc +++ b/source/scripts/_00e_playersetupscript.psc @@ -47,13 +47,6 @@ Function SetAutoSaveInterval() EndFunction -Function RefreshMountNamesOnLoad() - - _00E_NQ06_Functions NQ06Functions = Game.GetForm(0x725BA) as _00E_NQ06_Functions - NQ06Functions.RefreshNamesOnSaveLoad() - -EndFunction - ;===================================================================================== ; MAINTENANCE @@ -76,8 +69,6 @@ Function Maintenance() (Game.GetForm(0xAC80E) as Message).ShowAsHelpMessage("Clear", 0.1, 1, 1) SetAutoSaveInterval() - - RefreshMountNamesOnLoad() SendModEvent("Enderal_GameLoaded") diff --git a/source/scripts/playerhorsescript.psc b/source/scripts/playerhorsescript.psc new file mode 100644 index 00000000..66a51398 --- /dev/null +++ b/source/scripts/playerhorsescript.psc @@ -0,0 +1,45 @@ +Scriptname PlayerHorseScript extends ReferenceAlias + +Event OnDeath(Actor akKiller) + MySelf = GetActorReference() + _00E_HorseOwned.SetValue(0) +EndEvent + +Event OnUnload() + If MySelf.IsDead() + ; disable the dead horse if it is unloaded + MySelf.Disable() + MySelf.Delete() + (GetOwningQuest() as _00E_NQ06_Functions).sHorseName = "" + ; added a new horse that can be bought at the stables + Myself = StablesPosition.PlaceActorAtMe(LvlHorseSaddled) + Alias_HorseRef.ForceRefTo(MySelf) + Alias_HorseRef.GetRef().SetFactionOwner(StablesFaction) + EndIf +EndEvent + +Event OnPlayerLoadGame() + + If (_00E_HorseOwned.GetValue() as Int) > 0 + + String sHorseName = (GetOwningQuest() as _00E_NQ06_Functions).sHorseName + + if sHorseName != "" + (GetReference() as Actor).GetActorBase().SetName(sHorseName) + endif + + EndIf + +EndEvent + +Actor Property MySelf Auto + +ObjectReference Property StablesPosition Auto + +ActorBase Property LvlHorseSaddled Auto + +ReferenceAlias Property Alias_HorseRef Auto + +Faction Property StablesFaction Auto + +GlobalVariable Property _00E_HorseOwned Auto