Page 1 of 1

Dialogue System Active Conversation Map motives list not working

Posted: Tue Dec 06, 2022 3:14 pm
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 604 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 604 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!

Re: Dialogue System Active Conversation Map motives list not working

Posted: Tue Dec 06, 2022 4:35 pm
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!

Re: Dialogue System Active Conversation Map motives list not working

Posted: Tue Dec 06, 2022 5:31 pm
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.

Re: Dialogue System Active Conversation Map motives list not working

Posted: Tue Dec 27, 2022 8:27 pm
by Tony Li
Sorry, I forgot to post the patch. It's here:

QM_DSPatch_2022-12-26.unitypackage