Jump to content

[LE] Any idea on how to check whenever the player finish a radiant quest?


Recommended Posts

Hello everyone,

 

I'm currently looking for a way to check whenever the player finish a radiant quest... in a clean / simple / lightweight manner (eg. no polling interval, etc). I knew that we can use simple condition check with "IsCompleted" (in papyrus) or "GetQuestCompleted" (in CK), but isn't it only work for quests which can't be repeated/can only be done a single time?

What i need is a way to check everytime the player finish a radiant quest, because i'm going to add a single number into a global variable whenever the player finish it (and i need the total amount stored there for other function). Any help is appreciated. :smile:

 

Thanks!

Edited by qwertypol012
Link to comment
Share on other sites

Maybe instead you can use GetStage ? That only works for checking one quest at a time though. If you need to check all radiant quests, maybe you can use RegisterForTrackedStatsEvent() along with Game.QueryStat("Misc Objectives Completed") or something to that effect.

 

https://www.creationkit.com/index.php?title=RegisterForTrackedStatsEvent_-_Form

https://www.creationkit.com/index.php?title=QueryStat_-_Game

 

Link to comment
Share on other sites

Maybe instead you can use GetStage ? That only works for checking one quest at a time though. If you need to check all radiant quests, maybe you can use RegisterForTrackedStatsEvent() along with Game.QueryStat("Misc Objectives Completed") or something to that effect.

 

https://www.creationkit.com/index.php?title=RegisterForTrackedStatsEvent_-_Form

https://www.creationkit.com/index.php?title=QueryStat_-_Game

 

I knew about QueryStat, but i didn't know about RegisterForTrackedStatsEvent(). Is there a proper example on its usage? The example on the CK webpage isn't clear at all.

Also "Misc Objectives Completed" lists all kinds of misc quest (bounty, dungeons, favors, etc), while what i need are only favor-type quests.

 

Edit: I think i figured out on the usage of RegisterForTrackedStatsEvent(). But it seems to only track vanilla statistics, so i can't seem to use it to only track favor-type quests.

 

If compatibility with other mods that might change the radiant quests is not a concern, edit the radiant quests directly to increment your global upon completion.

Compatibility is definitely a concern. Editing every single radiant quest is out of option since it's not efficient at all and will be a compatibility nightmare. I once thought of editing only their scripts, but there are simply too many and it doesn't sound like a good idea (some mods are also editing it).

 

Thanks for the suggestions btw

Edited by qwertypol012
Link to comment
Share on other sites

Your best bet might be to do a sort of polling. Utilize the story manager to start a quest using the location change event for the story manager. Then have the quest check the status of each radiant quest. If you find one that is active, store a reference to it on a separate longer running script that will last for the lifetime of the mod (i.e. a separate management quest). Then when the player changes location again, check the radiant quests again. If one that was active before is no longer and its complete stage has been set, then advance your global.

 

Might have to work out some kinks with the idea. But it is better than having a script sit there running an update loop every few minutes or something.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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