Dialogue System Active Conversation Map motives list not working

Announcements, support questions, and discussion for Quest Machine.
Post Reply
User avatar
nratcliff
Posts: 23
Joined: Tue Sep 27, 2022 10:47 am

Dialogue System Active Conversation Map motives list not working

Post by nratcliff »

I am trying to set up offer conversations by motive for actions in the quest generation system using the DialogueSystemActiveConversationMap. However, the Motives list always just shows the motives for the first action in the list.
Screenshot 2022-12-06 at 3.07.47 PM.png
Screenshot 2022-12-06 at 3.07.47 PM.png (47 KiB) Viewed 607 times
Screenshot 2022-12-06 at 3.07.52 PM.png
Screenshot 2022-12-06 at 3.07.52 PM.png (44.79 KiB) Viewed 607 times
(Fetch Seeds action should have the Seed motive, not hunger)


Additionally, if the action has more than one motive, the inspector goes blank and I get this error in the console:

Code: Select all

IndexOutOfRangeException: Index was outside the bounds of the array.
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemActionConversationMapEditor.DrawMotiveConversationListElement (UnityEngine.Rect rect, System.Int32 index, System.Boolean isActive, System.Boolean isFocused) (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Editor/Generator/DialogueSystemActionConversationMapEditor.cs:172)
UnityEditorInternal.ReorderableList.DoListElements (UnityEngine.Rect listRect, UnityEngine.Rect visibleRect) (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:926)
UnityEditorInternal.ReorderableList.DoLayoutList () (at /Users/bokken/buildslave/unity/build/Editor/Mono/GUI/ReorderableList.cs:694)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemActionConversationMapEditor.DrawSelectedRecordListElement () (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Editor/Generator/DialogueSystemActionConversationMapEditor.cs:140)
PixelCrushers.QuestMachine.DialogueSystemSupport.DialogueSystemActionConversationMapEditor.OnInspectorGUI () (at Assets/Plugins/Pixel Crushers/Quest Machine/Third Party Support/Dialogue System Support/Scripts/Editor/Generator/DialogueSystemActionConversationMapEditor.cs:40)
UnityEditor.UIElements.InspectorElement+<>c__DisplayClass59_0.<CreateIMGUIInspectorFromEditor>b__0 () (at /Users/bokken/buildslave/unity/build/External/MirroredPackageSources/com.unity.ui/Editor/Inspector/InspectorElement.cs:546)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&) (at /Users/bokken/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:189)
It looks like the motive list element drawer is selecting the action list element at the index of the element being drawn in the motive list, so it's usually always 0 (GetRecordProperty). This also is probably the cause of the out of range exception b/c the wrong action is returned from GetRecordProperty, and the action at the index of that motive does not have the same number of motives. I've poked at the editor script a bit but I can't wrap my head around how to patch in a quick fix.

Thanks in advance for any help!
Lead Dev @ aesthetic.games
Creator of Easy Feedback Form
User avatar
nratcliff
Posts: 23
Joined: Tue Sep 27, 2022 10:47 am

Re: Dialogue System Active Conversation Map motives list not working

Post by nratcliff »

Update: using the debug inspector view allows me to at least assign motive conversations as long as I know the index of the motive on the action. Not an ideal solution but workable for now!
Lead Dev @ aesthetic.games
Creator of Easy Feedback Form
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Active Conversation Map motives list not working

Post by Tony Li »

I'll check this out and post a patch. This post also has an updated integration package that addresses an issue with conversations when a quest is in the Active state.
User avatar
Tony Li
Posts: 22098
Joined: Thu Jul 18, 2013 1:27 pm

Re: Dialogue System Active Conversation Map motives list not working

Post by Tony Li »

Sorry, I forgot to post the patch. It's here:

QM_DSPatch_2022-12-26.unitypackage
Post Reply