Hi!
Is there a way to change the quest description as the quest progresses? Not through entries as the entries should just be what the objective is, I just want to update the quest description like a log as the player progresses through the quest.
Thank you
A way to change quest description at runtime?
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: A way to change quest description at runtime?
You can still use other entries as a log. Or you can modify the Description like this in C#:
If you do this, you'll want tick the Dialogue Manager's Persistent Data Settings > Include All Quest & Item Data so it includes the updated descriptions in saved game data.
Code: Select all
string currentDescription = DialogueLua.GetQuestField("Your Quest Name", "Description").asString;
currentDescription += "\nThis is another line of description text.";
DialogueLua.SetQuestField("Your Quest Name", "Description", newDescription);
DialogueManager.SendUpdateTracker(); // Update UIs in case they're open.
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: A way to change quest description at runtime?
That's exactly it, I was able to make it into an PM action, thank you!Tony Li wrote: ↑Thu Feb 15, 2024 6:40 pm You can still use other entries as a log. Or you can modify the Description like this in C#:
If you do this, you'll want tick the Dialogue Manager's Persistent Data Settings > Include All Quest & Item Data so it includes the updated descriptions in saved game data.Code: Select all
string currentDescription = DialogueLua.GetQuestField("Your Quest Name", "Description").asString; currentDescription += "\nThis is another line of description text."; DialogueLua.SetQuestField("Your Quest Name", "Description", newDescription); DialogueManager.SendUpdateTracker(); // Update UIs in case they're open.
I'm getting into the Quest system, it's really cool!
I've bee wondering about one thing, would you have any experience on how to assign quest markers that show up on the HUD to certain quests and entries? Like in usual RPGs, you get a Quest and then an quest icon shows up in your HUD that lets you know where to go according to the active entry.
I have the icon logic down, I set a game object from the world as the direction and translate that to the HUD, but I'm just not sure how to assign a game object to each entry of each quest, or rather how each entry holds the game object that tells the icon where to assign itself when a certain quest is active. Do you have any tips that could point me in the right direction?
Re: A way to change quest description at runtime?
Hi,
It's a bit easier in Quest Machine, but in the Dialogue System you can use quest indicators. A typical quest indicator is an icon over an NPC's head. But since a quest indicator can be any GameObject, you could make it a GameObject on a layer that's only seen by your minimap camera (if that's how you're doing a minimap), or an overhead icon, or both.
It's a bit easier in Quest Machine, but in the Dialogue System you can use quest indicators. A typical quest indicator is an icon over an NPC's head. But since a quest indicator can be any GameObject, you could make it a GameObject on a layer that's only seen by your minimap camera (if that's how you're doing a minimap), or an overhead icon, or both.
-
- Posts: 24
- Joined: Fri Sep 22, 2023 5:05 pm
Re: A way to change quest description at runtime?
I think I've found a way to manage it with the Quest State Listener and the On Enter events, thank you for pointing me in the right direction!Tony Li wrote: ↑Thu Feb 15, 2024 9:34 pm Hi,
It's a bit easier in Quest Machine, but in the Dialogue System you can use quest indicators. A typical quest indicator is an icon over an NPC's head. But since a quest indicator can be any GameObject, you could make it a GameObject on a layer that's only seen by your minimap camera (if that's how you're doing a minimap), or an overhead icon, or both.
One last question, could you clarify what the "Add New Field To Entry" is when creating Quest Entries?
Re: A way to change quest description at runtime?
"Add New Field To Entry" is a helper button to create a custom field. For example, if you enter "XP" in the input field for Entry 2 and click the button, it will create a custom field named "Entry 2 XP".