Jump to content

How do you make a plugin only activate after the completion of a quest?


STEAK176173

Recommended Posts

I don't know if you can. Of course someone else may come along and tell otherwise and I hope someone more knowledgeable does come about.

 

I have used tons of Skyrim mods (and made some for myself) and have never encountered what you are saying. Now there are ways to script a mod not to start until certain conditions are met but the plug in is active.

 

This is why you occasionally see mods which advise not to add and/or activate until a certain point in the game. That way there is no interference with whatever happens in a place or with something or someone.

 

I hope someone comes along to give you a more definite answer but as I said I have not encountered a way to activate the actual plug in via a game condition. Good luck!!

Link to comment
Share on other sites

Whatever your mod does, you'll need to have it start with a quest or a script, and only after the player joins the Dawnguard. There's no way to activate an ESP once the game is launched. Even if you did, the game loads all of the data at launch, so it won't update if you've already launched the game. The alternative would be to simply not install the mod until you've reached that point, but that's more likely to result in people spamming your mod's page claiming that it broke things when they simply didn't follow instructions.

 

Activating a script or quest conditionally isn't that difficult, if that's what you decide to do.

Edited by GreatSilentOne
Link to comment
Share on other sites

What exactly is your mod adding ? As pointed out above, you should be able to 'lock out' that content using basic quest stages (even if your mod isn't a quest mod). E.g. if there is a dungeon, enable its door at a given stage; if there is a piece of armor, enable it in game only at a given stage. If there is a recipe to make the armor at a forge, you'd also add a condition in that recipe that requires reaching that quest stage.

 

But, yeah, locking out the whole mod doesn't--in most cases--make sense, even if it's possible. It's probably going to have to be loaded.

Edited by csbx
Link to comment
Share on other sites

It's a player home mod for Castle Volkihar and i don't want it to change anything until after defeating Harkon. Otherwise it will interfere with Dawnguard Quests. I see some of you guys had ideas about using scripts and or quest stages if you could please tell me how that would work in my case.

Link to comment
Share on other sites

If you have just adding/removing stuff then you could have the new stuff disabled by default, a script with a bunch of properties, when the relevant quest is completed enable your stuff and disable the stuff that needs to be disabled. if the changes involve moving stuff, instead of moving add a new object on the new location and do the same disable/enable procedure.

 

Your script would be something like this and call EnableMod() in the appropiate stage or have the code in an event

 

ScriptName lalala extends Quest


Formlist[] Property EnableList Auto
Formlist[] Property DisableList Auto


Function EnableMod()
   Int iIndex
   iIndex = EnableList.GetSize()
   While iIndex
      iIndex -= 1
      ObjectReference kReference = EnableList.GetAt(iIndex) As ObjectReference 
         kReference.Enable()
      EndIf
   EndWhile
   iIndex = DisableList.GetSize()
   While iIndex
      iIndex -= 1
      ObjectReference kReference = DisableList.GetAt(iIndex) As ObjectReference 
         kReference.Disable()
      EndIf
   EndWhile
EndFunction

Check this tutorial which is a similar script: http://www.creationkit.com/index.php?title=Complete_Example_Scripts#Cycle_Through_a_List_of_Objects_and_Perform_an_Action_on_Each_Object.28FormLists.29

 

If you haven't done any scripting before check the beginner tutorials in here: http://www.creationkit.com/index.php?title=Category:Papyrus

 

Edited because i'm an idiot and used arrays instead of formlists and because the nexus breaks my formatting...

Link to comment
Share on other sites

One possible approach: add a volume trigger (or xmarker) to your cell and then set all of your added objects (via pressing '-' and using Reference Batch Action) to refer to the volume trigger as an enable parent. Disable that added volume trigger (now the items you've added to the cell are disabled at startup) and then enable that volume trigger via a setstage.

 

I'm presuming that you've just added items to the existing cell ? If part of what you have done is just move vanilla objects around, that will require a bit of cleanup (e.g. duplicating the vanilla objects instead of moving them and then using 'set enable state to opposite' for the vanilla placed versions--ie. the vanilla positioned one sets to disable whenever the newly positioned version is enabled).

Edited by csbx
Link to comment
Share on other sites

https://youtu.be/PYNGK2vJ418?t=858

This should link you to where he starts talking about XMarkers and enable parents, but you may want to watch it all of the way through to get the gist of what he's talking about. This will help you implement the system CSBX mentioned, with a visual guide on what he's talking about.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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