Articy:​draft pitfalls

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Racoon7
Posts: 7
Joined: Mon Oct 30, 2017 2:17 pm

Articy:​draft pitfalls

Post by Racoon7 »

Hi,

I recently started with Dialogue System and as I'm slowly learning to use it, I thought I'd point out some issues I had with importing from articy:draft. First, huge thanks for the built-in converter, otherwise I'd have to rewrite a lot of content or try to somehow fuse their Unity Importer plugin with Dialogue System and it would undoubtedly end badly. ;)

Some of the bugs I encountered, or rather "inconveniencies":

Decimal values

They don't work. When you have a number property in articy:draft, and input a decimal; the converter displays it as zero, and you get nondescriptive errors whenever you enter the playmode in Unity.

Image
Image

In my project, I simply rewrote kilograms to grams to circumvent the issue, but I feel it might deserve a mention in the documentation or a fix if it's possible.

OnFlowFragment

This is not a bug – it's entirely my fault, but also an issue which took me quite a while to track down. Whenever I ran across a flow fragment in a conversation, it threw an error and I wasn't exactly sure what causes it.

Code: Select all

Dialogue System: Lua code 'OnFlowFragment("Foxes"); ' threw exception 'Invoke function call on non function value.'
UnityEngine.Debug:LogError(Object)
PixelCrushers.DialogueSystem.Lua:RunRaw(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.Lua:Run(String, Boolean, Boolean)
PixelCrushers.DialogueSystem.ConversationModel:EvaluateLinksAtPriority(ConditionPriority, DialogueEntry, List`1, List`1, List`1, Boolean)
PixelCrushers.DialogueSystem.ConversationModel:EvaluateLinks(DialogueEntry, List`1, List`1, List`1, Boolean)
PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry, Boolean, Boolean, Boolean)
PixelCrushers.DialogueSystem.ConversationModel:GetState(DialogueEntry)
PixelCrushers.DialogueSystem.ConversationController:OnFinishedSubtitle(Object, EventArgs)
PixelCrushers.DialogueSystem.ConversationView:FinishSubtitle()
PixelCrushers.DialogueSystem.ConversationView:HandleContinueButtonClick()
PixelCrushers.DialogueSystem.ConversationView:OnConversationContinue(IDialogueUI)
UnityEngine.Component:SendMessage(Component, String, Object, SendMessageOptions)
PixelCrushers.DialogueSystem.AbstractDialogueUI:OnContinueConversation()
PixelCrushers.DialogueSystem.AbstractDialogueUI:OnContinue()
PixelCrushers.DialogueSystem.UnityUIDialogueUI:OnContinue() (at Assets/_Core/Dialogue System/Scripts/Supplemental/UI/Dialogue UI/UnityUIDialogueUI.cs:234)
PixelCrushers.DialogueSystem.UnityUIContinueButtonFastForward:OnFastForward() (at Assets/_Core/Dialogue System/Scripts/Supplemental/UI/Effects/UnityUIContinueButtonFastForward.cs:33)
UnityEngine.EventSystems.EventSystem:Update()
From that I figured there was an automatically added Lua function near the flow fragments, but I couldn't see where to disable it or what causes it in the articy:draft. Turns out it was the FlowFragment Script option with OnFlowFragment in the converter.

Image

I'm not sure if it was there by default, but it's definitely displayed in the picture in the documentation, so if it wasn't, I might have copied it from there.

Image

Would it be possible to mention in the articy converter page you need to (as it seems) register the function first? Or make the error more descriptive?

Anyway, my fault; I'm mainly posting this because other people might run into the same problem. ;)

Documents

Image

Articy:draft supports writing non-branching dialogue in documents. I had most of the banter written inside documents (it's much faster to write). Basically, you only write the lines and articy automatically creates dialogues and dialogue fragments. You can even drag the dialogues and drop them in the Flow Editor and edit them as usual (e.g. write a rough draft or notes in documents and finalize it in the flow editor).

Image

The Converter recognizes the documents as dialogues, but ignores the group structure and mainly the dialogue fragments inside – so in Unity, you're basically left with the dialogue title and "Start → End" conversation.

Image

From the user viewpoint, you can easily avoid this by dragging all the document dialogues in the Flow Editor, or by unticking them from the import (huge thanks for remembering previous converter settings! :) ). But I feel the documents might deserve a mention in the documentation page and be either ignored by the converter or imported correctly.

Condition node input pin

I had a part of a dialogue which looked like this (the usual RPGs' "What do you think I should be doing right now?"):

Image

Essentially, if the player is in chapter II, show him a response depending on his progress in the chapter. Unfortunately, the input pin Story.Chapter == 2 was ignored, so the dialogue almost always went to Villages / false.

For the user, this isn't hard to fix – e.g. I could split it into two conditions or add another one, but again, I might not be aware of the source of the problem when the conversation in Unity suddenly goes in an unexpected way despite the condition specifically forbidding it.

Image

Flow Fragments in dialogue

This is what I consider to be the most important issue, at least for me.
Inside my dialogue nodes, I often put one discussed topic in a flow fragment – to keep a clean, organized structure and avoid being lost in an endless clutter of dialogue lines in any slightly more complex dialogue.

Image

Unfortunately, if the flow fragment is followed by any node, the flow fragment is skipped (or so it seems). E.g. here it goes right from the "Fine. Ask away…" to the root hub, skipping "Current situation".

Image

In the articy Converter in Unity, it's imported like this:

Image

I set the flow fragments to "Conversation Groups" mode, so I think the priority here should either be reversed or don't link to <Jump to: [Root]> at all (you're going to have a node connected to the output pin from inside anyway).

I tried a couple of solutions, neither of which I'm overly happy about.
One was to replace flow fragments with a nested dialogue. If I remember correctly, that "sort of" works as intended, although it creates a needless, standalone dialogue outside of the main one – so in the end, I just managed to move the clutter out of articy:draft and create a new one in Dialogue Editor in Unity (i.e. a dialogue with one person is suddenly split into 6 dialogues, 5 of which I'll never need to start/reference directly).

Image

Image

The other solution was to never use flow fragments' output pins – and just put everything inside. That, unfortunately, means you can't tell what a flow fragment does (= where does it lead when it ends) from the outside – you have to submerge to the deepest level and check there. Also, there's probably going to be a lot of copy-pasting across similar flow fragments.

Image

In the end, I would have ended up with a dialogue structure which is hard to navigate in, which is exactly what I was originally trying to prevent with flow fragments. It kind of reminds me of using goto statements instead of proper loops in programming. :)


Could you please look into some of these issues (mainly the last one)?
And sorry for going maybe a bit overboard with the post… :D
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy:​draft pitfalls

Post by Tony Li »

Hi,

That is a great post. Thank you for all the details and screenshots. And sorry for the issues you ran into. I'll look into all of them, giving first priority to the last one in your list.
User avatar
Tony Li
Posts: 22059
Joined: Thu Jul 18, 2013 1:27 pm

Re: Articy:​draft pitfalls

Post by Tony Li »

Version 1.7.7rc1 is available for download. It contains changes to address these points. You can read more here.
Post Reply