Skip to content

An enhanced and user-friendly Unity dialogue system plugin

License

MIT, Unknown licenses found

Licenses found

MIT
LICENSE
Unknown
LICENSE.meta
Notifications You must be signed in to change notification settings

Owmacohe/Descant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

License: MIT GitHub stars GitHub downloads

Descant logo

Descant

dess • can’t

  1. an independent treble melody sung or played above a basic melody.
  2. a melodious song.
  3. a discourse on a theme.

Descant Dialogue Editor

Sample UI implementation

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

  1. Install the latest release from the GitHub repository, unzip it, and place the folder into your Unity project's Packages folder.
  2. Return to Unity, and the package should automatically be recognized and visible in the Package Manager.
  3. A sample scene can be found at: Descant/Examples/Test_Scene.unity.
  4. 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 selecting Edit Descant Graph.
  • Descant Actors
    • Descant Actors can be created by right clicking, and selecting Create/Descant Actor.
    • Descant Actors can be edited through the Inspector.
  • Descant Logs don't need to be created or modified manually by the player at all. A single DescantLogData file exists in the Descant/Resources folder. Please don't delete it!

Usage

  • Descant Graphs
    1. The Descant Graph Editor can be opened from the toolbar with Descant/Graph Editor or by creating/editing a Descant Graph file.
    2. Use middle-click to pan around in the editor.
    3. New nodes can be created by right-clicking within the grid.
    4. Connections between nodes can be created by left-clicking on nodes’ ports, and dragging to create a connection line to another port.
    5. ChoiceNodes represent player choices at certain moments within the dialogue, and ResponseNodes represent the NPC’s responses or statements.
    6. If you want to have a DescantActor’s property (statistic, topic, or relationship value) to show up within a ChoiceNode or ResponseNode's text, write {actor_name:property_name}, and Descant will inject the first property it finds with the name property_name right into it. (see the below for more info on DescantActors).
    7. IfNodes represent junctions in the flow of the dialogue, and can be used quite powerfully. They function similarly to Components (see below), and are thus not recommended for beginners.
    8. The StartNode represents the place where a given dialogue begins, and EndNodes represent where it can end.
    9. 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).
  • Descant Actors
    1. Descant Actors represent the player and any NPCs that they might talk to. Descant Actors are not necessary when using Descant.
    2. 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
    1. Drag the ConversationUI prefab from the Descant/Assets folder into your Unity scene (you may have as many ConversationUIs as you want in the same scene, and you may modify their text and UI styles as much as you want, so long as the DescantConversationUI's inspector assignments don’t get broken).
    2. Add an Event System object to your scene (Create/UI/Event System), if you don't already have one.
    3. 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 many DescantDialogueTriggers as you want in the same scene).
    4. At some point while the game is running, call the Display() method in the DescantDialogueTrigger script to begin the dialogue (e.g. when the player presses [E], when a Button is clicked, etc.).
  • Logs
    1. The Descant Log can be opened from the toolbar with Descant/Log.
    2. Turn the Capture toggle on to start capturing events as they happen at runtime.
    3. The log only saves the last played dialogue.
    4. Please don't delete the log file located at Descant/Resources!

Documentation

Inspiration/Sources

Acknowledgements