Page 2 of 2

Re: Quest Giver Dialogue Content through Dialogue System

Posted: Wed Mar 06, 2019 7:16 pm
by nathanj
HI Tony


Finally getting around to trying all the recent additions to QM, DS and USurvival integrations and am so happy with everything.

1. I do have one small question/request. How hard would it be to add a response button option to the Dialogue Content fields that are displayed through the DS UI? At the moment the user needs to press escape to get out of the conversation.

2. could you tell me where the setting is that routes the Dialogue Content through the DS UI? Or, does it just happen automatically if you are using the DS integration?

3. I'm trying to make my dialogue as generic as possible so different conversations can be assigned to multiple quest givers. Is there any way to implement something like:

Code: Select all

GiveQuest({QuestGiver}, "WarrigalGreens")
rather than assigning a specific questID?

4. Just reading through the documentation again and I noticed this message at the head of the Lua Commands
The Dialogue System Quest Machine Bridge adds the Lua functions below. If your game has only one player/quester, you can use the simpler Quests On Default Player functions. If your game has multiple questers, use the Quests on Any Quester functions.
Does multiple questers mean multiplayer? If so, how do we know what questerID to set?

Thanks in advance,
Nathan

Re: Quest Giver Dialogue Content through Dialogue System

Posted: Wed Mar 06, 2019 8:39 pm
by Tony Li
Hi Nathan,

Good timing for these questions! I'm working on Quest Machine updates this week. So if any of my answers below prompt additional feature requests, let me know.
nathanj wrote: Wed Mar 06, 2019 7:16 pm1. I do have one small question/request. How hard would it be to add a response button option to the Dialogue Content fields that are displayed through the DS UI? At the moment the user needs to press escape to get out of the conversation.
What kind of conversation? One of the automatically-generated "list" conversations, or a conversation that you've written by hand in the Dialogue System's Dialogue Editor window?
nathanj wrote: Wed Mar 06, 2019 7:16 pm2. could you tell me where the setting is that routes the Dialogue Content through the DS UI? Or, does it just happen automatically if you are using the DS integration?
If the Quest Machine GameObject has a Dialogue System Quest Dialogue UI component, and if its Generate Conversation For Quest Lists checkbox is ticked, it will automatically generate and show "list" conversations when the quest giver has more than one quest to talk about. This conversation will also show Cancel Quest List Text as a response button to exit without choosing a quest.

