Replaced scripts on crafting stations with perks

This commit is contained in:
Eddoursul 2022-01-07 14:51:21 +01:00
parent 4731dd1b58
commit 5f4d3814ea
28 changed files with 135 additions and 113 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,19 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 12
Scriptname PRKF__00E_CraftQuestPotionPe_0300146D Extends Perk Hidden
;BEGIN FRAGMENT Fragment_7
Function Fragment_7(ObjectReference akTargetRef, Actor akActor)
;BEGIN CODE
if FS_NQ05.GetStage() >= 40
Game.GetPlayer().RemovePerk(Self)
return
endif
(FS_NQ05 as _00E_FS_NQ05_Functions).AskCreatePotion()
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Quest Property FS_NQ05 Auto

View File

@ -0,0 +1,19 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 10
Scriptname PRKF__00E_FS_NQ07_CraftPotio_0300146E Extends Perk Hidden
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akTargetRef, Actor akActor)
;BEGIN CODE
if FS_NQ07.GetStage() >= 120
Game.GetPlayer().RemovePerk(Self)
return
endif
(FS_NQ07 as _00E_FS_NQ07_Functions).AskCreatePotion()
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Quest Property FS_NQ07 Auto

View File

@ -0,0 +1,16 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 3
Scriptname PRKF__00E_SE_2_0_12_UpgradeP_030090B3 Extends Perk Hidden
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akTargetRef, Actor akActor)
;BEGIN CODE
if akTargetRef.IsActivationBlocked()
akTargetRef.Activate(akActor, true)
akTargetRef.BlockActivation(False)
endif
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment

View File

@ -0,0 +1,26 @@
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 8
Scriptname PRKF__00E_SE_DismantlePerk_03009D21 Extends Perk Hidden
;BEGIN FRAGMENT Fragment_0
Function Fragment_0(ObjectReference akTargetRef, Actor akActor)
;BEGIN CODE
int iButton = _00E_Smelting_DismantlingMSG.Show()
If iButton == 0 ; if the player wants to process ore into ingots
akTargetRef.Activate(akActor, true)
ElseIf iButton == 1 ; if the player wants to dismantle items back into crafting components, disable player controls
Game.DisablePlayerControls(true, true, true, true, true, true, true, true)
_00E_Dismantling_SmelterREF.Activate(akActor)
Else
return
EndIf
;END CODE
EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Message Property _00E_Smelting_DismantlingMSG Auto
ObjectReference Property _00E_Dismantling_SmelterREF Auto

View File

@ -197,6 +197,22 @@ Function PrepareEnde4()
EndFunction
Function AskCreatePotion()
Int qStage = Self.GetStage()
If qStage >= 30 && qStage < 40
If FS_NQ05_AlchemyMessagebox.Show() == 0
Self.SetStage(40)
PlayerREF.RemoveItem(Vynroot, 1)
PlayerREF.RemoveItem(SkeeverTail, 1)
PlayerREF.RemoveItem(MothWingMonarch, 1)
PlayerREF.RemoveItem(Garlic, 1)
PlayerREF.RemoveItem(_00E_FS_NQ05_Rezept, 1)
EndIf
EndIf
EndFunction
;=====================================================================================
; EVENTS
;=====================================================================================
@ -267,3 +283,4 @@ Scene Property FS_NQ05_SceneTochter Auto
Scene Property FS_NQ05_SceneGoAway Auto
Sound Property _00E_FS_NQ05_FemaleMumblingM Auto
Message Property FS_NQ05_AlchemyMessagebox Auto

View File

@ -554,6 +554,20 @@ Function UpdateAarosCarryTraySpell() ; Version 2.0.8 Update
EndIf
EndFunction
Function AskCreatePotion()
If Self.GetStage() == 115
If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0
Self.SetStage(120)
PlayerREF.RemoveItem(FoodMead, 1)
PlayerREF.RemoveItem(FrostMirriam, 2)
PlayerREF.RemoveItem(FoodBananenschnaps, 1)
PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1)
EndIf
EndIf
EndFunction
;=====================================================================================
; PROPERTIES
@ -593,6 +607,7 @@ GlobalVariable Property _00E_AchievementsEnabled Auto
GlobalVariable Property _00E_TeleportGlobal Auto
Message Property _00E_FS_NQ07_Thoughts Auto
Message Property _00E_FS_NQ07_AlchemyMessagebox Auto
MiscObject Property Gold001 Auto
MiscObject Property _00E_FS_NQ07_Borstenbeutel Auto
@ -651,10 +666,13 @@ ObjectReference Property _00E_FS_NQ07_AuroraTeleportMarkerREF Auto
ImageSpaceModifier Property MAGShockExpMassImod Auto
Potion Property FoodMead Auto
Potion Property FoodBananenschnaps Auto
Potion Property _00E_DalSarkerHoneywine Auto
Potion Property FoodChickenCooked Auto
Potion Property FoodCabbagePotatoSoup Auto
Ingredient Property FrostMirriam Auto
Spell Property _00E_AbCarryDrinkTray_Old Auto
Spell Property _00E_AbCarryDrinkTray_New Auto
Spell Property _00E_FS_NQ07_LightSpell Auto

