Creating a TextTable from all the words in dialogue database

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
jlhacode
Posts: 77
Joined: Fri Jul 03, 2020 6:23 am

Creating a TextTable from all the words in dialogue database

Post by jlhacode »

Hi Tony,

Is there any sort of functionality or script that exists for putting all of my database dialogue text, as individual words, in a text table?
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a TextTable from all the words in dialogue database

Post by Tony Li »

Hi,

Nothing built-in. Why do you want to do that? Maybe I can suggest an alternative.
jlhacode
Posts: 77
Joined: Fri Jul 03, 2020 6:23 am

Re: Creating a TextTable from all the words in dialogue database

Post by jlhacode »

I'm making an accessibility feature that will allow the user to tap on individual words. My logic was that I would tap a word, look it up in my text table, and play it with text to speech.
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a TextTable from all the words in dialogue database

Post by Tony Li »

If you're doing text to speech on individual words, I don't think you need a text table. Here's one idea:

Use TextMesh Pro. (See TextMesh Pro Support.)

Add a script to the Dialogue Manager that has an OnConversationLine method. In the method, process the text to add <link> tags around every word. (Tutorial on <link> tags.)

When the user taps a link tag, play the corresponding word with text to speech.
jlhacode
Posts: 77
Joined: Fri Jul 03, 2020 6:23 am

Re: Creating a TextTable from all the words in dialogue database

Post by jlhacode »

My mistake, I missed a significant detail. All the words I'll need to send to text-to-speech will have definitions describing the word being tapped.

For example:
- Cat : Felis catus
- Dog : Canis familiaris
User avatar
Tony Li
Posts: 22054
Joined: Thu Jul 18, 2013 1:27 pm

Re: Creating a TextTable from all the words in dialogue database

Post by Tony Li »

It's not quite what you need, but you can export all the Dialogue Text, Menu Text, and quest text to a text file. From the Dialogue Editor's Database tab, use Export Database > Format: Language Text. This option exports text dumps into separate files for each language. It's most often used to check which characters your language-specific fonts require. However, you can then separate the words into a list (one per line) and import them into a text table.
jlhacode
Posts: 77
Joined: Fri Jul 03, 2020 6:23 am

Re: Creating a TextTable from all the words in dialogue database

Post by jlhacode »

That definitely helps. I can easily make a script that'll make a list for me.

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

Re: Creating a TextTable from all the words in dialogue database

Post by Tony Li »

Glad to help!
Post Reply