MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Announcements, support questions, and discussion for the Dialogue System.
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Good Morning,

GameObject is "FLYNN" and QuestGiver.ID is blank/null.

Does the QuestGiver.ID default to ActorID if blank? In this case ActorID is 16.

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

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

This is the ID I'm talking about:

questGiverID.png
questGiverID.png (64.85 KiB) Viewed 119 times

Since you're procedurally generating the conversation, I assume you have a GameObject with a QuestGeneratorEntity component. This component requires that the GameObject also has a QuestGiver component.

You must pass the QuestGiver's ID as the first parameter of the ShowGeneratedQuestConversation() Lua function.
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Thats all it was! Updated the ID field and it worked.

When I was using the DialogueSystemQuestGiver Component, I left the ID and Display name blank. Obviously, QM is different and I need to stay consistent throughout my project.

I'll have to rewatch the QM tutorials/documentation and adjust accordingly.

Thanks again! As always greatly appreciate your support.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Glad to help!
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Is there functionality within QM to get the Procedurally Generated Quest - QuestID or do I need to write a custom LUA or Method to get this information?

DS Conversation runs and I can Link to the Procedural Generated Conversation and successfully accept the quest. Quest is in the player's journal.

When I go back to talk to the NPC QuestGiver, I run the same DS Conversation and depending on the condition (Active or Turn in) Link to the PGC.

I do not know how to check the status of a Procedurally Generated Quest.

Normally I would use the LUA dropdown menu / QUEST and check the status. However, since this is quest is procedurally generated it is not in that list of known quests.

The Quest Name and QuestID are randomly generated, So I just can't "hard code" it.

Appreciate you pointing me in the right direction.

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

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

You'll have to write a C# method to get the procedurally-generated quest and return its ID. For example:

Code: Select all

var quest = QuestMachine.GetQuestJournal().questList.Find(q => q.isProcedurallyGenerated);
return quest.id;
Alternatively, you can use the ShowGeneratedQuestConversation() Lua function in a dialogue entry and link that same entry to another dialogue entry:

showProcGen.png
showProcGen.png (30.44 KiB) Viewed 107 times

If ShowGeneratedQuestConversation() is able to start a procedurally-generated quest conversation, it will play that conversation. Otherwise it will continue the current conversation ("Hello. What's up?").
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Awesome... Thank you!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Glad to help!
Post Reply