Split Pipes Into Entries from fields different to "Dialogue Entry"

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
esdalo
Posts: 5
Joined: Mon Dec 17, 2018 6:08 pm

Split Pipes Into Entries from fields different to "Dialogue Entry"

Post by esdalo »

Hello.

I'm using this line to split pipes into entries:

Code: Select all

database.conversations.ForEach(conversation => conversation.SplitPipesIntoEntries());
It is woking ok when it finds a pipe in the "Dialogue Text" field, but sometimes I also have pipes in my localized fields (when translated text is longer than the original text), is there a way to check if the pipe is in the "Dialogue Text" or in any localized field and cut the entries according to that?

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

Re: Split Pipes Into Entries from fields different to "Dialogue Entry"

Post by Tony Li »

I'll add this to the next update and provide a patch sooner. There should be an equal number of pipes in each text. For example:
  • Dialogue Text: "Red | shoes"
  • es: "Zapatos | rojos"
This will turn into:

Default: [Red] --> [shoes]

Spanish: [Zapatos] --> [rojos]

If there are not the same number of pipes, like this example:
  • Dialogue Text: "Red shoes"
  • es: "Zapatos | rojos"
Then it will turn into:

Default: [Red shoes] --> []

Spanish: [Zapatos] --> [rojos]
Post Reply