[HOWTO] Debug Quests No Longer Appearing In Journal
Posted: Fri Jul 23, 2021 9:12 am
If your player can no longer accept a quest, read this article for one debugging tip.
Quests are normally assigned to the player's Quest Journal using a Quest Giver component (e.g., on an NPC) or in a script.
A quest can exist as an asset file in your Project view or as an in-memory instance at runtime. Normally, when a Quest Giver wakes, it creates in-memory instances of all quest asset files in its Quest List. When it gives a quest to the player, it makes a new copy of the quest instance and stores it in the player's Quest Journal. Then it increments the internal "times accepted" value of its own in-memory instance.
One possibility is that somehow the "times accepted" value of the quest asset file, and not the in-memory instance, was changed. If this is the case, and if the value exceeds the quest's Max Times value, the quest will no longer be offerable.
To check if this happened, inspect the quest asset file, and change the Inspector view to Debug. Then look for the Times Accepted field:
If it's not zero, you can fix it by setting it to zero. In this case, you'll also want to get to the bottom of why it changed in the first place. One possibility is that you have a script that's operating on quests in Awake, before the Quest Giver or Quest Journal has had an opportunity to create in-memory instances of its quest list.
Quests are normally assigned to the player's Quest Journal using a Quest Giver component (e.g., on an NPC) or in a script.
A quest can exist as an asset file in your Project view or as an in-memory instance at runtime. Normally, when a Quest Giver wakes, it creates in-memory instances of all quest asset files in its Quest List. When it gives a quest to the player, it makes a new copy of the quest instance and stores it in the player's Quest Journal. Then it increments the internal "times accepted" value of its own in-memory instance.
One possibility is that somehow the "times accepted" value of the quest asset file, and not the in-memory instance, was changed. If this is the case, and if the value exceeds the quest's Max Times value, the quest will no longer be offerable.
To check if this happened, inspect the quest asset file, and change the Inspector view to Debug. Then look for the Times Accepted field:
If it's not zero, you can fix it by setting it to zero. In this case, you'll also want to get to the bottom of why it changed in the first place. One possibility is that you have a script that's operating on quests in Awake, before the Quest Giver or Quest Journal has had an opportunity to create in-memory instances of its quest list.