Jump to content

[LE] Trying to edit a quest


Recommended Posts

I want a quest to use modified versions of these two scripts:

;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 10
Scriptname QF_FreeformRiften10_0005331D Extends Quest Hidden

;BEGIN ALIAS PROPERTY FFRiften10Balimund
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_FFRiften10Balimund Auto
;END ALIAS PROPERTY

;BEGIN ALIAS PROPERTY FFRiften10PlayerAlias
;ALIAS PROPERTY TYPE ReferenceAlias
ReferenceAlias Property Alias_FFRiften10PlayerAlias Auto
;END ALIAS PROPERTY

;BEGIN FRAGMENT Fragment_2
Function Fragment_2()
;BEGIN CODE
;Balimund asks Player to retrieve Fire Salts for his forge
pFFR10QS.SaltCounted()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_5
Function Fragment_5()
;BEGIN CODE
;Player provided Fire Salts to Balimund
Game.GetPlayer().RemoveItem(pFFRiften10Firesalt,10)
Game.GetPlayer().AddItem(pFFRiften10Gold)
Alias_FFRiften10Balimund.GetActorRef().SetRelationshipRank(Game.GetPlayer(), 1)
pThaneCount.Value += 1
pFFRTQS.ThaneCheck()
CompleteAllObjectives()
Stop()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_9
Function Fragment_9()
;BEGIN CODE
;Quest Failed
FailAllObjectives()
Stop()
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN CODE
;Start-Up
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

Ingredient Property pFFRiften10Firesalt Auto

LeveledItem Property pFFRiften10Gold Auto

FFRiftenThaneQuestScript Property pFFRTQS Auto

GlobalVariable Property pThaneCount Auto

FFR10QuestScript Property pFFR10QS Auto


and

Scriptname FFR10QuestScript extends Quest Conditional

GlobalVariable Property pFF10SaltCount Auto Conditional
Quest Property pFFR10Quest Auto Conditional
Ingredient Property pSalt Auto Conditional

Function SaltCounted()

float CurrentCount = Game.GetPlayer().GetItemCount(pSalt)

pFF10SaltCount.Value = CurrentCount
UpdateCurrentInstanceGlobal(pFF10SaltCount)
if CurrentCount >= 10
pFFR10Quest.SetObjectiveCompleted(10,1)
pFFR10Quest.SetObjectiveDisplayed(20,true,true)
elseif CurrentCount < 10
pFFR10Quest.SetObjectiveCompleted(10,0)
pFFR10Quest.SetObjectiveDisplayed(20,0)
pFFR10Quest.SetObjectiveDisplayed(10,true,true)
endif

endFunction


Unfortunately, even if I only edit the property values of the existing scripts, it doesn't work.
If I change the property value of pFFRiften10Firesalt from Fire Salts to, say, Garlic in both scripts, neither Garlic nor Fire Salts will make the quest objective budge, it still says 0/ 10.

Of course, the dialogue option to turn in the quest is showing up correctly if I have 10 of the ingredients specified in the dialogue window - and it removes 10 Garlics from the player's inventory just as Fragment_5 tells it to do!

So I guess the problem is with the function SaltCounted(), or maybe with the script FFR10QuestScript, but how can I find out what's the problem?

Edit: I should add that this applies even after starting a new game.

Edited by TangerineDog
Link to comment
Share on other sites

  • 4 weeks later...

Update for future Generations :wink:

 

I have overlooked the Player Script, which calls for the Salts itself. I have only edited the scripts from the script section of the quest, but hadn't looked at the aliases.

Now with the Quest Script and the Player Script edited, it just might work. We'll see.

 

Edit: That did it!

Edited by TangerineDog
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...