Jump to content

Dialogue Conditional if Quest is tracked by player?


Recommended Posts

I've been looking for a dialogue conditional to track whether the player has a quest activated in their pipboy or not.

I thought I had seen one before but now I'm guessing there might not be one.

 

There is the script function Quest.IsActive() which does this and I could set up some sort of script to set a global, then use that as conditional.

But I'm hoping there's a cleaner way of doing this.

 

Any clues?

Edited by Reginald001
Link to comment
Share on other sites

you're looking for "GetQuestRunning".

That works for all running quests, regardless of whether they are activate in the players pipboy, right?

 

I think this is the conditional version for: https://www.creationkit.com/index.php?title=IsRunning_-_Quest

I was hoping there was also a conditional for 'IsActive'.

Edited by Reginald001
Link to comment
Share on other sites

I think this doesn't exist.

 

I will check periodically (e.g. onLocationChange) if specific quests are active to avoid topics on.

It's nasty but I don't see another way if there's no dialogue conditional available.

 

I will also check if there is perhaps a StoryManager event available that I can hook into.

A listening quest could be the solution, if any SM events are available.

Edited by Reginald001
Link to comment
Share on other sites

What are you actually trying to accomplish?

 

My NPC makes a remark on a 'running' (vanilla) quest, but only if that quest is selected to be 'active' in the pipboy.

She has a whole slew of quest related remarks she should only say if the player is actively engaged in that quest.

All of these are in a Shared Info, that uses conditionals to filter out what is relevant.

 

So I need the dialogue conditional version of Quest.IsActive() (Not IsRunning)

 

For instance, if the player has 'Join the settlers in Sanctuary' and 'Go to Diamond City' in their running quests, I don't want my NPC to say "So we're going to Sanctuary?" when the player just selected the map marker for Diamond City, etc..etc..

 

This also works vice-versa, if the player has a long running but inactive quest, the NPC might suggest to 'go check it out'.

Edited by Reginald001
Link to comment
Share on other sites

Still struggling with this. Trying to see if there's anything in the Story Manager Events that I can use, but nothing so far.

It's weird that this dialogue conditional is not available. It sounds like basic functionality.. (which quests are activated by the player).

 

But nothing so far. Also looking into the player actor script, perhaps there's some kind of array like 'Active Quests'..

 

I just don't want to set up a looping script that checks active quests... it's daft.. overkill.. and likely will be bad for performance. :(

Edited by Reginald001
Link to comment
Share on other sites

Instead of using a loop, since the player can only change the active quests by opening the pipboy, you could use a conditional script with a conditional property that you fill when the pipboy is closed by filling the property with IsActive(). Then use GetVMQuestVariable as dialogue conditional.

Scriptname CheckActiveQuestScript extends Quest Conditional

Bool Property MyQuestIsActive Auto Conditional

Event OnQuestInit()
	RegisterForMenuOpenCloseEvent("PipboyMenu")
EndEvent

Event OnMenuOpenCloseEvent(string asMenuName, bool abOpening)
	If asMenuName == "PipboyMenu" && !abOpening
		MyQuestIsActive = IsActive()
	EndIf
EndEvent

Edited by DieFeM
Link to comment
Share on other sites

  • Recently Browsing   0 members

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