# Refactored from: https://github.com/obxfisherman/dialog_tree/blob/master/dialog.py
# Similar to first iteration of ConvoHub CSV files by Maria and Greg
#
# FORMAT: JAGGED TSV - variable number of tilde-separated values - '~' between ...~text~dest_node_id~... pairs
# EBNF GRAMMER: ?row: NPC_ID r'~' PROMPT_ID r'~' PROMPT_TEXT ( r'~' RESPONSE_TEXT NODE_ID )+
# EBNF GRAMMAR: unique_together (NPC_ID, PROMPT_ID)
# Positional args (fields) in this jagged TSV (tilde-separated values) file
#   1: the NPC_ID (int).
#   2: index (int) - NODE_ID for the comment/question for this NODE, dialog starts at NODE_ID=100
#   3: prompt (str) - question or description of the "room")
#     4: Text (str) for first possible response or command or option
#     5: Destination NODE_ID (int) if this player choses this response/command/option
#   6,7,...: (optional) 2nd possible RESPONSE_TEXT and destination NODE_ID
1~100~Do you like red?~yes~104~no~101~I don't like this question~999
1~101~I like red, do you like blue?~yes~103~no~102
1~102~We don’t share any likeness in color~bye~999
1~103~Well we have blue in common at least~bye~999
1~104~I also like Red, do you also like blue?~yes~106~no~105
1~105~We only have red in common~bye~999
1~106~We both like the same colors. Do you also like white?~yes~108~no~107
1~107~Too bad we almost like the colors of the US~bye~999
1~108~Yeah, we both like the colors of the US!~bye~999
1~999~Farewell

2~100~Problem solving:\nDoes the damn thing work?~yes~101~no~102
2~101~Don’t screw with it!~Ok~999
2~102~Did you screw with it?~yes~103~no~108
2~103~You dumb shit!~Ok~104
2~104~Does anyone know?~Yes~106~No~105
2~105~Hide it!~Ok~999
2~106~You poor bastard!~Ok~107
2~107~Can you blame someone else?~Yes~999~No~106
2~108~Will you catch hell?~Yes~106~No~109
2~109~Shit-can it!~Ok~999
2~999~No Problem!