Page 6 of 7

Re: Substring replacement

Posted: Fri Nov 18, 2022 5:15 pm
by Tony Li
Yes, that's correct.

Re: Substring replacement

Posted: Tue Sep 05, 2023 12:52 pm
by korsak42
Hi again!
I have a problem with localization. As you can see on the screenshots I've filled all fields but the system always takes "ru" option on the fields that have scripts, I've tried to delete script callings and nothing has changed.

Re: Substring replacement

Posted: Tue Sep 05, 2023 3:36 pm
by Tony Li
Hi,

It's possible that the language setting "ru" is stored in PlayerPrefs.

Inspect your Dialogue Manager GameObject. Click Localization Settings > Reset Language PlayerPrefs. This will clear the language setting that's stored in PlayerPrefs.

Re: Substring replacement

Posted: Tue Sep 05, 2023 4:34 pm
by korsak42
Omg, thank you so much!

Re: Substring replacement

Posted: Tue Sep 05, 2023 4:39 pm
by Tony Li
Glad to help!

Re: Substring replacement

Posted: Sat Sep 09, 2023 10:54 pm
by korsak42
I have another strange bug. As you can see on the screenshot I have 1 lua function in dialogue field and two in the script field, but lua function but when playing the lua dialog, the GetNextQuestSettlementName() function is called twice - once before executing the ActivateOptionStage() method, and the second time after. What could cause this behavior?

Re: Substring replacement

Posted: Sun Sep 10, 2023 9:26 am
by Tony Li
Hi,

In a regular conversation such as this, the Dialogue System must process the text in Dialogue Text twice -- once when determining which dialogue entries are currently valid to show, and again before showing the text.

The first time is required to prepare the text prior to invoking any custom OnConversationLine() methods. This way your custom OnConversationLine() methods contain the properly-processed text.

The second time is to prepare the text for display. This is required because an OnConversationLine() method may have modified the text to add more markup tags, or if you are showing a subtitle that, for example, was generated procedurally instead of in a regular conversation.

Can you move the call to GetNextQuestSettlementName() to the Script field? The Script field will only be invoked once. It will be invoked before the second time that the text is processed. If GetNextQuestSettlementName() sets a DS variable, you can use it in the text. Example:

Code: Select all

void GotoNextQuestSettlementName()
{
    string yourSettlementName = /* your code here to get next settlement name */
    DialogueLua.SetVariable("SettlementName", yourSettlementName);
}
  • Dialogue Text: "End with finding home. Go [var=SettlementName]."

Re: Substring replacement

Posted: Fri Sep 29, 2023 5:07 am
by sumodont
Oh, that's not good, but it's still hard to put into words how grateful I am for your help. I'm trying to save money now so I can buy the full version and not have to suffer anymore.

Re: Substring replacement

Posted: Fri Sep 29, 2023 8:10 am
by Tony Li
sumodont wrote: Fri Sep 29, 2023 5:07 am Oh, that's not good, but it's still hard to put into words how grateful I am for your help. I'm trying to save money now so I can buy the full version and not have to suffer anymore.
If you're referring to TextMesh Pro support, it's now built into the evaluation version so you can test the Dialogue System with TextMesh Pro.

Re: Substring replacement

Posted: Sun Nov 19, 2023 10:30 am
by korsak42
Hi! In some dialogs, some nodes call up Russian text instead of English, although all nodes are filled in the same way, the locale is English, and the “Use system language” setting has been removed. Why might this happen?