Jump to content

Quest Stage Enabling Objects


spectremk13

Recommended Posts

Hey all, I come back after taking a break for a day and so many replies! Thanks for the help from everyone.

 

An update on my progress.

 

I loaded up a save just prior to exiting Helgen Keep on a whim, and from there, the quest worked exactly as I intended, enabling and all. I will probably change the quest around per gasti89's advice, as it does make more sense.

 

As to my next question...

 

At the completion of the quest, I wish to allow the player to learn how to smith these items. I have everything in place (recipes, tempering, etc.), but I am still trying to figure out how to keep them disabled until the completion of the quest. The in-game example I could think of was finishing the Companion questline allowed you to craft Nord Hero items, but looking it up as an example in the CK didn't help. How it seemed to work (if I understood it correctly) is that the Skyforge is the specific forge that can craft them, but is in an unusable state until finishing Glory of the Dead, which is not what I want to have happen. I also checked the available conditions under the recipes themselves, but none of them seemed to do what I would want them to do.

 

Is there a way to make it so that finishing the quest unlocks the specific schematics I want unlocked for the player at all smithies?

Link to comment
Share on other sites

ALIASES:

 

- Note1 ---> specific reference, select the note in the world. IMPORTANT: Attach the script to the alias! Not to the object itself! ---> create a new script on the note1 alias, then "edit source" ---> i'd prefer using OnRead() instead of OnContainerChanged(), since i find more immersive to set the stage when the player actually opens the note

 

Scriptname NoteReadSCR Extends ReferenceAlias

import game
import debug

Quest Property myQuest auto

Int Property StageToSet auto

Int Property PreReqStage auto

Event OnRead()
    if myQuest.GetStage() == PreReqStage
        myQuest.SetStage(StageToSet)
    EndIf
EndEvent

 

Now fill the properties with stage 0, stage 10 and the quest.

 

- myChest ---> specific reference, select the chest in the world ---> tick "allow disabled"

 

- Note2 ---> create reference to object, select "in", select "myChest" ---> IMPORTANT: this alias must come AFTER the Chest alias. ---> Attach the above script to this note too, just change the properties to stage 10 for prereq and 20 for stagetoset.

 

 

I don't think ReferenceAlias extends ObjectReference, so OnRead won't be called in such a script. Need to extend ObjectReference instead:

Scriptname NoteReadSCR Extends ObjectReference

import ReferenceAlias

Int Property StageToSet = 10 auto ; default is 10
Int Property PreReqStage = 0 auto ;default is 0

Event OnRead() ; OnRead is an extension of ObjectReference script
    if GetOwningQuest().GetStage() == PreReqStage 
        GetOwningQuest().SetStage(StageToSet) 
    EndIf 
EndEvent

 

Edit: I stand corrected, extending ReferenceAlias does seem to support events like OnRead and OnDeath, although it's not clear from reading the CK wiki.

Edited by steve40
Link to comment
Share on other sites

  • Recently Browsing   0 members

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