Page 1 of 3
QUEST SETUP
Posted: Tue Nov 23, 2021 3:50 pm
by hrohibil
Hello Toni
Im back...
My case: I have setup so when my player reaches the first NPC, a dialogue starts with an cutscene.
Basically the NPC tells in the dialogue which first object/target he has to destroy.
I would like that after this conversation, to add the mission object as text in my questlog.
And like wise when i kill my object, i would like in the quest log that the first objective is marked of as completed somehow..
Also can i add pictures/images to the questlog? I want to show the target..
I hope it all makes sense..
Thank you
Re: QUEST SETUP
Posted: Tue Nov 23, 2021 4:08 pm
by Tony Li
Hi,
I don't remember if you're using Quest Machine for your quests. If so, let me know and I'll describe that process. For Dialogue System quests, see below.
When you write your quest, define each objective as a quest entry. (See image below.) Set the entry 1's state to active so it starts active when the quest becomes active.
Use the SetQuestState and SetQuestEntryState Lua functions to change quest states and quest entry states, typically in dialogue entry nodes' Script fields.
If you want to show different text when an entry becomes successful, you can manually add a new field named "Entry # Success" like the "Entry 1 Success" field I added in the image below.
If you use TextMesh Pro (see
TMPro Support) for your quest log window and quest tracker HUD, you can use
<sprite> tags to include images.
- huntersQuest.png (15.81 KiB) Viewed 1197 times
You can configure your quest tracker HUD to show completed entries, and even to show completed entries in a different style such as with strikethrough.
Re: QUEST SETUP
Posted: Tue Nov 23, 2021 4:43 pm
by hrohibil
Hey Toni
See my image. I setup the first part. I did everything except this part below
"Use the SetQuestState and SetQuestEntryState Lua functions to change quest states and quest entry states, typically in dialogue entry nodes' Script fields.
If you want to show different text when an entry becomes successful, you can manually add a new field named "Entry # Success" like the "Entry 1 Success" field I added in the image below."
Inside my game when opening pause menu(i am using your menu framework) and press quest log,, its empty...
How do i see my quest log, just as a test to begin with?
Then how do link this quest to only be active on my first convsaation with my NPC?
Re: QUEST SETUP
Posted: Tue Nov 23, 2021 5:58 pm
by Tony Li
Hi,
To test the quest without picking it up through activity such as a conversation, set its main state to active:
- questChange1.png (37.62 KiB) Viewed 1192 times
You can also change it at runtime in the Dialogue Editor's
Watches section.
(Disregard the circle I put around the main quest name.)
Re: QUEST SETUP
Posted: Wed Nov 24, 2021 4:11 am
by hrohibil
Aha
That’s makes sence. Yes I just want an initial test first.
So now back to the set quest on conversation.
In the conversation, put the SetQuestState or SetQuestEntryState in a script field?
Meaning that I can’t start the quest on any of the nodes I want?
How do I complete a quest when I want it to complete after I kill a specific enemy??
Thank you Toni
Re: QUEST SETUP
Posted: Wed Nov 24, 2021 8:40 am
by Tony Li
You can start the quest on any node by configuring the node's Script field with a SetQuestState command. Example:
- Script: SetQuestState("Objective 1", "active")
(Use the "..." button so you don't have to type anything.)
You can also end the quest the same way:
- Script: SetQuestState("Objective 1", "success")
Or you can end the quest without using a conversation. See:
How To: Set Up Quests Without Conversations
Re: QUEST SETUP
Posted: Wed Nov 24, 2021 2:12 pm
by hrohibil
Wow
Its so simple...
I used the Script: SetQuestState("Objective 1", "active")... And it worked. I l will try to complete the quest next, but i noticed that there was a checkmark on my box` Should this check mark not first display when the quest is completed?
Re: QUEST SETUP
Posted: Wed Nov 24, 2021 2:21 pm
by Tony Li
hrohibil wrote: ↑Wed Nov 24, 2021 2:12 pmi noticed that there was a checkmark on my box` Should this check mark not first display when the quest is completed?
Which checkmark? Can you please post a screenshot?
Re: QUEST SETUP
Posted: Wed Nov 24, 2021 2:43 pm
by hrohibil
Sure
When i click on it it goes away.
I want it only to be checked when i complete that quest.
Re: QUEST SETUP
Posted: Wed Nov 24, 2021 3:13 pm
by Tony Li
Hi,
That checkbox controls tracking. When it's ticked, the
quest tracker HUD shows the quest's details. Usually this checkbox is ticked while the quest is active so players can track their progress.
If you want a quest's tracking to start disabled, in the Dialogue Editor UNtick the quest's Track On Start checkbox.