Jump to content

Help request: Hidden quest scripting


LeahTheUnknown

Recommended Posts

I want to do some improvements to my Commonwealth Cleanup mod. What I want to do is make a scripted background quest to track the most recent items removed, and provide an Aid item that will restore them, sort of an undelete button.

 

The problem is, I don't even know where to start with the quest dialog box in the CK. I've done some light scripting and have done some programming in the past, so the Papyrus isn't a big deal. I just don't know how to integrate it into a quest.

 

I would also need a way to integrate the removal script so it "alerts" the quest to update the "most recent" list.

Any tutorials for this sort of thing, or just input on how to implement it, would be greatly appreciated.

 

Thanks in advance!

 

Link to comment
Share on other sites

If you want to attach a script to the quest, go to the script tab, click add then [New Script]. Once you've added a new script, it will appear in that tab, then you can right click it then edit source to edit it.

You could also follow this tutorial to make the quest run at launch, so that the scripts attached to it will launch at start as well.

 

I think this function is what you need for your script to track down the removed items: https://www.creationkit.com/index.php?title=OnItemRemoved_-_ObjectReference

---

FormList Property RemovedItemsArray Auto
Event OnItemRemoved(Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akDestContainer)
RemovedItemsArray.AddForm(AkBaseItem) ; Add removed item to the FormList
endEvent

---

I think if you're gonna use OnItemRemoved, then you need to attach the script to the player somehow and not to the quest itself. I'm not exactly sure how to do that yet but the only thing I could think of is going to Quest Alias Tab, create a new reference then point it to PlayerRef. In that alias tab, there should be Papyrus Scripts at the right side, then add the script there to attach it to the player

 

Sorry if I'm not clear with my explanation, also note that I'm not pro at creation kit and papyrus(I'm just starting out) so I could probably be wrong, but hopefully this could help you start :smile:

Edited by hxhunter15
Link to comment
Share on other sites

  • Recently Browsing   0 members

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