Page 1 of 1

Creating a TextTable from all the words in dialogue database

Posted: Wed Aug 26, 2020 7:29 pm
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?

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

Posted: Wed Aug 26, 2020 8:40 pm
by Tony Li
Hi,

Nothing built-in. Why do you want to do that? Maybe I can suggest an alternative.

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

Posted: Wed Aug 26, 2020 8:49 pm
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.

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

Posted: Wed Aug 26, 2020 9:13 pm
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.

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

Posted: Thu Aug 27, 2020 4:06 am
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

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

Posted: Thu Aug 27, 2020 8:47 am
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.

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

Posted: Thu Aug 27, 2020 4:20 pm
by jlhacode
That definitely helps. I can easily make a script that'll make a list for me.

Thanks Tony!

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

Posted: Thu Aug 27, 2020 4:31 pm
by Tony Li
Glad to help!