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.
| Item type | Dialog |
| Description | a conversation |
| Action | start / end the dialog |
| Condition | true, if performed |
| Key | Type | Default | Description |
| description | string | "" | short description of the other character |
| image | Images | <> | image of the other character |
| init | Actions | <> | action, executed each time the dialog starts |
| exit | Actions | <> | action, executed each time the dialog ends |
| text | [DialogText] | [] | list of alternatives to say |
| name | string | "" | name of the player; if none, the name in the Game item is used |
| player | Images | <> | image for the player; if none, the image in the Game item is used |
| background | Images | <> | background image |
| textArea | Rectangle | <> | area to display text in dialog; if none, automatic layout is used |
| style | Style | <> | the style for the text |
| textAlign | byte | 0 | alignment for the text of the player |
| answerAlign | byte | 0 | alignment for the text of the answer |
| font | Font | <> | the font for the text |
| Item type | DialogText |
| Description | text in a dialog |
| Action | - |
| Condition | true, if performed |
| Key | Type | Default | Description |
| text | string | | the text to say |
| answer | string | "" | the answer |
| topic | string | "" | a short topic for selection |
| textSpeech | Media | <> | audio/video that plays the text |
| answerSpeech | Media | <> | audio/video that plays the answer |
| textImage | Images | <> | image displayed during text |
| answerImage | Images | <> | image displayed during answer |
| action | Actions | <> | the action to perform, when the answer is shown |
| remove | bool | 0 | if true, the text is removed when said |
| diary | bool | 0 | if true, text and answer are added to the diary when said |
| resolveVar | bool | 0 | if 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:
- 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.
- The action is executed. If it is a DisplayText item,
its text is used as the answer.
- 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.)