Page 1 of 1

Editor Window - auto copy text from field to field

Posted: Fri Aug 18, 2023 9:53 am
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 301 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

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

Posted: Fri Aug 18, 2023 11:35 am
by Tony Li
Hi Michael,

What about using the Localization Export/Import feature to populate the localization fields?

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

Posted: Tue Aug 22, 2023 3:21 am
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 :)

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

Posted: Tue Aug 22, 2023 8:20 am
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.