When showing the dialogue content for a quest, Quest Machine will only play a Dialogue System conversation if the dialogue content contains a Dialogue System Conversation Quest Content. (Inspect the integration demo's quests for examples.)
nathanj wrote: Wed Mar 06, 2019 7:16 pm3. I'm trying to make my dialogue as generic as possible so different conversations can be assigned to multiple quest givers. Is there any way to implement something like:

Code: Select all

GiveQuest({QuestGiver}, "WarrigalGreens")
rather than assigning a specific questID?
When Quest Machine starts a Dialogue System conversation for a quest, it sets the conversation's QuestID field to the quest's ID. Say your conversation is ID 3. Also assume that the quest giver's actor name in your dialogue database is the same as its quest giver ID. Then you could do this:

Code: Select all

GiveQuest(Variable["Conversant"], Conversation[3].QuestID)
nathanj wrote: Wed Mar 06, 2019 7:16 pm4. Just reading through the documentation again and I noticed this message at the head of the Lua Commands
The Dialogue System Quest Machine Bridge adds the Lua functions below. If your game has only one player/quester, you can use the simpler Quests On Default Player functions. If your game has multiple questers, use the Quests on Any Quester functions.
In the case of uSurvival, only the local player has a quest journal, so you can use the simpler form.

Outside of uSurvival, multiple questers could mean multiplayer, or it could mean NPC questers as in the AI Questers tutorial.

Re: Quest Giver Dialogue Content through Dialogue System

Posted: Wed Mar 06, 2019 10:09 pm
by nathanj
Thanks for the detailed response, Tony
What kind of conversation? One of the automatically-generated "list" conversations, or a conversation that you've written by hand in the Dialogue System's Dialogue Editor window?
I was talking about the automatically-generated conversations. I looked at the demo scene and saw that the default behaviour is exactly what I was talking about. I then opened my build and tried again and the response button is there! I have no idea if i just wasn't seeing the button or what but it's acting exactly how it should.
When Quest Machine starts a Dialogue System conversation for a quest, it sets the conversation's QuestID field to the quest's ID. Say your conversation is ID 3. Also assume that the quest giver's actor name in your dialogue database is the same as its quest giver ID. Then you could do this:
CODE: SELECT ALL

Code: Select all

GiveQuest(Variable["Conversant"], Conversation[3].QuestID)
Still stuck on this one. Where do I get the quest ID? Above you give ID 3. Is it just the string value from the Quest Info Quest ID field?
Image

If I add this to my Dialogue System node

Code: Select all

GiveQuest(Variable["Conversant"], Conversation[WarrigalGreens].QuestID)
I get this error

Code: Select all

Dialogue System: Lua code 'GiveQuest(Variable["Conversant"], Conversation[WarrigalGreens].QuestID)' threw exception 'Lookup of field 'QuestID' in the table element failed because the table element itself isn't in the table.'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter Wrapper/Lua.cs:219)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter Wrapper/Lua.cs:120)
PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry, Boolean, Boolean, Boolean) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:233)
PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:297)
PixelCrushers.DialogueSystem.ConversationController:OnSelectedResponse(Object, SelectedResponseEventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:257)
PixelCrushers.DialogueSystem.ConversationView:SelectResponse(SelectedResponseEventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:454)
PixelCrushers.DialogueSystem.ConversationView:OnSelectedResponse(Object, SelectedResponseEventArgs) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:447)
PixelCrushers.DialogueSystem.AbstractDialogueUI:OnClick(Object) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI Subsystem/Abstract/Abstract Dialogue UI/AbstractDialogueUI.cs:346)
PixelCrushers.DialogueSystem.StandardDialogueUI:OnClick(Object) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI Subsystem/Standard/Dialogue/StandardDialogueUI.cs:210)
UnityEngine.Component:SendMessage()
PixelCrushers.DialogueSystem.StandardUIResponseButton:OnClick() (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/UI Subsystem/Standard/Dialogue/StandardUIResponseButton.cs:124)
UnityEngine.EventSystems.EventSystem:Update()
Thank you again,
Nathan

Re: Quest Giver Dialogue Content through Dialogue System

Posted: Thu Mar 07, 2019 1:26 am
by nathanj
Ok, I got it to work. I had missed the part about having the character assigned in the database.

However, I don't think this is going to work for me though because it still requires assigning the NPC names to the Dialogue Database. I was hoping to keep it completely generic. Our previous discussion viewtopic.php?f=3&t=2086 about assigning Dialogue Database conversations to NPCs by typing the Quest Givers ID into the Dialogue Actor name field works great for this.

Typing in the name in the GiveQuest sequencer command is not a big deal, I was just wondering if there was a way to integrate the functionality of {QuestGIver}into sequencer commands.

Can't really think of any other improvements at the moment, kind of overwhelmed by the possibilities of everything.

Thanks again
Nathan

Re: Quest Giver Dialogue Content through Dialogue System

Posted: Thu Mar 07, 2019 8:20 am
by Tony Li
Hi Nathan,

You can currently use tags like {QUESTGIVER} in dialogue text.

In the next update, the integration will set three Dialogue System variables when starting a conversation for Quest Machine:
  • Variable["QUESTGIVER"] -- the Quest Machine ID of the quest giver.
  • Variable["QUESTER"] -- the Quest Machine ID of the quester (e.g., player).
  • Variable["QUESTID"] -- the Quest Machine ID of the quest.
You'll be able to set the Script field to:

Code: Select all

GiveQuest(Variable["QUESTGIVER"], Variable["QUESTID"])

Re: Quest Giver Dialogue Content through Dialogue System

Posted: Thu Mar 07, 2019 2:28 pm
by nathanj
Thanks Tony!

That will be perfect.

Nathan