Hello,
I'm new to the asset, and while I'm using it, I have some questions.
I am developing a game with some narrative branching (not very complex) and many general UIs with fixed texts.
As I've been developing games, I managed all texts in a sheet (Google Sheet or Excel) that contains all texts in all languages supported in the game. Each text has a unique "Key" string value, which I put in the game's UI or (linear) dialogues, then converted to corresponding localized text when the game runs. I guess this is quite standard process.
However, as far as I see, it doesn't look like this "Key-value approach" is natural way to work with the Dialogue System asset. Instead, I put a text directly in the Dialogue Database asset, and use the localization option to put localized texts in the asset.
I can put the "Key" of each dialogue text in the Dialogue Database, but it would reduce the readability of the dialogue, which I don't want to.
So, I can't seem to use the "Key-text based approach" for UI's using the asset. (dialogue, quest, ...)
However, not all texts UIs in the game should be managed by the Dialogue System asset, so those can still use the "Key-text based approach", as I've been doing so far. This makes the text management method twofold - one with directly putting texts in Dialogue Database, and one with putting Key in other elements, which is confusing and not coherent.
So, my questions are...
1. Is there any way to use the Dialogue System using the "Key-text based approach"? Like, is there any way to still see the real text when I put a "Key" to each node in the Dialogue Database?
2. I want to centralize the text management used in the game, preferably using Google Sheet (to export as csv). Is there any good way to organize text used in branching narrative?
3. Or, is there any best practice to centralize and and streamline the text management process using the asset?
Best practice to centralize text management while using the asset?
Re: Best practice to centralize text management while using the asset?
Hi,
If your existing spreadsheet is formatted properly, you can specify in the Localization Export/Import section to use the Key field to identify each dialogue entry. Then you can import the text from your spreadsheet into your dialogue database, setting each dialogue entry's Dialogue Text to the corresponding value in the spreadsheet.
Alternatively, if you want to read from the spreadsheet at the time that you inspect a dialogue entry, you can hook your own code into the Dialogue Editor. (See Customizing the Dialogue Editor.) Assign your own C# methods to DialogueEditorWindow.customDrawDialogueEntryNode and/or DialogueEditorWindow.customDrawDialogueEntryInspector. In those methods, use the dialogue entry's Key field value to look up the text in your spreadsheet and display it.
In the Dialogue Editor's Templates section, add a custom field (e.g., named "Key") to your dialogue entry template. Tick the Main checkbox so it appears in the main editing section of the inspector when you inspect a dialogue entry.
If your existing spreadsheet is formatted properly, you can specify in the Localization Export/Import section to use the Key field to identify each dialogue entry. Then you can import the text from your spreadsheet into your dialogue database, setting each dialogue entry's Dialogue Text to the corresponding value in the spreadsheet.
Alternatively, if you want to read from the spreadsheet at the time that you inspect a dialogue entry, you can hook your own code into the Dialogue Editor. (See Customizing the Dialogue Editor.) Assign your own C# methods to DialogueEditorWindow.customDrawDialogueEntryNode and/or DialogueEditorWindow.customDrawDialogueEntryInspector. In those methods, use the dialogue entry's Key field value to look up the text in your spreadsheet and display it.
You may also be interested in using the Dialogue System's built-in Localization Export/Import and/or i2 Localization integration, both of which support spreadsheet export/import. For centralized text management, many devs use i2.ludosmith wrote: ↑Thu Oct 24, 2024 1:27 am2. I want to centralize the text management used in the game, preferably using Google Sheet (to export as csv). Is there any good way to organize text used in branching narrative?
3. Or, is there any best practice to centralize and streamline the text management process using the asset?
Re: Best practice to centralize text management while using the asset?
Thank you for your reply!
We ended up putting the Key into the Node and edited the asset a bit so that it displays localized text on the inspector realtime
We ended up putting the Key into the Node and edited the asset a bit so that it displays localized text on the inspector realtime
Re: Best practice to centralize text management while using the asset?
Hi,
If by "edited the asset" you mean directly edited the source code, I strongly recommend using the provided script hooks. Or, if there isn't a script hook that you need, let me know so I can add it. Otherwise you'll lose your modifications when you update the Dialogue System.
If by "edited the asset" you mean directly edited the source code, I strongly recommend using the provided script hooks. Or, if there isn't a script hook that you need, let me know so I can add it. Otherwise you'll lose your modifications when you update the Dialogue System.