chat mapper unused conversation properties

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

chat mapper unused conversation properties

Post 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?
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: chat mapper unused conversation properties

Post 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.
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: chat mapper unused conversation properties

Post 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
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: chat mapper unused conversation properties

Post 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.
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: chat mapper unused conversation properties

Post by Tony Li »

Thanks for posting that tip!
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: chat mapper unused conversation properties

Post 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?
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: chat mapper unused conversation properties

Post 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.
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
User avatar
Tony Li
Posts: 22102
Joined: Thu Jul 18, 2013 1:27 pm

Re: chat mapper unused conversation properties

Post 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.
Arcanor
Posts: 81
Joined: Sun Oct 05, 2014 4:20 am

Re: chat mapper unused conversation properties

Post 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.
Arcanoria Games - http://www.arcanoria.com - indie game development blog
twitter: https://twitter.com/WaltCollins3 @WaltCollins3
Game titles: Pesticide Patrol, Arcanoria Chronicles, CyberGhost, Arcanoria
PLAY NOW: http://arcanor.itch.io/
Post Reply