Jump to content

[Question] Can I check quest stages without adding mods as hard requirements?


Guest

Recommended Posts

Posted

I usually play characters which don't enjoy/seek out sexual situations, but with mods that make them happen anyway.

 

There are a lot of fun mods, like Angrim's Apprentice or Captured Dreams, where there aren't very many good RP reasons for my character to start playing them. So I want to make a small quest mod to complement these, like an NPC who asks you to investigate the Captured Dreams shop or learn spells from Angrim. I want to make the dialogue depend on the quest stage of these mods, but without adding them as dependencies, since otherwise the mod will end up with too many dependencies and won't be playable for anyone without that long list of mods.

 

So, is this possible?

Posted

Do-able

 

You would need to have a bunch of dummy quests (with Run Once and Start Game Enabled both UNticked) separate from your main quest (the one with dialogues):

  • CheckAngrim
  • CheckCD

And a bunch of globalvariables corresponding to those, with default values of -1 (-1 isn't a value quest stage, so for us, it would mean 'mod not installed'):

  • CheckAngrimStage
  • CheckCDStage

Then attach a script to each dummy quest:

 

GlobalVariable property CheckAngrimStage auto ; autofill property

 

Event OnQuestInit()

   Quest AngrimQuest = Game.GetFormFromFile(0x000000, "Angrim_Apprentice.esp") ; replacing 0x000000 with the Angrim's quest's FormID

   If AngrimQuest

       ;Angrim mod is installed

       CheckAngrimStage.setValue(AngrimQuest.getStage())

   Else

       ;Angrim mod is not installed

       CheckAngrimStage.setValue(-1)

   Endif

   Stop(); otherwise it would only work once

EndEvent

 

Everytime you want to check the current Angrim Quest's stage, simply use this in a script attached to anything/ dialogue fragment:

 

CheckAngrim.Start()

 

(You can also periodically check the current stage of that quest instead using RegisterForSingleUpdate and OnUpdate, but I don't think that would be necessary)

 

Then finally move back to your own main quest with all the dialogues, open your dialogue that relies on Angrim, and add the following condition

 

GetGlobalValue  CheckAngrimStage  == 20

 

(or whatever stage you want)

Posted

Instead of getformfromfile (which throws errors if the mod is not installed) you can use GetModByName to check for an esp to establish if its installed; and then Ive personally used both getformfromfile and getquestbyname (the creationkit wiki has a few other options) to retrieve a quest; and from there you can handle it just like any other quest.

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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