View File

@ -7,28 +7,5 @@ Message Property _00E_Smelting_DismantlingMSG Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
ObjectReference Property _00E_Dismantling_SmelterREF Auto
Event OnInit()
BlockActivation()
Endevent
Event OnActivate(ObjectReference akActionRef)
; block the player from activating the smelter when being transformed in werewolf due to animation bugs
If akActionRef == PlayerREF && PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace
_00E_Theriantrophist_CantCraftMSG.Show()
ElseIf akActionRef == PlayerREF && !(PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace)
int iButton = _00E_Smelting_DismantlingMSG.Show()
If iButton == 0 ; if the player wants to process ore into ingots
Self.Activate(akActionRef, true)
ElseIf iButton == 1 ; if the player wants to dismantle items back into crafting components, disable player controls
Game.DisablePlayerControls(true, true, true, true, true, true, true, true)
_00E_Dismantling_SmelterREF.Activate(PlayerREF)
Else
return
EndIf
Else
Self.Activate(akActionRef, true) ; if it's not the player but an NPC
EndIf
Endevent
; The script is obsolete as of 2.0.12 and has been replaced with a perk.
; Do not add it to new references.

View File

@ -6,12 +6,15 @@ Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
Bool bActivationBlocked = False
; This script is obsolete since 2.0.12 and has been replaced with a perk
; This script is obsolete since 2.0.12 and has been replaced with a perk.
; Do not add it to new references.
Event OnActivate(ObjectReference akActionRef)
; Unlock activators, blocked by previous version of the script
if IsActivationBlocked()
BlockActivation(False)
if Game.GetPlayer().GetRace() != _00E_Theriantrophist_PlayerWerewolfRace
Activate(akActionRef, true)
endif
endif
EndEvent

View File

@ -1,67 +1,22 @@
Scriptname _00E_Theriantrophist_SummonLabSC extends activemagiceffect
ObjectReference Property _00E_Theriantrophist_SummonPortableLaboratory_Target Auto
Event OnEffectStart(Actor akTarget, Actor akCaster)
if PlayerREF.GetRace() == _00E_Theriantrophist_PlayerWerewolfRace
_00E_Theriantrophist_CantCraftMSG.Show()
else
CheckforQuestPotions()
(FS_NQ05 as _00E_FS_NQ05_Functions).AskCreatePotion()
(FS_NQ07 as _00E_FS_NQ07_Functions).AskCreatePotion()
Utility.Wait(1.0)
_00E_Theriantrophist_SummonPortableLaboratory_Target.activate(PlayerREF, true)
endif
EndEvent
Function CheckforQuestPotions()
If (FS_NQ05.GetStage() < 40 && FS_NQ05.GetStage() >= 30)
int iButton1 = FS_NQ05_AlchemyMessagebox.Show()
if iButton1 == 0
FS_NQ05.SetStage(40)
PlayerREF.RemoveItem(Vynroot, 1)
PlayerREF.RemoveItem(SkeeverTail, 1)
PlayerREF.RemoveItem(MothWingMonarch, 1)
PlayerREF.RemoveItem(Garlic, 1)
PlayerREF.RemoveItem(_00E_FS_NQ05_Rezept, 1)
ElseIf iButton1 == 1
;
EndIf
Endif
If (FS_NQ07.GetStage() == 115)
int iButton2 = _00E_FS_NQ07_AlchemyMessagebox.Show()
if iButton2 == 0
FS_NQ07.SetStage(120)
PlayerREF.RemoveItem(FoodMead, 1)
PlayerREF.RemoveItem(FrostMirriam, 2)
PlayerREF.RemoveItem(FoodBananenschnaps, 1)
PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1)
ElseIf iButton2 == 1
;
EndIf
EndIf
EndFunction
ObjectReference Property _00E_Theriantrophist_SummonPortableLaboratory_Target Auto
Actor Property PlayerREF Auto
Message Property _00E_Theriantrophist_CantCraftMSG Auto
Race Property _00E_Theriantrophist_PlayerWerewolfRace Auto
Quest Property FS_NQ05 Auto
Book Property _00E_FS_NQ05_Rezept Auto
Ingredient Property Vynroot Auto
Ingredient Property SkeeverTail Auto
Ingredient Property MothWingMonarch Auto
Ingredient Property Garlic Auto
Message Property FS_NQ05_AlchemyMessagebox Auto
Quest Property FS_NQ07 Auto
Book Property _00E_FS_NQ07_Rezept Auto
Potion Property FoodMead Auto
Ingredient Property FrostMirriam Auto
Potion Property FoodBananenschnaps Auto
Message Property _00E_FS_NQ07_AlchemyMessagebox Auto

