Page 1 of 2

Export for proofreading

Posted: Thu Feb 22, 2024 8:49 am
by rey
Hi all,

Making some good progress with this amazing plugin.

The one snare I've hit compared to other dialogue systems is I can't seem to find a good import/export of a single Conversation for proofreading or spellingchecking outside of the editor. While the default visual editor with nodes and links works wonderfully for creating the flow of a dialogue, it is less ideal for more detailed proofreading or automated spelling checks.

As I use Unity's default localization system, exporting the entire localized table is not very helpful either. It's too much information, and is not readable, making it just as prone to errors as editing the information in the editors default view.

So my question:
Is there any way to export a single conversation to a text file for proofreading, then reimport the file after corrections to the text have been made? This would be a vital part of our workflow.

Thanks,
Rey

Re: Export for proofreading

Posted: Thu Feb 22, 2024 11:02 am
by Tony Li
Hi,

There currently isn't exactly what you're looking for, but here are some options:

If you're looking for a screenplay format, you can use the Dialogue Editor's Database > Export Database feature to export all conversations to screenplay format. Then jump down to the conversation you're interested in. This format is easy to read (unless you have a lot of branching, but there's no good standard solution for that). However, you can't reimport from it.

Or you can export to CSV format and untick all options except Conversations. This exports all conversation info to a CSV spreadsheet that you can spellcheck and reimport back into the Dialogue System. But, since it's all conversation info, it's more than just dialogue text.

Or you can export using the Localization Export/Import feature. This provides the simplest output, which you can still import back into the Dialogue System. If you're not localizing your content, you can temporarily create a language (e.g., "en" for English). Then edit the exported CSV files and reimport them back in. Tick the checkbox next to the language to update the original text (e.g., "Dialogue Text").

Another option is to export to Chat Mapper format if you have access to Chat Mapper. Chat Mapper has additional proofreading options.

If you'd like to list some specs for your ideal proofreading workflow, I can add it to the task list.

Re: Export for proofreading

Posted: Thu Feb 22, 2024 12:56 pm
by rey
Hey Toni,

Appreciate the fast response once again :)

Simplified TXT Export
The ideal workflow would be exporting a single conversation to a simplified TXT file, listing only the ID and Dialogue Text for each node in the conversation. (No localizations needed in the base functionality, this will serve as the final input to get localized).
.
## DO NOT EDIT NODE ID'S

{Dialogue Title}

NODE ID: 1
Hello.

NODE ID: 2
Goodbye.
This text file can then be easily pasted in Google Docs or some other doc for proofreading and spelling corrections.

Simplified TXT Import
The import function would then just be able to import this simplified document, and update only the Dialogue Text Field of each node of the matching ID based on the updated text contained in the document.

Additional features & validation
- the option to include localization fields
- the option to include the actor name of each line
- importing /exporting multiple Simplified TXT Exports at once from or into a single folder
- a 'Fast Export' which uses a predefined folder to just create a {title}.txt file (or overwrites the one already present) with a single click (rather than having to select a destination and name the file)
- Additional validation and remapping for missing/mismatched node ID's

We can probably cook something up like this ourselves, but was primarily wondering if I had overlooked something simple.

Re: Export for proofreading

Posted: Thu Feb 22, 2024 1:04 pm
by rey
Unrelated, we ran into a possible minor bug where the default fields that get generated for the localized Actor Names are called "Display Name {code}" but the default behaviour of LocalizedName looks for "Name".





Added the ugly manual correction for now, just prototyping, but it looked unintended.

Re: Export for proofreading

Posted: Thu Feb 22, 2024 3:11 pm
by Tony Li
rey wrote: Thu Feb 22, 2024 1:04 pmUnrelated, we ran into a possible minor bug where the default fields that get generated for the localized Actor Names are called "Display Name {code}" but the default behaviour of LocalizedName looks for "Name".
I don't think that's a bug. Are you seeing incorrect behavior at runtime?

Re: Export for proofreading

