Dialogue

From PowerUI
Revision as of 22:14, 13 January 2017 by 151.229.186.156 (talk) (Created page with "The built in dialogue (speech) system can be used to create conversations between any number of players or 'items' (typically NPCs). It fully supports the localisation system...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The built in dialogue (speech) system can be used to create conversations between any number of players or 'items' (typically NPCs). It fully supports the localisation system and can be cued from speech playback, synthesis, the player or anything else via scripting. It's also built on top of the window system so dialogue can be easily displayed inside drop-and-go templates.


Trains of thought

Dialogue is represented as a continuous 'train of thought'. Each train is made up of a series of cue cards which describe the dialogue being spoken/ by whom etc. Cue cards and dialogue trains are W3C EventTarget objects, meaning they can send and receive standard events.


Speech markup language (SSML)

Cue cards contain SSML which may potentially be forwarded to a speech synthesis engine or otherwise checked for mood cues within the speech.

<!-- The SSML describes both how it sounds and how it appears on the UI (it fully supports HTML too) -->
<happy>Hello &Username; - I'm feeling <i>great</i> today!</happy>

Internal structure

Each train of thought is stored as a JSON file. Automatically generated indices (also JSON) are also created for each dialogue starting point. For example, click/ tapping on an NPC to talk to them will result in all the possible dialogue that starts at that NPC being checked to see which one(s) are most suitable in the current gameplay context. If multiple are suitable then an options menu is created.

More information will be coming soon - the API is a work in progress!