QUEST SETUP

Announcements, support questions, and discussion for the Dialogue System.
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

QUEST SETUP

Post 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
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: QUEST SETUP

Post 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
huntersQuest.png (15.81 KiB) Viewed 968 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.
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: QUEST SETUP

Post 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?

User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: QUEST SETUP

Post 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
questChange1.png (37.62 KiB) Viewed 963 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.)
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: QUEST SETUP

Post 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
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: QUEST SETUP

Post 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
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: QUEST SETUP

Post 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?
User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: QUEST SETUP

Post 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?
hrohibil
Posts: 358
Joined: Thu Nov 04, 2021 12:50 pm

Re: QUEST SETUP

Post by hrohibil »

Sure
When i click on it it goes away.
I want it only to be checked when i complete that quest.

User avatar
Tony Li
Posts: 21068
Joined: Thu Jul 18, 2013 1:27 pm

Re: QUEST SETUP

Post 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.
Post Reply