0arisaka0 Posted November 26, 2017 Share Posted November 26, 2017 Hello all :) I am looking for assistance in scripting; I am looking to activate and deactivate several in-worldspace items upon quest stages of the vanially in-game quests.I initially thought putting in scrip fragments, but they didn't work, so I switched to adding scripting to the in-worldspace items, but my papyrus isn;t strong enough to get it to work; they scrips I've tried complied, but didn't seem to do anything; I've gone through all the conceivable vanilla 'quest' and 'item enable' scripts I could find to see of those would work, and they didn't. Any assistance would be appreciated :D Link to comment Share on other sites More sharing options...
SKKmods Posted November 27, 2017 Share Posted November 27, 2017 Don't change base game objects by attaching scripts to them, there are several elegant an non invasive ways to interact with vanilla assets. Such as create your own invisible autostart quest, add reference aliases forced in the render window to the objects you want to activate and attach a script that polls for the vanilla quest updates, something like this: Quest Property pMQ102 Auto Const Mandatory ; the vanilla OutOfTime quest I am watching ReferenceAlias Property Alias_ObjectIamInterestedIn Auto Const ; the thing I want to modify as alias in my quest Event OnQuestInit() StartPolling() ; Do not call from OnInit() to avoid blocking EndEvent Function StartPolling() ; Also call Scriptname.StartPolling() from quest Alias_PlayerRef.OnPlayerLoadGame() StartTimer(60, 60) EndFunction Event OnTimer(int iTimer) If (iTimer == 60) ; 60 second polling update is reasonable If pMQ102.GetCurrentStageID() == 15 ; player has emerged from vault 111 Alias_ObjectIamInterestedIn.GetReference().Enable() StartTimer(60, 60) ; poll for next status change Elseif pMQ102.GetCurrentStageID() == 30 ; player has spoken to Codsworth, the fool Alias_ObjectIamInterestedIn.GetReference().Disable() Alias_ObjectIamInterestedIn.Clear() ; always clean up aliases to release the object ref ; game over, don't restart the timer EndIf EndIf EndEvent HTH Link to comment Share on other sites More sharing options...
JonathanOstrus Posted November 28, 2017 Share Posted November 28, 2017 Don't change base game objects by attaching scripts to them, there are several elegant an non invasive ways to interact with vanilla assets. Such as create your own invisible autostart quest, add reference aliases forced in the render window to the objects you want to activate and attach a script that polls for the vanilla quest updates, something like this: ... HTH Oooh that's pretty elegant. Better than the method I was thinking of using. Though fairly similar. I like this better. Thanks for posting. One thing I would like to point out though is that using forced references like that would cause the objects to be changed from non persistent to persistent references. This also creates a vanilla reference edit because of that. Though I don't think there is any other solution around that. Link to comment Share on other sites More sharing options...
SKKmods Posted November 28, 2017 Share Posted November 28, 2017 Yar, refs will be persistent bound to a quest, but better than hacking a base record. Preference would be to use aliases and reference variables in the remote quest if they are available, but the objects of interest may have nothing to do with it. ReferenceAlias Property MQ102_Alias_Codsworth Auto ObjectReference CodsworthRemoteRef = MQ102_Alias_Codsworth.GetReference() CodsworthRemoteRef.Disable() Link to comment Share on other sites More sharing options...
SKKmods Posted November 30, 2017 Share Posted November 30, 2017 Or, (delayed thought) as an alternative to the timer for polling the remote quest you could just register for a remote quest event ... although not robust as timer based poll because they can be missed: Quest Property pMQ102 Auto Const Mandatory ; the vanilla OutOfTime quest I am watching Event OnQuestInit() RegisterForRemoteEvent(pMQ102, "OnStageSet") EndEvent Event Quest.OnStageSet(Quest akSender, int auiStageID, int auiItemID) If akSender == pMQ102 && auiStageID == 15 ; do stuff EndIf EndEvent Link to comment Share on other sites More sharing options...
ENGINEERH4RR7 Posted December 17, 2022 Share Posted December 17, 2022 Hi, this is exactly what I was looking for, and while I managed to make my quest alias, how do you set up the overall quest? Link to comment Share on other sites More sharing options...
RaidersClamoring Posted December 18, 2022 Share Posted December 18, 2022 As mentioned there's remote events but you could also look into the vanilla scripts associated with the particular quests. If you're lucky there are CustomEvents you can register for that might deliver some extra goodies when they fire. Just make sure the vanilla script actually calls SendCustomEvent() and not just declares one. Link to comment Share on other sites More sharing options...
Recommended Posts