Posted: Thu Feb 22, 2024 3:15 pm
by Tony Li
rey wrote: Thu Feb 22, 2024 12:56 pmSimplified TXT Export
The ideal workflow would be exporting a single conversation to a simplified TXT file, listing only the ID and Dialogue Text for each node in the conversation. (No localizations needed in the base functionality, this will serve as the final input to get localized).
.
## DO NOT EDIT NODE ID'S

{Dialogue Title}

NODE ID: 1
Hello.

NODE ID: 2
Goodbye.
This text file can then be easily pasted in Google Docs or some other doc for proofreading and spelling corrections.

Simplified TXT Import
The import function would then just be able to import this simplified document, and update only the Dialogue Text Field of each node of the matching ID based on the updated text contained in the document.

Additional features & validation
- the option to include localization fields
- the option to include the actor name of each line
- importing /exporting multiple Simplified TXT Exports at once from or into a single folder
- a 'Fast Export' which uses a predefined folder to just create a {title}.txt file (or overwrites the one already present) with a single click (rather than having to select a destination and name the file)
- Additional validation and remapping for missing/mismatched node ID's

We can probably cook something up like this ourselves, but was primarily wondering if I had overlooked something simple.
I'll tackle this in the next update. If you decide you would prefer a spreadsheet format, let me know (the sooner the better).

BTW, the Dialogue Editor's Database section has a "Check For Issues" foldout that can report various issues such as orphaned dialogue entry nodes and invalid Sequence fields.

Re: Export for proofreading

Posted: Thu Feb 22, 2024 3:32 pm
by rey
No CSV, a .txt is actually better :)

A text file would just be easy copy/pasting and editing in something like Google Docs and chatGTP for markups as well. For spreadsheets we can always just export the CSV for localization or more advanced edits.

I would really like to stress that first point. For a feature like this, the simpler the better in my opinion. Its not meant to catch all the connectors and meta info - just the raw text. If it was just a simple button in the Conversation MENU that reads "Export Simple Text File" and "Import Simple Text File" that would be amazing.

The validation was meant to catch unintended changes when importing a simple TXT file into an existing conversation. If node ID's were accidentally changed, that could lead to some issues. Skipping those nodes during the import is fine, but ideally it has some validation on that to notify the user of these unallocated nodes as reviewing a conversation with over 100 nodes manually is not a reliable way to verify the import succeeded.

Re: Export for proofreading

Posted: Thu Feb 22, 2024 3:34 pm
by rey
Tony Li wrote: Thu Feb 22, 2024 3:11 pm
rey wrote: Thu Feb 22, 2024 1:04 pmUnrelated, we ran into a possible minor bug where the default fields that get generated for the localized Actor Names are called "Display Name {code}" but the default behaviour of LocalizedName looks for "Name".
I don't think that's a bug. Are you seeing incorrect behavior at runtime?
Yes, it was not getting the localized names during runtime until I added the catch to change "Name" into "Display Name".

Re: Export for proofreading

Posted: Thu Feb 22, 2024 3:45 pm
by Tony Li
Hi,

In what area was it not getting the localized names?

If you're referring to the names shown in the dialogue UI's Portrait Names, or in the related CharacterInfo object in C#, those should use the localized Display Name without requiring any changes to the code.

Re: Export for proofreading

Posted: Thu Feb 22, 2024 4:01 pm
by rey
Actor.localizedName

The default localized fields in the Actor Template/instance creates "Display Name {localization code}" fields by default as shown in the screenshot.

Where the Actor.localizedName looks for "Name {localization code} " via the

Code: Select all

public static string LookupLocalizedValue(List<Field> fields, string title)
resulting in no value, even though the field is localized.

I am using the Unity Localization bridge package.

This, while ugly, fixed the problem:

Code: Select all

                if (title == "Name")
                    title = "Display Name";
The alternative would be to change the Actor template to create "Name {localization code}" fields instead of "Display name {localization code}" fields.