Assigning quest with Dialogue Manager

Announcements, support questions, and discussion for Quest Machine.
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Assigning quest with Dialogue Manager

Post by timbecile »

Hey Tony,

so I've imported the third party support for Dialogue Manager and Quest Machine, put the Dialogue System Quest Machine Bridge on my Dialogue Manager, put the Dialogue System Quest Dialogue UI on Quest Machine, and used the import tool to get my Quest Machine quest into Dialogue manager.

It appears in the wizard utility just fine, and I added it to the script, but when I run the dialog I get this error:

Code: Select all

SetQuestState("MainLine1", "active")' threw exception 'Code has syntax errors:
Line 4, Col 1 'D': Failed to parse Letter of Name.
Line 4, Col 1 'D': Failed to parse Name of VarName.
Line 4, Col 1 'D': Failed to parse 'nil' of NilLiteral.
Line 4, Col 1 'D': Failed to parse Text of BoolLiteral.
Line 4, Col 1 'D': Failed to parse '0'...'9' of Digit.
Line 4, Col 1 'D': Failed to parse (Digit)+ of FloatNumber.
Line 4, Col 1 'D': Failed to parse Name of VariableArg.
Line 4, Col 1 'D': Failed to parse firstTerm of OperatorExpr.
Not sure what I missed...
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning quest with Dialogue Manager

Post by Tony Li »

Hi,

What is the full content of the Script field for that dialogue entry node?
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: Assigning quest with Dialogue Manager

Post by timbecile »

Here it is: The first SetQuestState is the old one using Dialogue system

Code: Select all

SetQuestState("Deliver Weapons to Ableton Guards", "active");
GiveItem("Weapon","Quest",6);
DoQuestSound();
DoQuestAnalytics("Deliver Weapons to Ableton Guards", "started");;;
SetQuestState("MainLine1", "active")
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning quest with Dialogue Manager

Post by Tony Li »

Hi,

Please remove the extra semicolons on line 4. Change it to:

Code: Select all

SetQuestState("Deliver Weapons to Ableton Guards", "active");
GiveItem("Weapon","Quest",6);
DoQuestSound();
DoQuestAnalytics("Deliver Weapons to Ableton Guards", "started");
SetQuestState("MainLine1", "active")
The Lua parser doesn't handle extra semicolons well. That's something that I'll need to fix in a later update.

Should you get another error like that in the future, note the line number that the error message reports. It will help you identify which line has the offending code.
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: Assigning quest with Dialogue Manager

Post by timbecile »

Thanks!

It ran without giving an error this time, but the quest didn't show up on the Quest Log. Is there something I have to do to connect them together?

Also, is there a way to just show all of a conversant's dialog right away instead of doing it character by character?
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning quest with Dialogue Manager

Post by Tony Li »

timbecile wrote: Wed Nov 25, 2020 8:11 pmIt ran without giving an error this time, but the quest didn't show up on the Quest Log. Is there something I have to do to connect them together?
Since it's a Quest Machine quest, it will show up Quest Machine's Quest Journal UI, not the Dialogue System's Quest Log Window. If it doesn't show up in the Quest Journal UI, make sure your quest has some content in its Journal Text sections for the current state of the quest.
timbecile wrote: Wed Nov 25, 2020 8:11 pmAlso, is there a way to just show all of a conversant's dialog right away instead of doing it character by character?
Yes. Just remove the typewriter effect component from the dialogue UI's subtitle text GameObject(s).
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: Assigning quest with Dialogue Manager

Post by timbecile »

Tony Li wrote: Wed Nov 25, 2020 8:20 pm
Since it's a Quest Machine quest, it will show up Quest Machine's Quest Journal UI, not the Dialogue System's Quest Log Window. If it doesn't show up in the Quest Journal UI, make sure your quest has some content in its Journal Text sections for the current state of the quest.
I guess I should mention that I was looking in the quests section of the Quest Machine's Quest Journal and didn't see the quest appear there. I saw that quests would appear there in the demo scene..
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning quest with Dialogue Manager

Post by Tony Li »

That means the player hasn't actually received the quest yet. In the Script field or an earlier Script field, have you given a copy of the quest to the player?

If not, you may need to add GiveQuest() calls to your Script field. You can probably also remove the SetQuestState() calls since GiveQuest() will automatically make the player's copy active. Specify the Quest Giver's ID where I typed "Quest Giver ID" below.

Code: Select all

GiveQuest("Quest Giver ID", "Deliver Weapons to Ableton Guards");
GiveItem("Weapon","Quest",6);
DoQuestSound();
DoQuestAnalytics("Deliver Weapons to Ableton Guards", "started");
GiveQuest("MainLine1", "Quest Giver ID")
(EDIT: Note - I had previously typed the GiveQuest() parameters in the wrong order. Corrected above.)
timbecile
Posts: 110
Joined: Mon Mar 12, 2018 11:00 pm

Re: Assigning quest with Dialogue Manager

Post by timbecile »

Definitely haven't given a copy of the quest to the player yet.

Still didn't work when I tried 'GiveQuest'. I get the Quest giver ID from the actual quest, right? I copy-pasted it from there.

About the dialog typing thing, I turned off the typewriter effect, but it still waits an amount of time before the responses are shown. Is there a way I can turn that off too? I want the player's dialog choices to be available right away.
User avatar
Tony Li
Posts: 21070
Joined: Thu Jul 18, 2013 1:27 pm

Re: Assigning quest with Dialogue Manager

Post by Tony Li »

timbecile wrote: Fri Nov 27, 2020 3:07 pmDefinitely haven't given a copy of the quest to the player yet.

Still didn't work when I tried 'GiveQuest'. I get the Quest giver ID from the actual quest, right? I copy-pasted it from there.
Get it from the Quest Giver component's ID section. For example, if you look at the Villager NPC in Quest Machine's Demo scene (Level > NPCS > Villager), you should see that the ID field is set to "Villager". To give the quest Pesky Rabbits quest (whose ID is "peskyRabbits"), you'd use:

Code: Select all

GiveQuest("Villager", "peskyRabbits")
(EDIT: Note - I had previously typed the GiveQuest() parameters in the wrong order. Corrected above.)
timbecile wrote: Fri Nov 27, 2020 3:07 pmAbout the dialog typing thing, I turned off the typewriter effect, but it still waits an amount of time before the responses are shown. Is there a way I can turn that off too? I want the player's dialog choices to be available right away.
Inspect the Dialogue Manager GameObject, and set Display Settings > Camera & Cutscene Settings > Default Sequence to:

Code: Select all

None()
Post Reply