Page 1 of 1

Alternative to OnConversationLine for Translation For Dialogue Options

Posted: Sat Jan 11, 2025 10:41 am
by Voltage3000
Hello, we have a question about the Dialogue system.
We're using OnConversationLine() to translate dialouge text right before it is shown to the user. This works fine for 99% of cases, but we have dialogue options that say Yes No. Those are not being translated, and OnConversationLine() doesn't seem to trigger for them until they're clicked on. Is there an equivalent to OnConversationLine() that will catch dialogue options? Or is there a different way you would recommend going about this?

Re: Alternative to OnConversationLine for Translation For Dialogue Options

Posted: Sat Jan 11, 2025 11:07 am
by Voltage3000
For clarity's sake here are some screen shots depicting our issue.

Re: Alternative to OnConversationLine for Translation For Dialogue Options

Posted: Sat Jan 11, 2025 11:27 am
by Tony Li
Hi Calvin,

To translate response menu items, add an OnConversationResponseMenu(Response[]) method:

Code: Select all

void OnConversationResponseMenu(Response[] responses)
{
    foreach (var response in responses)
    {
        response.formattedText.text = YourTranslationFunction(response.formattedText.text);
    }
}

Re: Alternative to OnConversationLine for Translation For Dialogue Options

Posted: Thu Jan 16, 2025 11:31 pm
by Voltage3000
Thanks Tony. You've allowed us to finally escape the Ratio Ruins! :D

Re: Alternative to OnConversationLine for Translation For Dialogue Options

Posted: Fri Jan 17, 2025 8:16 am
by Tony Li
Happy to help!