I need your help for localizing actor display names inside dialogue entries.
Problem description 1
in my dialogue entries I use the [lua(Actor["Actor Name"].Display_Name)] expression whenever a character mentions another character by name. However, I can't get it to localize properly.
I have added actor fields for the localization as described here: https://www.pixelcrushers.com/dialogue_ ... textTables
The display name and respective localization fields are set up as follows:
Actor Name: Villagers
Fields
Title: Display Name
Value: Dorfbewohner
Type: Text
Title: Display Name en
Value: Villagers
Type: Localization
However, if I use the above mentioned expression in my dialogue entries, the game shows the original display name, unless I specify it.
Expamle:
Dialogue Entry (default): "Siehst du die [lua(Actor["Villagers"].Display_Name)]?"
--> in play mode: "Siehst du die Dorfbewohner?"
not specified: Dialogue Entry (en): "Do you see the [lua(Actor["Actor Name"].Display_Name)]?"
--> in play mode: "Do you see the Dorfbewohner?"
specified: Dialogue Entry (en): "Do you see the [lua(Actor["Actor Name"].Display_Name_en)]?"
--> in play mode: "Do you see the Villagers?"
We are editing our texts in a spreadsheet that we import into the database. To avoid having to type the long expression in our spreadsheet we type the names followed by XXX (e.g. BenXXX) and later search and replace these with the expression before importing the sheet into the database.
Due to some other stuff it would be quite inconvenient for our workflow if we had to specify the localization in the name - it would be way easier if this was handled within the database.
Problem description 2
I wrote a custom component that we use for speechbubbles in comics that directly accesses the dialogue entry texts from the database. This is the relevant code snippet that draws the text from the database:
Code: Select all
fullEntryText = FormattedText.Parse(_entry.subtitleText).text;
Here, the names are not localized either.
Question
1: Is there a way to localize actor names within a dialogue entry without specifying the language code in the lua expression?
2: How to achieve this in the mentioned custom script that directly accesses the dialogue entry text?
Thanks in advance!
Best,
Lorena