Editor Window - auto copy text from field to field

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Editor Window - auto copy text from field to field

Post by michaelheiml »

Hi Tony,

I've got a usability question, and/or maybe I'm just using the dialogue editor in the wrong way. Anyways, this is a thing that costs me a lot of time and is error prone so I'd like to ask:
dsfu editor copy paste.png
dsfu editor copy paste.png (68.41 KiB) Viewed 276 times
Look at the picture. When I create a new node, I double click it to add text, which is put in the field "Dialogue Text". Now, the node shows me the text which is good, since I have a good overview and I have a lot of nodes.

I also have localizations, in this example for "de" and "en".

If I now export the database for localization, the field "Dialogue Text" is filled but the fields for "de" and "en" are empty. But since I need those fields to be filled in as well, I now have to manually copy each "Dialogue Text" field to the field "de". This is time-consuming and somewhat a "hacky way", since now if someone who does not speak "de" would still see german text as preview text on the nodes.

So I look for a way to prevent this copy/duplication thing. One thought is to be able to select the previewed language on the node manually + also select which language field is filled with double-clicking the node. Or a batch function that allows me for all dialogues to copy the "Dialogue Text" field to a chosen localization field manually (or even do that automatically after filling in the "Dialogue Text" field)? Something like that would help.. or do you have a better idea?

Thanks,
Michael
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editor Window - auto copy text from field to field

Post by Tony Li »

Hi Michael,

What about using the Localization Export/Import feature to populate the localization fields?
michaelheiml
Posts: 46
Joined: Thu Nov 08, 2018 5:47 am

Re: Editor Window - auto copy text from field to field

Post by michaelheiml »

Hi Tony,

I did it that way in the past but its "a long way" so I thought maybe there could be a shorter one :)
User avatar
Tony Li
Posts: 21681
Joined: Thu Jul 18, 2013 1:27 pm

Re: Editor Window - auto copy text from field to field

Post by Tony Li »

If you don't mind doing a little scripting, the Dialogue System provides event hooks that you can use to customize the editor without having to directly modify the DS source code: Customizing the Dialogue Editor

You could, for example, add a button that auto-copies fields as appropriate for your needs.
Post Reply