Page 1 of 1

chat mapper unused conversation properties

Posted: Tue Sep 22, 2015 7:04 pm
by Arcanor
I've been creating content using Chat Mapper. Some of my conversations use the Parenthetical property, to indicate something non-verbal that's going on at that time. After importing the database contents, I'm seeing that the Parenthetical property isn't even being imported. What is the recommended way to do something like this?

Perhaps using emphasis em4, to give the text a specific look?

Re: chat mapper unused conversation properties

Posted: Wed Sep 23, 2015 6:48 pm
by Tony Li
Hi,

The Parenthetical property is being imported, but it's hiding in the All Fields section. It's not normally shown in the dialogue UI at runtime, however. You could create a subclass of the dialogue UI (e.g., UnityUIDialogueUI) and override the ShowSubtitle method to also show the Parenthetical field in an additional UI Text element somewhere. If you want to show it in the Dialogue Text, I recommend using an emphasis code. However, if you already have a lot of content that uses the Parenthetical field, it may be easier to simply override the ShowSubtitle method as described above.

Re: chat mapper unused conversation properties

Posted: Wed Sep 23, 2015 10:56 pm
by Arcanor
Thanks for your reply Tony. I've decided to go with moving the content into the Dialogue Text, using [em4]. So this is no longer an issue for my current project.

However, I just wanted to mention that even after updating just now to version 1.5.5.1, I'm still not seeing the Parenthetical property in the dialogue entry, even after expanding the All Fields list. Here are all the fields listed there:
  • Title
  • Actor
  • Conversant
  • Menu Text
  • Dialogue Text
  • Video File
  • Sequence

Re: chat mapper unused conversation properties

Posted: Wed Sep 23, 2015 11:04 pm
by Arcanor
After looking into this further, I discovered that the Parenthetical field is not set to export in the Chat Mapper -> Project Settings -> Custom Asset Fields -> Dialogue Nodes -> Export column. After I checked the Export column and re-exported, it's now showing up in Unity properly, in the All Fields list.

So if anyone's interested in making use of this field, don't forget to check the Export box in the Chat Mapper Project Settings.

Re: chat mapper unused conversation properties

Posted: Wed Sep 23, 2015 11:07 pm
by Tony Li
Thanks for posting that tip!

Re: chat mapper unused conversation properties

Posted: Thu Sep 24, 2015 8:20 am
by Arcanor
Hey Tony, I have a follow-up question about this. If I were to create a handler function for OnContentChanged events (in my unrelated GameManager class), how would I access those fields in the Dialogue Entry data from within my code?

Re: chat mapper unused conversation properties

Posted: Thu Sep 24, 2015 11:43 am
by Arcanor
I think I've gotten around this for now, by creating a subclass of UnityUIDialogueUI that overrides ShowSubtitle, and then does the following:

Code: Select all

using System.Linq;
...
subtitle.dialogueEntry.fields.Where<Field>(myField => myField.title == "Parenthetical").ToList()[0].value
This allows me to access any of the fields that are in the dialogue entry.

It's probably better if I keep this code out of my GameManager class anyway, so please consider this issue closed.

Re: chat mapper unused conversation properties

Posted: Thu Sep 24, 2015 12:43 pm
by Tony Li
Okay. You can also use the Field.Lookup() method to get a field value from a field list. It might be easier than the Linq statement.

Re: chat mapper unused conversation properties

Posted: Thu Sep 24, 2015 1:00 pm
by Arcanor
Thanks Tony. Your way is better, and doesn't require System.Linq. Here's my edited lookup code:

Code: Select all

Field.Lookup(subtitle.dialogueEntry.fields, "Parenthetical").value
Seems to work great.