Best way to convert dialogues from text format

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
mandi
Posts: 77
Joined: Wed Sep 16, 2015 4:05 am

Best way to convert dialogues from text format

Post 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!
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best way to convert dialogues from text format

Post 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.
mandi
Posts: 77
Joined: Wed Sep 16, 2015 4:05 am

Re: Best way to convert dialogues from text format

Post by mandi »

Thank you Tony!
User avatar
Tony Li
Posts: 22104
Joined: Thu Jul 18, 2013 1:27 pm

Re: Best way to convert dialogues from text format

Post by Tony Li »

Happy to help!
Post Reply