Page 1 of 2

Localization Integration for custom text field in Quest Entry

Posted: Wed Jun 12, 2024 5:13 am
by Saper
Hi Tony

We have question how we can add custom added text field to String Table. In our project we added a Text field to Entry, field name for example "Entry 3 Description" and we want to localizate those fields.

We updated localization with packege: DS_LocalizationPackageSupport_2023-11-26.unitypackage

Re: Localization Integration for custom text field in Quest Entry

Posted: Wed Jun 12, 2024 8:35 am
by Tony Li
Hi,

I recommend using the latest Localization Package support included in DS version 2.2.46.1. You can customize the code to localize additional fields.

Re: Localization Integration for custom text field in Quest Entry

Posted: Wed Jun 19, 2024 6:37 am
by wauPixmilk
Hi Tony, I am in the process of updating our DS to the version you mentioned, but I still struggle with localizing the quests.

In the docs https://www.pixelcrushers.com/dialogue_ ... ation.html you mention "DS To Loc window's "String Table To Dialogue System"", which I can't see

Also, the quests don't seem to be localized at all. Neither titles nor their descriptions, steps, no nothing...

Also, regarding your previous tip: what class should I modify to translate additional fields?

Am I missing something?

Re: Localization Integration for custom text field in Quest Entry

Posted: Wed Jun 19, 2024 8:07 am
by Tony Li
Hi,

Are you using the Unity Localization Package integration? If so, have you imported the Localization Package Support unitypackage that's included in DS version 2.2.46?

Note: If you're not using Unity's Localization Package, the Dialogue System includes several other localization options, such as its own built-in Localization Export/Import, i2 Localization integration, or sending your content to the localization company Alocai for a quote.

Re: Localization Integration for custom text field in Quest Entry

Posted: Mon Jun 24, 2024 5:57 am
by wauPixmilk
Hi again Tony, sorry for the late response...

regarding your previous answer:
- I updated DS to 2.2.46.1
- I used Localization Package Integration(must have omitted this before, because this time I can see String Table to DS button...sry for that)
- I added component Localization Bridge Component

So... assuming these are all steps, and they were correctly executed how do I localize some additional fields?
We added a description for each quest entry and we would like to localize the Quest Group field as well.

Also, when should I use the String Table to DS button? Every time I change smth in a Localization Table? Before every build just to be sure?

Re: Localization Integration for custom text field in Quest Entry

Posted: Mon Jun 24, 2024 8:23 am
by Tony Li
Hi,
wauPixmilk wrote: Mon Jun 24, 2024 5:57 amSo... assuming these are all steps, and they were correctly executed how do I localize some additional fields?
We added a description for each quest entry and we would like to localize the Quest Group field as well.
Add them to the CopyDialogueDatabasesToStringTable() and CopyStringTableToDialogueDatabases() methods. There's a section for Quests, and you can see that it currently localizes Display Name, Description, Entry #s, etc.
wauPixmilk wrote: Mon Jun 24, 2024 5:57 amAlso, when should I use the String Table to DS button? Every time I change smth in a Localization Table? Before every build just to be sure?
It's up to you, but certainly before every build just to be sure. If you want to do it more frequently, that's fine.

Re: Localization Integration for custom text field in Quest Entry

Posted: Mon Jun 24, 2024 9:06 am
by wauPixmilk
Thanks a lot.

Another question:
We keep our quests in a separate database from dialogues and we synchronize them using SyncFrom/Syncnow. The thing is that we get a separate entry for each quest that is synced between databases. The same goes for actors and probably every shared/synced item. Can we do smth about it?

Re: Localization Integration for custom text field in Quest Entry

Posted: Mon Jun 24, 2024 10:11 am
by Tony Li
I'll look into that. In the meantime, the integration assigns a Guid to every field that gets copied into the Localization package's string table.

For example, say that your main database has a quest named "Quest A". When you copy it to the string table, the quest will get a field named "Guid" containing something like "6f8fdf15-fde9-45fd-bdde-942c8baf43a3". In the string table, the quest's Description field key will be "6f8fdf15-fde9-45fd-bdde-942c8baf43a3_Description".

Currently, your second (synced) database will also create entries for its "Quest A" with a different Guid such as "b296be02-6d31-4ecd-b62a-fb3bc0a8eb18". You can manually change the Guid value to be the same as in the main database. If you do this before copying to the string table, it won't create duplicate keys in the string table. If you've already created those duplicate keys in the string table, you can set the Guid to the same as the main database and delete those duplicate keys.

Re: Localization Integration for custom text field in Quest Entry

Posted: Mon Jun 24, 2024 11:36 am
by wauPixmilk
If I understand you correctly, working on guids would require me to track 'original guid' and somehow to know which quest is the 'original one' and which one is its copy in the synced DB...

I noticed that in Dialogue window you display synced items (actors/quests) as not interactable(they are greyed out and you can't edit them from the synced db context). If so, perhaps there is a way to tell which items are synced and which are unique for the given db?

Re: Localization Integration for custom text field in Quest Entry

Posted: Mon Jun 24, 2024 11:56 am
by Tony Li
Hi,

The Dialogue Editor knows if an asset (actor, quest, etc.) is synced from the source database if the ID is the same as an ID in the source database.