Made bounty targets protected instead of essential - fixes rare cases, when they could not be killed
This commit is contained in:
parent
063c4ca3f4
commit
dac9c5950a
BIN
Fix immortal bounty targets.esp
Normal file
BIN
Fix immortal bounty targets.esp
Normal file
Binary file not shown.
Binary file not shown.
@ -1,10 +1,11 @@
|
|||||||
Scriptname _00E_NQ_Bounty01_TargetScript extends ReferenceAlias
|
Scriptname _00E_NQ_Bounty01_TargetScript extends ReferenceAlias
|
||||||
|
|
||||||
|
|
||||||
; SCRIPT AUTHOR DENNIS MAY 2014
|
; SCRIPT AUTHOR DENNIS MAY 2014
|
||||||
; Script handles Bandit appearance and checks if bounty job is done
|
; Script handles Bandit appearance and checks if bounty job is done
|
||||||
; SCRIPT CHANGE TILL MAY 2018
|
; SCRIPT CHANGE TILL MAY 2018
|
||||||
; Added-in Body Clean-up suggested by gavrant for performance reasons, check out WIDeadBodyCleanupScript for original code
|
; Added-in Body Clean-up suggested by gavrant for performance reasons, check out WIDeadBodyCleanupScript for original code
|
||||||
|
; Eddoursul, January 2024: Made bounty targets protected instead of essential
|
||||||
|
|
||||||
; ====================================================================================
|
; ====================================================================================
|
||||||
; EVENTS
|
; EVENTS
|
||||||
; ====================================================================================
|
; ====================================================================================
|
||||||
@ -12,12 +13,11 @@ Scriptname _00E_NQ_Bounty01_TargetScript extends ReferenceAlias
|
|||||||
Event OnCellAttach() ;FIRE WHEN PLAYER ENTERS THE CELL THE NEEDED ACTOR IS IN
|
Event OnCellAttach() ;FIRE WHEN PLAYER ENTERS THE CELL THE NEEDED ACTOR IS IN
|
||||||
If NQ_Bounty01.GetCurrentStageID() == __Config_iEnableAtStage && GetReference().IsDisabled()
|
If NQ_Bounty01.GetCurrentStageID() == __Config_iEnableAtStage && GetReference().IsDisabled()
|
||||||
GetReference().Enable() ; Enable the bandit when he is needed in the quest
|
GetReference().Enable() ; Enable the bandit when he is needed in the quest
|
||||||
|
(GetReference() as Actor).GetActorBase().SetEssential(false)
|
||||||
Endif
|
Endif
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnDeath(Actor akKiller)
|
Event OnDeath(Actor akKiller)
|
||||||
finished = True
|
|
||||||
|
|
||||||
Int iStage = __Config_iEnableAtStage
|
Int iStage = __Config_iEnableAtStage
|
||||||
|
|
||||||
NQ_Bounty01.SetObjectiveCompleted(iStage) ;MissionObjective: Kill the bandit - Done
|
NQ_Bounty01.SetObjectiveCompleted(iStage) ;MissionObjective: Kill the bandit - Done
|
||||||
@ -28,34 +28,21 @@ Event OnDeath(Actor akKiller)
|
|||||||
BountyScript._00E_NQ_Bounty01_Status = 2 ;Unlock bounty board to receive your gold
|
BountyScript._00E_NQ_Bounty01_Status = 2 ;Unlock bounty board to receive your gold
|
||||||
EndEvent
|
EndEvent
|
||||||
|
|
||||||
Event OnCombatStateChanged(Actor akTarget, int aeCombatState)
|
Event OnEnterBleedout()
|
||||||
If finished == False && aeCombatState != 0 && akTarget
|
Actor aTarget = GetReference() as Actor
|
||||||
If _00E_PlayerSummonedCreature == None
|
if aTarget.IsInCombat()
|
||||||
_00E_PlayerSummonedCreature = Game.GetFormFromFile(0x000482FC, "Skyrim.esm") as Keyword
|
; Allow minions to deal the final blow
|
||||||
EndIf
|
aTarget.GetActorBase().SetProtected(false)
|
||||||
|
; Technically, not required since 2.1, adding this in case of overwrite by an outdated mod
|
||||||
If BlameSpellKeyword == None
|
aTarget.GetActorBase().SetEssential(false)
|
||||||
BlameSpellKeyword = Game.GetFormFromFile(0x0005BD16, "Skyrim.esm") as Keyword
|
endif
|
||||||
EndIf
|
endEvent
|
||||||
|
|
||||||
If akTarget == PlayerRef || akTarget.IsPlayerTeammate() || akTarget.HasKeyword(_00E_PlayerSummonedCreature) || akTarget.GetFactionReaction(PlayerRef) == 2 || akTarget.HasEffectKeyword(BlameSpellKeyword)
|
|
||||||
finished = True
|
|
||||||
GetActorReference().GetActorBase().SetEssential(False)
|
|
||||||
EndIf
|
|
||||||
EndIf
|
|
||||||
EndEvent
|
|
||||||
|
|
||||||
; ====================================================================================
|
; ====================================================================================
|
||||||
; PROPERTIES
|
; PROPERTIES
|
||||||
; ====================================================================================
|
; ====================================================================================
|
||||||
|
|
||||||
|
|
||||||
Actor Property PlayerRef Auto
|
|
||||||
Quest Property NQ_Bounty01 Auto
|
Quest Property NQ_Bounty01 Auto
|
||||||
_00E_NQ_Bounty01_Functions Property BountyScript Auto ;ACCESS TO QUEST SCRIPT
|
_00E_NQ_Bounty01_Functions Property BountyScript Auto ;ACCESS TO QUEST SCRIPT
|
||||||
Int Property __Config_iEnableAtStage Auto
|
Int Property __Config_iEnableAtStage Auto
|
||||||
{Type the quest stage number to enable the bandit 10, 30, 50. Enable new enemy every 20th stage }
|
{Type the quest stage number to enable the bandit 10, 30, 50. Enable new enemy every 20th stage }
|
||||||
Keyword Property _00E_PlayerSummonedCreature Auto
|
|
||||||
Keyword Property BlameSpellKeyword Auto
|
|
||||||
Bool finished = False
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user