Dialogue System + Invector + Quest Machine

Announcements, support questions, and discussion for the Dialogue System.
DLaplace
Posts: 13
Joined: Sun Aug 25, 2024 4:21 pm

Dialogue System + Invector + Quest Machine

Post by DLaplace »

Hi,

I am currently trying to use dialog system and Quest machine with the invector controller,

Something is missing and i can't figure out what, could you help me please ?

The current Dialogue System Invector Locomotion has errors on it's demo scene with missing prefabs in the UI part Image :/

is there something I missed please :/ ?
I followed the youtube tutorial below :



When I do interact with the NPC i get this error, Thanks a lot for the help

NullReferenceException: Object reference not set to an instance of an object
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI.FindMainPlayerActor () (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:367)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI.GetPlayerActorTransform () (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:330)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI.ShowConversation (PixelCrushers.QuestMachine.QuestParticipantTextInfo speaker, System.String title) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:241)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI.ShowConversationContent (PixelCrushers.QuestMachine.QuestParticipantTextInfo speaker, PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemConversationQuestContent conversationContent) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:235)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI.ShowContents (PixelCrushers.QuestMachine.QuestParticipantTextInfo speaker, System.Collections.Generic.List`1[T] contents) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:606)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemQuestDialogueUI.ShowOfferQuest (PixelCrushers.QuestMachine.QuestParticipantTextInfo speaker, PixelCrushers.QuestMachine.Quest quest, PixelCrushers.QuestMachine.QuestParameterDelegate acceptHandler, PixelCrushers.QuestMachine.QuestParameterDelegate declineHandler) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Quest UIs/Dialogue System Quest Dialogue UI/DialogueSystemQuestDialogueUI.cs:725)
PixelCrushers.QuestMachine.QuestGiver.ShowOfferQuest (PixelCrushers.QuestMachine.Quest quest) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:755)
PixelCrushers.QuestMachine.QuestGiver.StartMostRelevantDialogue () (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:686)
PixelCrushers.QuestMachine.QuestGiver.StartDialogue (UnityEngine.GameObject player) (at Assets/Plugins/Pixel Crushers/Quest Machine/Scripts/Quest MonoBehaviours/Quest List/QuestGiver.cs:595)
UnityEngine.Events.InvokableCall`1[T1].Invoke (T1 args0) (at /Users/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent.cs:219)
UnityEngine.Events.CachedInvokableCall`1[T].Invoke (System.Object[] args) (at /Users/bokken/build/output/unity/unity/Runtime/Export/UnityEvent/UnityEvent.cs:357)
UnityEngine.Events.UnityEvent.Invoke () (at /Users/bokken/build/output/unity/unity/artifacts/generated/UnityEvent/UnityEvent_0.cs:69)
Invector.vCharacterController.vActions.vTriggerGenericAction+<OnPressActionDelay>d__53.MoveNext () (at Assets/Invector-3rdPersonController/Basic Locomotion/Scripts/CharacterController/Actions/vTriggerGenericAction.cs:145)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at
Attachments
Capture d’écran 2024-09-02 à 23.53.11.png
Capture d’écran 2024-09-02 à 23.53.11.png (97.85 KiB) Viewed 137 times
User avatar
Tony Li
Posts: 21634
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System + Invector + Quest Machine

Post by Tony Li »

Hi,

That missing prefab is not important. Invector changed their example assets again and made the prefab invalid. But it's not used by the example scene, and I've deleted it in the upcoming v2.2.48.

The NullReferenceException error message suggests that there is no Dialogue Manager GameObject. Make sure your scene has a Dialogue Manager.
DLaplace
Posts: 13
Joined: Sun Aug 25, 2024 4:21 pm

Re: Dialogue System + Invector + Quest Machine

Post by DLaplace »

Hi Toni thanks for your answer,
Actually there is one dialogue manager like in the scene in the photo of the example scene of the first post, what I am missing, ( I think) is the elements that triggers “dialogue system events” on start conversation and on end conversation, what do you think about it ?
Currently, I have unpacked the prefab of the dialogue manager and that gave the error apparently as it doesn’t happen with a fresh prefab.
But the NPC is back to the regular quest UI with Quest machine.

For the NPC, does it need the dialogue system trigger and V trigger generic and usable from dialogue system regarding that I am using also Quest machine please ?

For the Invector contrôler does it need something for standard setup in the “Dialogue system event” component please ?

When I change the NPC to fit the demo scene, the quest works with dialogue systems but the objectives doesn’t add in the quest journal.

it may be an issue for a combination particular for the 3 assets (dialogue + quest + invector).
But I think your two assets are amazing and complementary and I really want to use them both with invector,

Thanks a lot :)
User avatar
Tony Li
Posts: 21634
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System + Invector + Quest Machine

Post by Tony Li »

Hi,

Here's an example scene that uses all 3:

DS_QM_Invector_Example_2024-09-03.unitypackage

To set it up, I did this:
  • Imported Invector, DS, and QM
  • Imported QM's DS Support package
  • Imported the Common, DS, and QM Invector Support packages
  • Imported Invector's project settings from the Tools menu
  • Added the scripting define symbol USE_INVECTOR_INVENTORY
  • Started with QM's Invector example scene.
  • Added a Dialogue Manager GameObject. Added DialogueSystemInvectorBridge and DialogueSystemQuestMachineBridge to it. Set its Canvas > Sort Order to 2 so dialogue appears on top of Invector's UI.
  • On the Quest Machine GameObject, added Dialogue System Quest Dialogue UI and Dialogue System Quest Alert UI.
  • Added a dialogue database and wrote a conversation using the quest conversation template and the DS integration's Lua functions.
  • Added a Dialogue System Trigger to the NPC and configured it to start the conversation. Configured vTriggerGenericAction's OnPressActionInput() to call DialogueSystemTrigger.OnUse.
DLaplace
Posts: 13
Joined: Sun Aug 25, 2024 4:21 pm

Re: Dialogue System + Invector + Quest Machine

Post by DLaplace »

EDIT : setting a new prefab dialogue manager worked :) thanks Toni


Hi Toni, thanks a lot,

I Tried this on my project with your example scene, then i tried with a complete new project, i get the same error from the NPC that says :

Dialogue System: Dialogue System Trigger 'NPC' can't fire. There is no Dialogue Manager GameObject.
UnityEngine.Debug:LogError (object,UnityEngine.Object)
PixelCrushers.DialogueSystem.DialogueSystemTrigger:Fire (UnityEngine.Transform) (at Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Triggers/Triggers/DialogueSystemTrigger.c

It is weird because the Dialogue System is present in the scene so i don't really get why it doesn't considerate it ?
Is there a setting i should adjust for this in adition of your list please?
Thanks a lot
User avatar
Tony Li
Posts: 21634
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System + Invector + Quest Machine

Post by Tony Li »

Hi,

Sounds like it's working now. If you run into any other issues or questions, please let me know.
DLaplace
Posts: 13
Joined: Sun Aug 25, 2024 4:21 pm

Re: Dialogue System + Invector + Quest Machine

Post by DLaplace »

Hi Toni,

Yes it works , but unfortunately up to a point.
There is an issue with the quest journal,
It pops out int the conversation, if closed using key code J prior to start the conversation with the NPC

Closing the panel sends the unpause player to invector and I cannot select dialogue option anymore.

The transition to the second quest to grab the health potion is not working anymore:-/ it stops at the shotgun after completion and play again the shotgun dialogue with a warning that the NPC cannot deliver the shotgun quest anymore
There must be something to be sent between dialogue system and quest machine to start the new quest ? I don’t get why it doesn’t get the getShotgun success to start on the second quest.

I tried some things this WE but I cannot figure out why it behaves like this
Do you have any idea on how to fix that please ?
Thanks a lot !
DLaplace
User avatar
Tony Li
Posts: 21634
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System + Invector + Quest Machine

Post by Tony Li »

Hi,

In the example I sent you, I didn't write a conversation for the second quest. It stops at the first quest.

Here's an updated scene. I made two changes:

1. Removed the unnecessary Input Device Manager GameObject since the Dialogue Manager already has an InputDeviceManager component.

2. Added a Dialogue System Events component to the player that uses the OnConversationStart() event to close the journal UI and send the "Pause Player" message again just to make sure the player is paused.

DS_QM_Invector_Example_2024-09-08.unitypackage
DLaplace
Posts: 13
Joined: Sun Aug 25, 2024 4:21 pm

Re: Dialogue System + Invector + Quest Machine

Post by DLaplace »

Hi Toni, thanks a lot,

Well it works well with one Dialogue, I do have an issue with quest machine then

Quest machine doesn't switch to the next quest, even with standalone quest machine + invector witch worked well, the NPC Quest giver doesn't seems to be able to give the next quest once the first one is completed, it just says "Hello."

Do you hav the same problem on your version ?

Thanks a lot
Louis
User avatar
Tony Li
Posts: 21634
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System + Invector + Quest Machine

Post by Tony Li »

Hi Louis,

Yes, but you need to tick the Quest Journal component's Save Settings > Remember Completed Quests.

The Get Health Potion quest has offer conditions that require that the shotgun quest is complete -- in other words, that a completed instance of the shotgun quest is in the player's quest journal. If Remember Completed Quests is NOT ticked, the quest journal won't remember that the shotgun quest is complete.
Post Reply