passing two sentences in the same Dialogue Text

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
alfonso
Posts: 104
Joined: Mon Jul 13, 2015 6:31 am

passing two sentences in the same Dialogue Text

Post by alfonso »

Hi Tony!

I'm having a little issue with the japanese version of the game, as you know in the game we have 4 boys and a girl and some lines are shared between them, but in the japanese version we have a problem and need to split the shared lines in a boys' version and girls' version.

I thought a solution for the asians languages but i have an issue.

The translators use an excel to make the translation, so I added two new columns, one to boys version and another one to the girl version.
Then I made a custom csv export in Google Spreedsheet to merge this to new column in a text like "[lua(_genre("boy text", "girl text"))]". (_genre just check if it is the boy or the girl whose is speaking and return the correct line)

THE PROBLEM
The problem is that this two lines can have color tag (em) and icon tags (<quad class="name">) for now I dont found any issue with the color tag but with the icon the lua raise an exception of syntax error, is look like that the lua parse the icon and try to read the image

In the follow image you can see an example

the original line was:
[lua( _genre("texto si' "soy", <quad class="chris_living"> [em1]chico[/em1]","texto si soy chica <quad class="charlie_living">") )]
Image

Any option just to the lua read the raw text with out parsing to image?

Thanks a lot :)
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: passing two sentences in the same Dialogue Text

Post by Tony Li »

Hi Alfonso!

It looks like the problem is that the Lua strings contain quotes ( " ) which end the string. If I color-code it, the strings are:

[lua( _genre("texto si' "soy", <quad class="chris_living"> [em1]chico[/em1]","texto si soy chica <quad class="charlie_living">") )]

Can you replace quotes ( " ) with escaped quotes ( \" )? This gives you:

[lua( _genre("texto si' \"soy\", <quad class=\"chris_living\"> [em1]chico[/em1]","texto si soy chica <quad class=\"charlie_living\">") )]

Or, with color:

[lua( _genre("texto si' \"soy\", <quad class=\"chris_living\"> [em1]chico[/em1]","texto si soy chica <quad class=\"charlie_living\">") )]
alfonso
Posts: 104
Joined: Mon Jul 13, 2015 6:31 am

Re: passing two sentences in the same Dialogue Text

Post by alfonso »

you are totally right, now works perfect with color tag and icons tag

Thank you so much :)
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: passing two sentences in the same Dialogue Text

Post by Tony Li »

Glad to help!
Post Reply