< Inventory and objects Index Textual information >

Dialogs

A Dialog item specifies a dialog. It consists of several DialogText items that contain the text to speak and the answer and other reactions to it.

Dialog

Item typeDialog
Descriptiona conversation
Actionstart / end the dialog
Conditiontrue, if performed

KeyTypeDefaultDescription
descriptionstring""short description of the other character
imageImages<>image of the other character
initActions<>action, executed each time the dialog starts
exitActions<>action, executed each time the dialog ends
text[DialogText][]list of alternatives to say
namestring""name of the player; if none, the name in the Game item is used
playerImages<>image for the player; if none, the image in the Game item is used
backgroundImages<>background image
textAreaRectangle<>area to display text in dialog; if none, automatic layout is used
styleStyle<>the style for the text
textAlignbyte0alignment for the text of the player
answerAlignbyte0alignment for the text of the answer
fontFont<>the font for the text

DialogText

Item typeDialogText
Descriptiontext in a dialog
Action-
Conditiontrue, if performed

KeyTypeDefaultDescription
textstringthe text to say
answerstring""the answer
topicstring""a short topic for selection
textSpeechMedia<>audio/video that plays the text
answerSpeechMedia<>audio/video that plays the answer
textImageImages<>image displayed during text
answerImageImages<>image displayed during answer
actionActions<>the action to perform, when the answer is shown
removebool0if true, the text is removed when said
diarybool0if true, text and answer are added to the diary when said
resolveVarbool0if true, integer variables noted as ?var are replaced by the actual value

When a dialog is started, it displays for each DialogText its topic. If there is no topic, the text is used. When the user selects one of these DialogText items, the following happens:

  1. If there is at least one of text/topic, textSpeech, or textImage, they are displayed/played. This ends when either the player presses the mouse button or the text speech/animation stops.
  2. The action is executed. If it is a DisplayText item, its text is used as the answer.
  3. If there is at least one of answer, answerSpeech, or answerImage, they are displayed/played. Again, this ends when either the player presses the mouse button or the text speech/animation stops.

Of course, textSpeech/answerSpeech should read the text/answer aloud and textImage/answerImage should display or animate the speech. Synchronisation between speech and animation may be done by embedding the speech into an Animation. Speech and/or animation may be infinite loops. In that case, if one stops, the other one is stopped too. (E.g. one may use a simple looping animation and don't care about lip-synchronized speech.)