Description

Chit Chat is a stack based dialogue system with a custom editor to make it easier to create dialogues. The system features three different dialogue actions, characters, templates and one in-built UI but it also supports custom UI.

Guide

Creating the dialogue
To get started create a Dialogue asset in the Assets folder from ChitChat -> Dialogue. Now double click it to open up the dialogue editor. In the Dialogue Selector you can press the + button to create an action or if there already is an action you can right click it to create an action under the one you clicked. If you then left click that action it will open it up in the Dialogue Inspector (Event action does not have an inspector) which is where you set the parameters for that action. To create a character check out the Character chapter.

Scene setup
In a scene create an object with the Dialogue System component, this will automatically add a few other components with some parameters you can change like the punctuation pause delay. Next create an object, add a screen panel component and a Dialogue Panel component, you can leave the UI options as Simple for now (check out the In-game UI and Creating custom UI chapters if you want to know more about this component). Now back to the Dialogue System object you can drag the Dialogue Panel object into the UI Component parameter and also add your Dialogue asset to the Dialogue Data parameter. Now you can hit play and feast in the dialogue you created.

You can find examples at ChitChat/Assets/Examples 

Actions

There are three different actions as of right now. The three actions are:

Speak action
Used when a character is speaking. Here you can set which character is talking, what picture to use and where in the UI this picture should show up. There is also support for a writing effect with a parameter to set the speed of it. This actions also allows for sounds to be played either For each character in the text, Loop a sound or play it Once. Loop and Once also supports delaying the sound.   

Choice action
Used when you want the player to choose an option which leads to new dialogue. There can be an unlimited amount of choices just make sure the UI can handle all those choices.

Event action
Used to send an event from dialogue to objects in the scene. This uses a stinky string identifier, there is a Dialogue Event Listener component which can be used to make some logic happen when a certain string identifier gets received. You can alternatively use the IEventActionListener interface if you don't want to use the component.

Characters

Characters can be created in the Asset directory through ChitChat -> Character. Each character can have their own name and a list of pictures for stuff like different emotions or poses. These pictures require a name and can then be found and used in the Speak action.

Templates

Next to the Dialogue Inspector window you can select the Templates window, here you can set the template for an action. This template will be used the next time you create that action, so if you always want to have a certain speed for the writing effect but don't want to set it for every Speak action you can instead set it in the template and every Speak action you create will have that speed from the start.

In-game UI

For the dialogue system to work you need a Dialogue Panel component. This component has a UI options parameter with these options:

Simple
This is the built-in UI that comes with the library. It's nothing fancy but is easy to use when you want to test out some dialogue.

Custom
The custom option allows you to set your own custom dialogue UI, just select the panel type you want to use.

Creating custom UI

To create custom UI the panel you create needs to inherit from DialoguePanelBase and don't forget to add using ChitChat; . Now this base class has 4 abstract functions you need to implement which gives you the information for the current dialogue action and is what you will use in your UI. You can use the in-built UI as an example just go to
ChitChat/Code/ChitChat/UI/DefaultDialoguePanel.razor.