[Solved] Quest HUD / Quest Tracking Change Events
Re: Quest HUD Customization
Ah yep, thats the code i just ended up finding and working with, but for some reason no matter WHAT i do, even if i reference the database, do a search of the QuestAssets list to find the quest, and manually force the QuestNode to do its actions, still nothing happens. Not even the DebugLog messages.
I'll keep trying, thanks. I dont think I can upload my project, its 20gb+. But I'll keep trying.
Whenever i check the Quest in playmode tho, it just keeps saying Inactive. The Quest progresses normally, but the QuestEditor window just shows WaitingForStart.
I'll keep trying, thanks. I dont think I can upload my project, its 20gb+. But I'll keep trying.
Whenever i check the Quest in playmode tho, it just keeps saying Inactive. The Quest progresses normally, but the QuestEditor window just shows WaitingForStart.
Re: Quest HUD Customization
Are you looking at the instance of the quest that's in the Quest Giver's quests list or the instance that's in the player's Quest Journal?
Re: Quest HUD Customization
Oh, neither, i was checking the quest in the Asset folder. Just opening the QuestEditor window during PlayMode
EDIT: The one in the Quest Journal object is greyed out, and when i open the one in the QuestGiver its the same as before- all states show Inactive, etc. But the quest proceeds normally
EDIT: The one in the Quest Journal object is greyed out, and when i open the one in the QuestGiver its the same as before- all states show Inactive, etc. But the quest proceeds normally
Re: Quest HUD Customization
Per below:
- Attachments
-
- questEditor.PNG (580.13 KiB) Viewed 1179 times
-
- questjournal.PNG (46.86 KiB) Viewed 1179 times
Re: Quest HUD Customization
So I added a bunch of debug logs to this "re-do Actions" code for the Quest Node, and it they all fired EXCEPT the "QuestNodeState == Active" part.
It successfully found the Quest in the Database, found the Node in the Quest, but DIDN'T read the Node as active, even though the HUD and Journal and system itself does function normally. So I'm not sure why its not recognizing it as being active..
EDIT: bypassing the Active check, i added another debug log for the Actions part, and it says it does them but it doesnt actually do them. So yeah I'm kinda at a loss.
It successfully found the Quest in the Database, found the Node in the Quest, but DIDN'T read the Node as active, even though the HUD and Journal and system itself does function normally. So I'm not sure why its not recognizing it as being active..
EDIT: bypassing the Active check, i added another debug log for the Actions part, and it says it does them but it doesnt actually do them. So yeah I'm kinda at a loss.
- Attachments
-
- debug list.PNG (48.66 KiB) Viewed 1179 times
Re: Quest HUD Customization
The quest asset in your Project view will not change during play.
When the Quest Giver initializes, it will create an instance (an in-memory copy) of the quest asset. The Quest Giver records certain information its instance of the quest, such as how many times it's given out the quest and, for repeatable quests, how much time remains before it can give out the quest again.
When the player accepts the quest, the Quest Giver will create a new copy of its quest instance, and it will store this new copy in the player's Quest Journal. The Quest Journal will set this new copy active. As the player completes the objectives in the quest nodes, it will update the states in this copy of the quest. The original quest asset in the Project view will not change, nor will the instance held by the Quest Giver.
I'll put together a small example scene in just a bit.
When the Quest Giver initializes, it will create an instance (an in-memory copy) of the quest asset. The Quest Giver records certain information its instance of the quest, such as how many times it's given out the quest and, for repeatable quests, how much time remains before it can give out the quest again.
When the player accepts the quest, the Quest Giver will create a new copy of its quest instance, and it will store this new copy in the player's Quest Journal. The Quest Journal will set this new copy active. As the player completes the objectives in the quest nodes, it will update the states in this copy of the quest. The original quest asset in the Project view will not change, nor will the instance held by the Quest Giver.
I'll put together a small example scene in just a bit.
Re: Quest HUD Customization
Here's an example scene:
QM_InvectorQuestPointerExample_2021-12-27.unitypackage
It's the Shooter Example that's included in Quest Machine's Invector integration, except I added two quest pointers. One appears above the shotgun when the "Get Shotgun" node is active. The other appears next to the NPC when the "Return to NPC" node is active.
Since the scene doesn't use a minimap, I just made them in-scene sprites. But the same idea applies to minimaps.
QM_InvectorQuestPointerExample_2021-12-27.unitypackage
It's the Shooter Example that's included in Quest Machine's Invector integration, except I added two quest pointers. One appears above the shotgun when the "Get Shotgun" node is active. The other appears next to the NPC when the "Return to NPC" node is active.
Since the scene doesn't use a minimap, I just made them in-scene sprites. But the same idea applies to minimaps.
Re: Quest HUD Customization
Thanks so much! This seems to work now, I'll be able to expand it to talk to all the pointers and such I need to change.
Thanks again for making all this so easy to work with.
Thanks again for making all this so easy to work with.
Re: Quest HUD Customization
Glad to help! Thanks for sticking with it. The initial setup of any game system can often take a while.
Re: Quest HUD Customization
Ah, so I spoke a bit too soon but I think I'm close. So I'm like 75%% of the way there- when I accept a NEW quest, it does properly switch over to the new Quest Pointer target,
BUT if I manually track and untrack them, It only recognizes the most recently accepted Quest's node. The events are controlled by that most recent example you sent, so its properly recognizing the Quest Nodes for INDIVIDUAL Quests, but not if I track or accept new ones.
Here's an example video showing the issue more clearly:
-I accept the HEALTH POTION QUEST, and it points the UI and activates the proper objects for that quest.
-Then I accept the SHOTGUN QUEST, and it switches the pointer target and activates the new objects for that quest too.
-BUT if I manually open the Quest Journal and track/untrack each Quest, it stays with the most recently accepted Quest's current Node message.
I THINK what I need to come up with is a way to "force Check the Node State" on the script you sent, so instead of just letting it passively send the message whenever it changes states, I need to write a simple function to reference the script you gave me, and "double check" if the Required Node State == QuestNodeState.Active.
I'll keep working on it though, you've gotten me almost all the way there! Thanks
BUT if I manually track and untrack them, It only recognizes the most recently accepted Quest's node. The events are controlled by that most recent example you sent, so its properly recognizing the Quest Nodes for INDIVIDUAL Quests, but not if I track or accept new ones.
Here's an example video showing the issue more clearly:
-I accept the HEALTH POTION QUEST, and it points the UI and activates the proper objects for that quest.
-Then I accept the SHOTGUN QUEST, and it switches the pointer target and activates the new objects for that quest too.
-BUT if I manually open the Quest Journal and track/untrack each Quest, it stays with the most recently accepted Quest's current Node message.
I THINK what I need to come up with is a way to "force Check the Node State" on the script you sent, so instead of just letting it passively send the message whenever it changes states, I need to write a simple function to reference the script you gave me, and "double check" if the Required Node State == QuestNodeState.Active.
I'll keep working on it though, you've gotten me almost all the way there! Thanks