Awesome
Descant
dess • can’t
<img src="Media/Screenshots/editor.png" alt="Descant Dialogue Editor"> <img src="Media/Screenshots/game.png" alt="Sample UI implementation">
- an independent treble melody sung or played above a basic melody.
- a melodious song.
- a discourse on a theme.
Overview
Descant is a Unity 2022.3.x dialogue system plugin. The Unity Asset Store is chock full of many such types of plugins, ranging from feature-rich, to ultra-minimalist, to downright bad. Descant aims to hit the sweet spot between quality UI, powerful features, and easy-to-lean functionality, while also addressing many of the game-specific consequences of the standard dialogue manager setup. Besides acting as a standard tool for creating, saving, and actualizing non-linear game dialogue, it also pushes the envelope by adding optional dialogue-enhancing node components that introduce features to break away from the overused and underwhelming trends seen in many interactive fiction games. These enhancements act similar to Unity’s standard GameObject
Component
system, and can be applied at-will to nodes. This modular approach is so-far not explored in the world of Unity dialogue systems. The project will be free (and collaborative open-source) forever. Feel free to send me a message or submit a pull request if you want to make any changes.
Installation
- Install the latest release from the GitHub repository, unzip it, and place the folder into your Unity project's
Packages
folder. - Return to Unity, and the package should automatically be recognized and visible in the Package Manager.
- A sample scene can be found at:
Descant/Examples/Test_Scene.unity
. - Opening this scene may prompt you to install Text Mesh Pro. Simply click on Import TMP Essentials to do so.
Descant Files
- Descant Graphs
- Descant Graphs can be created by right clicking, and selecting
Create/Descant Graph
. - Descant Graphs can be edited by right clicking on a
Descant Graph
file, and selectingEdit Descant Graph
.
- Descant Graphs can be created by right clicking, and selecting
- Descant Actors
- Descant Actors can be created by right clicking, and selecting
Create/Descant Actor
. - Descant Actors can be edited through the Inspector.
- Descant Actors can be created by right clicking, and selecting
- Descant Logs don't need to be created or modified manually by the player at all. A single
DescantLogData
file exists in theDescant/Resources
folder. Please don't delete it!
Usage
- Descant Graphs
- The Descant Graph Editor can be opened from the toolbar with
Descant/Graph Editor
or by creating/editing a Descant Graph file. - Use middle-click to pan around in the editor.
- New nodes can be created by right-clicking within the grid.
- Connections between nodes can be created by left-clicking on nodes’ ports, and dragging to create a connection line to another port.
ChoiceNode
s represent player choices at certain moments within the dialogue, andResponseNode
s represent the NPC’s responses or statements.- If you want to have a
DescantActor
’s property (statistic, topic, or relationship value) to show up within aChoiceNode
orResponseNode
's text, write{actor_name:property_name}
, and Descant will inject the first property it finds with the nameproperty_name
right into it. (see the below for more info onDescantActor
s). IfNode
s represent junctions in the flow of the dialogue, and can be used quite powerfully. They function similarly toComponents
(see below), and are thus not recommended for beginners.- The
StartNode
represents the place where a given dialogue begins, andEndNode
s represent where it can end. - More complex functionality can be added to nodes by adding
Components
(see the Component documentation for more info on each default component, as well as how to write your own).
- The Descant Graph Editor can be opened from the toolbar with
- Descant Actors
- Descant Actors represent the player and any NPCs that they might talk to. Descant Actors are not necessary when using Descant.
- New Statistics, Topics, and Relationships can be added in the Inspector for each Descant Actor.
- Statistics are variables that pertain to actors (e.g. health, level, stamina, etc.)
- Topics are concepts that the actors may learn during dialogue (e.g. names of characters, locations, events, etc.)
- Relationships are values quantifiably that represent how actors feel about each other.
- Runtime
- Drag the
ConversationUI
prefab from theDescant/Assets
folder into your Unity scene (you may have as manyConversationUI
s as you want in the same scene, and you may modify their text and UI styles as much as you want, so long as theDescantConversationUI
's inspector assignments don’t get broken). - Add an
Event System
object to your scene (Create/UI/Event System
), if you don't already have one. - Add a
DescantDialogueTrigger
script to a GameObject of your choice, and assign its fields (hover over each field to see a popup of its description) (you may have as manyDescantDialogueTrigger
s as you want in the same scene). - At some point while the game is running, call the
Display()
method in theDescantDialogueTrigger
script to begin the dialogue (e.g. when the player presses[E]
, when aButton
is clicked, etc.).
- Drag the
- Logs
- The Descant Log can be opened from the toolbar with
Descant/Log
. - Turn the
Capture
toggle on to start capturing events as they happen at runtime. - The log only saves the last played dialogue.
- Please don't delete the log file located at
Descant/Resources
!
- The Descant Log can be opened from the toolbar with
Documentation
- This
README
- Component documentation
- Planning
- Unity Asset Store page
Inspiration/Sources
- BlabScript
- Ultima Ratio Regum
- Emily Short's Interactive Storytelling
- A Gossip Virtual Social Network for Non Playable Characters in Role Play Games
- NiEngine
Acknowledgements
- Unity's UI Toolkit framework
- Eduard Malkhasyan's Serializable Dictionary in Unity