articy:draft dialogue slots

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Raidenthequick
Posts: 34
Joined: Mon Jul 02, 2018 5:00 pm

articy:draft dialogue slots

Post by Raidenthequick »

Hi Tony,

We aim to reference a dialogue/conversation from within an Item, so that it can be looked up and started from code, like so:

Code: Select all

                var cutsceneName = action.LookupValue(Consts.Articy.PostDialogueSlot);
                if (DialogueManager.MasterDatabase.GetConversation(cutsceneName) != null)
                {
                    DialogueManager.StartConversation(cutsceneName);
                }
The main problem with this as it stands right now is that upon import, the articy "Slot" for the conversation's name shows up incomplete. For example, it only gives me "ZeroHertz" whereas the full path name for that conversation is "Dialogue/Tonewood Forest/M4 BUILD SPECIFIC/ZeroHertz". Only looking up "ZeroHertz" will fail to find anything naturally.

It would be very beneficial for us to have this slot show up with the complete path. For now, our workaround will be prepending the full path in code, and placing all dialogues needed by this specific code in that same folder. Please let me know if this is something you can address eventually, thank you!
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: articy:draft dialogue slots

Post by Tony Li »

Hi,

I'll try to get that into the next update, version 2.1.1.
Raidenthequick
Posts: 34
Joined: Mon Jul 02, 2018 5:00 pm

Re: articy:draft dialogue slots

Post by Raidenthequick »

Thanks! In the meantime I was trying to toy with using ID instead of Display Name for Slots, figuring the ID would have a lot less issues. I figured out to use ArticyTools.FindAssetByArticyId instead of DialogueManager.MasterDatabase.GetItem, and things were going smoothly, easy find/replace to convert everything over. However, it broke one thing that we are using. We reference images in the Items as well, and they are slots too, so they showed up as an ID. But this breaks the way we were looking up our images:

Code: Select all

        public static Sprite LoadImage(Item item, string key)
        {
            return Resources.Load<Sprite>(item.LookupValue(key));
        }
Naturally, the ID is not a valid Resources string key, so this now fails. If we do go the ID route, do you know of a way to get the image by that ID somehow? Otherwise we'll keep plodding on with the Display Name. Thanks.
User avatar
Tony Li
Posts: 21080
Joined: Thu Jul 18, 2013 1:27 pm

Re: articy:draft dialogue slots

Post by Tony Li »

Keep using Display Name. I'll try to get a patch out soon for your conversation title request.

In the meantime, if the "ZeroHertz" part of "Dialogue/Tonewood Forest/M4 BUILD SPECIFIC/ZeroHertz" is unique, as a temporary workaround you can get the conversation like this:

Code: Select all

Conversation conversation = DialogueManager.MasterDatabase.conversations.Find(x => x.Title.EndsWith("ZeroHertz"));
Raidenthequick
Posts: 34
Joined: Mon Jul 02, 2018 5:00 pm

Re: articy:draft dialogue slots

Post by Raidenthequick »

Cool, that is probably a better workaround than what I was going to do. Thanks!
Post Reply