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

MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Hey Tony,

Attempting to Link a manually created conversation (MC) to a procedurally generated conversation (PGC). The (PGC) is successfully being Linked but the QUEST REFERENCE TAGS are not being resolved.

I've verified that a procedurally generated quest (PGQ) is being created as I see it in the inspector of the QuestListContainer and the QuestGiver components quest area.

If I trigger the (PGC) directly; the conversation appears and the (QRT) are resolved. The GameObject that I use to trigger the (PGC) directly has these game components:

TriggerEvent
QuestListContainer
QuestGeneratorEntity
XPRewaredSystem
QuestGiver

There are differences with my GameObject that I use to trigger the (MC) to (PGC). I use Usable, DialogueActor, BarkOnIdle, some Love/Hate Components as well as the above listed components. Main difference is that I use DialogueSystemTrigger (OnUSE) to start the( MC ) instead of TriggerEvent.

I found a solution in the forums stating to use as HasGeneratedQuest() in the Condition and ShowGeneratedQuestDialogue() in the Script area of the calling (MC), but this is not working for me… getting an Exception.

Dialogue System: Lua code 'ShowGeneratedQuestDialogue("Flynn", "Flynn")' threw exception 'Tried to invoke a function call on a non-function value. If you're calling a function, is it registered with Lua?'
0x00007ff782c6b59d (Unity) StackWalker::GetCurrentCallstack
0x00007ff782c70649 (Unity) StackWalker::ShowCallstack
0x00007ff783c5ff91 (Unity) GetStacktrace
0x00007ff78431a17e (Unity) DebugStringToFile
0x00007ff781b5a7f8 (Unity) DebugLogHandler_CUSTOM_Internal_Log
0x00000145cec5fed3 (Mono JIT Code) (wrapper managed-to-native) UnityEngine.DebugLogHandler:Internal_Log (UnityEngine.LogType,UnityEngine.LogOption,string,UnityEngine.Object)
0x00000145cec7ff2b (Mono JIT Code) UnityEngine.DebugLogHandler:LogFormat (UnityEngine.LogType,UnityEngine.Object,string,object[])
0x00000145cec8ff10 (Mono JIT Code) UnityEngine.Logger:Log (UnityEngine.LogType,object)
0x0000014b43e88aa5 (Mono JIT Code) UnityEngine.Debug:LogError (object)
0x00000146e16cccf3 (Mono JIT Code) PixelCrushers.DialogueSystem.Lua:RunRaw (string,bool,bool) (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:253)
0x00000146e16cc993 (Mono JIT Code) PixelCrushers.DialogueSystem.Lua:Run (string,bool,bool) (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/Lua/Lua Wrapper/Lua Interpreter/Lua.cs:131)
0x0000014b43d7baa3 (Mono JIT Code) PixelCrushers.DialogueSystem.ConversationModel:ExecuteEntry (PixelCrushers.DialogueSystem.DialogueEntry,PixelCrushers.DialogueSystem.CharacterInfo) (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:299)
0x0000014c727b6f93 (Mono JIT Code) PixelCrushers.DialogueSystem.ConversationModel:GetState (PixelCrushers.DialogueSystem.DialogueEntry,bool,bool,bool) (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:268)
0x0000014b43d96d0b (Mono JIT Code) PixelCrushers.DialogueSystem.ConversationModel:GetState (PixelCrushers.DialogueSystem.DialogueEntry) (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Model/Logic/Model/ConversationModel.cs:354)
0x0000014b43d96a0b (Mono JIT Code) PixelCrushers.DialogueSystem.ConversationController:OnFinishedSubtitle (object,System.EventArgs) (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Controller/ConversationController.cs:309)
0x0000014b43d95f67 (Mono JIT Code) PixelCrushers.DialogueSystem.ConversationView:FinishSubtitle () (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:437)
0x0000014b43d95e7b (Mono JIT Code) PixelCrushers.DialogueSystem.ConversationView:OnFinishedSubtitle () (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/View/View/ConversationView.cs:445)
0x0000014b43d95dad (Mono JIT Code) PixelCrushers.DialogueSystem.Sequencer:FinishSequence () (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:616)
0x0000014c7286f8c3 (Mono JIT Code) PixelCrushers.DialogueSystem.Sequencer:Update () (at C:/Users/gmsmi/UnityProjects/Invector AI TEST Area/Assets/Plugins/Pixel Crushers/Dialogue System/Scripts/MVC/Sequencer/Sequencer.cs:611)
0x0000014b442f7318 (Mono JIT Code) (wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
0x00007ffcf7394c2e (mono-2.0-bdwgc) mono_jit_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/mini/mini-runtime.c:3445)
0x00007ffcf72cd254 (mono-2.0-bdwgc) do_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3068)
0x00007ffcf72cd3cc (mono-2.0-bdwgc) mono_runtime_invoke (at C:/build/output/Unity-Technologies/mono/mono/metadata/object.c:3115)
0x00007ff782b843b4 (Unity) scripting_method_invoke
0x00007ff782b61fc4 (Unity) ScriptingInvocation::Invoke
0x00007ff782b49694 (Unity) MonoBehaviour::CallMethodIfAvailable
0x00007ff782b497ba (Unity) MonoBehaviour::CallUpdateMethod
0x00007ff7825dbe7b (Unity) BaseBehaviourManager::CommonUpdate<BehaviourManager>
0x00007ff7825e31fa (Unity) BehaviourManager::Update
0x00007ff782818d2d (Unity) `InitPlayerLoopCallbacks'::`2'::UpdateScriptRunBehaviourUpdateRegistrator::Forward
0x00007ff7827f867c (Unity) ExecutePlayerLoop
0x00007ff7827f87f0 (Unity) ExecutePlayerLoop
0x00007ff7827fed25 (Unity) PlayerLoop
0x00007ff7837d746f (Unity) PlayerLoopController::InternalUpdateScene
0x00007ff7837e425d (Unity) PlayerLoopController::UpdateSceneIfNeededFromMainLoop
0x00007ff7837e2541 (Unity) Application::TickTimer
0x00007ff783c65c2a (Unity) MainMessageLoop
0x00007ff783c6ade0 (Unity) WinMain
0x00007ff78502b73e (Unity) __scrt_common_main_seh
0x00007ffd9216257d (KERNEL32) BaseThreadInitThunk
0x00007ffd9292af08 (ntdll) RtlUserThreadStart



