Page 1 of 1

Best way to convert dialogues from text format

Posted: Tue Jun 14, 2016 12:47 pm
by mandi
Hi Tony,
some of my dialogues are written in plain text files, in a script-like fashoin (capitalize name of the character, under that its dialogue line, then an empty line, and then the same for the other conversant). What kind of pipeline would would recommend for converting that into DS database (I guess some xml parser maybe)?
Best!

Re: Best way to convert dialogues from text format

Posted: Tue Jun 14, 2016 3:02 pm
by Tony Li
Hi Artur,

Here are three ideas:

1. Put it in CSV format and use the CSV Converter. You'd need to convert this:

Code: Select all

LADY ASTOR
Mr. Churchill, if you were my husband, I'd put poison in your tea.

CHURCHILL
Madam, if I were your husband ... I'd drink it.
to something like this:

Code: Select all

Actors
ID,Portrait,AltPortraits,Name,Pictures,Description,IsPlayer
Number,Special,Special,Text,Files,Text,Boolean
1,,[],Player,[],"",True
2,,[],CHURCHILL,[],"Winston Churchill",False
3,,[],LADY ASTOR,[],"Lady Astor",False

Conversations
ID,Title,Description,Actor,Conversant
Number,Text,Text,Actor,Actor
1,Test Conversation,"This conversation occurs Churchill and Lady Astor.",2,3

DialogueEntries
entrytag,ConvID,ID,Actor,Conversant,Title,MenuText,DialogueText,IsGroup,FalseConditionAction,ConditionPriority,Conditions,Script,Sequence,Video File,Importance,FR,Menu Text FR,Sequence FR,Response Menu Sequence
Text,Number,Number,Number,Number,Text,Text,Text,Boolean,Special,Special,Text,Text,Text,Text,Text,Text,Text,Localization,Text,Text,Text
CHURCHILL_1_0,1,0,1,2,START,,,False,Block,Normal,,,None(),,,,{{omit}},{{omit}},{{omit}},{{omit}},{{omit}}
LADY_ASTOR_1_1,1,1,3,1,,,"Mr. Churchill, if you were my husband, I'd put poison in your tea.",False,Block,Normal,,,,,{{omit}},{{omit}},{{omit}},{{omit}},{{omit}}
CHURCHILL_1_2,1,2,2,1,,,"Madam, if I were your husband ... I'd drink it.",False,Block,Normal,,,,,{{omit}},{{omit}},{{omit}},{{omit}},{{omit}}

OutgoingLinks
OriginConvID,OriginID,DestConvID,DestID,ConditionPriority
Number,Number,Number,Number,Special
1,0,1,1,Normal
1,0,1,2,Normal
2. Or do the same but put it in Chat Mapper XML format and use the Chat Mapper Converter.

3. Or write your own converter. There's a starter template in Scripts/Editor.

Re: Best way to convert dialogues from text format

Posted: Wed Jun 15, 2016 6:47 am
by mandi
Thank you Tony!

Re: Best way to convert dialogues from text format

Posted: Wed Jun 15, 2016 8:45 am
by Tony Li
Happy to help!