View File

@ -12,22 +12,4 @@ Message Property FS_NQ05_AlchemyMessagebox Auto
Bool bActivationBlocked = False
Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False
bActivationBlocked = True
Int qStage = FS_NQ05.GetStage()
If qStage >= 30 && qStage < 40
If FS_NQ05_AlchemyMessagebox.Show() == 0
FS_NQ05.SetStage(40)
PlayerREF.RemoveItem(Nirnroot, 1)
PlayerREF.RemoveItem(SkeeverTail, 1)
PlayerREF.RemoveItem(MothWingMonarch, 1)
PlayerREF.RemoveItem(Garlic, 1)
PlayerREF.RemoveItem(FS_NQ05_Rezept, 1)
EndIf
EndIf
bActivationBlocked = False
EndIf
EndEvent
; This script is obsolete as of 2.0.12, replaced with a perk

View File

@ -11,21 +11,4 @@ Message Property _00E_FS_NQ07_AlchemyMessagebox Auto
Bool bActivationBlocked = False
Event OnActivate(ObjectReference akActionRef)
If akActionRef == PlayerREF && _00E_PlayerhousingMaster.ReferenceCanBeActivated(Self) && bActivationBlocked == False
bActivationBlocked = True
If FS_NQ07.GetStage() == 115
If _00E_FS_NQ07_AlchemyMessagebox.Show() == 0
PlayerREF.RemoveItem(FoodMead, 1)
PlayerREF.RemoveItem(FrostMirriam, 2)
PlayerREF.RemoveItem(FoodBananenschnaps, 1)
PlayerREF.RemoveItem(_00E_FS_NQ07_Rezept, 1)
FS_NQ07.SetStage(120)
EndIf
EndIf
bActivationBlocked = False
EndIf
EndEvent
; This script is obsolete as of 2.0.12, replaced with a perk

View File

@ -69,6 +69,7 @@ SetObjectiveCompleted(37)
SetObjectiveCompleted(38)
SetObjectiveCompleted(39)
SetObjectiveDisplayed(40)
Game.GetPlayer().RemovePerk(_00E_FS_NQ05_CraftPotionPerk)
kmyQuest.MoveMirellStandby()
;END CODE
EndFunction
@ -331,6 +332,7 @@ Function Fragment_12()
;BEGIN CODE
SetObjectivecompleted(20)
SetObjectiveDisplayed(30)
Game.GetPlayer().AddPerk(_00E_FS_NQ05_CraftPotionPerk)
;END CODE
EndFunction
;END FRAGMENT
@ -369,3 +371,4 @@ EndFunction
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
GlobalVariable Property _00E_AchievementsEnabled Auto
Perk Property _00E_FS_NQ05_CraftPotionPerk Auto

View File

@ -97,6 +97,7 @@ _00E_FS_NQ07_Functions kmyQuest = __temp as _00E_FS_NQ07_Functions
SetObjectiveDisplayed(35)
SetObjectiveCompleted(20)
kmyQuest.GivePlayerCraftingPlan()
Game.GetPlayer().AddPerk(_00E_FS_NQ07_CraftPotionPerk)
;END CODE
EndFunction
;END FRAGMENT
@ -470,6 +471,7 @@ Quest __temp = self as Quest
_00E_FS_NQ07_Functions kmyQuest = __temp as _00E_FS_NQ07_Functions
;END AUTOCAST
;BEGIN CODE
Game.GetPlayer().RemovePerk(_00E_FS_NQ07_CraftPotionPerk)
kmyQuest.CleanAuroraHome()
SetObjectiveCompleted(30)
SetObjectiveDisplayed(40)
@ -605,3 +607,5 @@ EndFunction
;END FRAGMENT
;END FRAGMENT CODE - Do not edit anything between this and the begin comment
Perk Property _00E_FS_NQ07_CraftPotionPerk Auto