DS 2.2.49
DS Open AI: 1.0.19
Love/Hate: 1.10.49
QM: 1.2.49

Appreciate any help you can provide with this issue!
User avatar
Tony Li
Posts: 22086
Joined: Thu Jul 18, 2013 1:27 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

Make sure your Dialogue Manager GameObject has a DialogueSystemQuestMachineBridge component with Process Quest Machine Tags ticked. As long as that's ticked, all conversations should process quest tags, including in procedurally-generated quests. If that's not the case in your project, can you send a reproduction project to tony (at) pixelcrushers.com?

The Lua function is ShowGeneratedQuestConversation(), not ShowGeneratedQuestDialogue(). If you use the "..." dropdown menu, you can select it without having to type it.
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Yes, my Dialogue Manager GameObject has the DialogueSystemQuestMachineBridge component with Process Quest Machine Tags ticked as well as OverrideQuestLog ticked.

Firm believer of using the dropdown menu and not manually typing things in.... However, I do not have ShowGeneratedQuestConversation() as an option to select. Did I miss something in setup?

So, I manually Changed the Script section of the Conversation Node to ShowGeneratedQuestConversation; exception is gone but the Quest Reference Tags are still not resolved when the (PGC) begins.

I do see: Dialogue System: Registering Lua function ShowGeneratedQuestConversation in the Console when I run the game.

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

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

ShowGeneratedQuestConversation will be in the Custom section of the "..." dropdown.

Which specific Quest Machine tags aren't being resolved?
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Please seen attached Screen Print

Thanks
Attachments
DropdownScreenPrint.jpg
DropdownScreenPrint.jpg (153.86 KiB) Viewed 180 times
User avatar
Tony Li
Posts: 22086
Joined: Thu Jul 18, 2013 1:27 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

Are you using the current version of the integration? That may have been fixed in a recent update to the integration. It's correct in the current version. The screenshot below shows the asset where the dropdown menu items are defined:

showGen.png
showGen.png (36.42 KiB) Viewed 178 times
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

When I downloaded the current version of QM. I obviously failed to run the 3rd Party Support Intergration packages. I just did that and now the LUA dropdown menu shows. However, when I LINK to the (PGC) the QUEST REFERENCE TAGS are still not being resolved.

I assume I am stepping on myself here with this issue...

I use DS, DS AI addon, QM and L/H and INVECTOR.

I'm thinking about reinstalling each one; and applying the 3rd Party Support packages. Is there a certain product Install/update procedure I should be following?

thanks again for your time looking into this non-issue. Greatly appreciate it.
User avatar
Tony Li
Posts: 22086
Joined: Thu Jul 18, 2013 1:27 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

Which specific reference tags aren't working?
Sumosake
Posts: 16
Joined: Tue Oct 11, 2022 6:00 pm

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Sumosake »

Tony,

Sorry for the long winded reply but I wanted to show my details... I believe the issue is the Procedurally Generated Quest is not being added to the correct Component. ( QuestListContainer or QuestGiver)

Reference Tags:
{DOMAIN}
{TARGETDESCRIPTOR}
these TAGS resolve correctly when I call the conversation from a TriggerEvent component. OnTriggerEnter QuestGeneratorEntity.StartDialogueWithPlayer.


In my (MC) Linking to a (PGC) where I use: ShowGeneratedQuestConversation("Flynn", "Flynn") ** Flynn is the NPC QuestGiver **. I ran through the Debugger and noticed that the questGiver variable is always returning NULL. This is causing the
if (questGiver == null || quester == null) return; line to execute
which prevents the TryShowGeneratedQuestConversion Line to ever be reached.

Debug Screenshot.jpg
Debug Screenshot.jpg (144.19 KiB) Viewed 168 times
GetQuestGiver.jpg
GetQuestGiver.jpg (286.1 KiB) Viewed 168 times

In my condition the Procedurally Generated Quest is in the QUESTGIVER component but NOT in the QuestTListContainer.

Hope this helps...

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

Re: MANUAL CONVERSATION LINK TO PROCEDURALLY GENERATED CONVERSATION

Post by Tony Li »

Hi,

What is the name of the GameObject that has the QuestGeneratorEntity component?

On that GameObject, what is the Quest Giver component's ID value?
Post Reply