Giter Site home page Giter Site logo

atomic-junky / monologue Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 2.0 36.54 MB

Create your dialogues for your game

Home Page: https://atomic-junky.itch.io/monologue

License: MIT License

GDScript 100.00%
dialog dialogue dialogue-systems dialogues godot lightnovel node-editor visual-novel visualnovel

monologue's Introduction

Monologue is a powerful non-linear dialogue editor made for any game engine. ๐Ÿฆ–

You can find the wiki here.

Monologue is a graph node based system dialogue editor that allows you to create modular and non-linear dialogues in any game engine.

The principle of Monologue is to assign a unique ID to each node, so that any node can refer to any other node. This powerful mechanism allows you to create amazing dialogues and stories.

Monologue example

Super Simple export

Monologue is working with just a simple JSON file and nothing else. You just need to save your chnages and it will update your JSON file.

The advantage of working with a JSON file is that it's easy to use with any other game engine or programming language.

Features

  • Easy to use: A simple and intuitive user interface.
  • JSON: Everything is stored in a JSON file.
  • Godot: Monologue is built using a free and open source game engine.
  • Manage everything: Control audio, backgrounds and characters.
  • Variables: You can define variables, compare them and update their values.
  • Events: You create events to execute storylines when something happens.
  • Test: You can test your story directly in Monologue.

The JSON file format

{
	"EditorVersion": "",
	"RootNodeId": "", # The id of the root node (where all start)
	"ListNodes": [ # Where all the nodes are stored
		...
	],
	"Characters": [ # All the characters
		...
	],
	"Variables": [ # All the variables
		...
	]
}

Interpretation

You can write your own script or use the MonologueProcess script here if you're using Godot.

To use the MonologueProcess script, create a script that extends MonologueProcess. This will allow you to use the built-in signals. You can read more about this in this script.

Credits ans Support

This project is originally from Amberlim (although these two projects no longer share any lines of code), so if you want, here is her Discord server. However, if you need help, don't hesitate to create an issue on Github.

monologue's People

Contributors

amberlim avatar atomic-junky avatar jeremi360 avatar railkill avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

monologue's Issues

Prevent the program from closing if one of the files has not been saved

Use Case

Quality of life.

Current Implementation

When you close the program, the program exit even if changes have been made.

Proposed Implementation

Detect if any changes have been made since the program was last saved. If the program tries to close while changes have not been saved, a pop-up window opens asking whether or not the user wants to save the changes made.

There are two ways of detecting changes. The first, and least clean, would be to generate a json save for each project at every close request and compare it with the original file to see if there's any difference. The other, and most preferable, would be to keep a trace of every change made, to see if there have been any changes since the last save. This last solution (a little abstract) could be implemented using part of an undo/redo system #7, but would require a lot of code rewriting/cleaning.

Add voiceline field and AudioPlayer designated for SentenceNodes

I'm proposing some enhancement requests here that are involve the direction/architecture of Monologue; these aren't just bug fixes so I think it's good to discuss first.

Use Case

Handling of voice lines for sentences. Developers mainly tie a voice line to each line of dialogue, whether in .csv or .json, they go hand-in-hand.

Current Implementation

The user has to create an ActionNode set to PlayAudio before every SentenceNode to play voice lines. This also has a clear separation between audio and dialogue, which doesn't reflect how a real developer organizes voice lines to dialogue.

Proposed Implementation

voice_sentence

Add an additional Voiceline field in SentenceNodePanel for the user to specify a sound file there. Then, add AudioPlayer to the Test story to play it because the user can skip dialogue lines, so audio playback is somewhat controlled by user skips. Whereas ActionNode PlayAudio shall be used for sound effects and other ambient stuff that would not stop abruptly just because a dialogue skip occurred.

Add action history for undo/redo functionality

Use Case

Quality of life.

Current Implementation

No action history. If the user accidentally deletes a node, they have to reload the file before save. I believe this functionality is important for serious users who want to use Monologue as a key part of their workflow.

Proposed Implementation

MonologueNodePanel and GraphEdit should keep track of its own history (let's say 20 actions each). If the user is in SentenceNodePanel (basically if that panel is visible), then undo/redo only affects that SentenceNodePanel. If the user is in the GraphEdit (when side panel is not visible), then undo/redo affects that GraphEdit. This way, different GraphEdits (different tabs) will also keep track of its own action history.

This means UI controls within the individual side node panel or graph will need to connect to the "changed" signal, so whenever a change is detected, it adds it to the list of actions. For LineEdits and TextEdits, it is better to refactor them to only trigger on focus_exited, otherwise it will populate the history incredibly quickly for every character typed. There are some additional actions such as adding and deleting of graph nodes that need to be handled slightly differently for undo/redo.

Proposed default hotkey to trigger undo/redo is Ctrl + Z and Ctrl + Shift + Z respectively, following the convention of the Save hotkey (Ctrl + S). Anticipated type of actions to keep track of are as follows:

  • Changes in any LineEdit, TextEdit, OptionButton (dropdowns), radio buttons, checkboxes
  • Adding and deleting options in ChoiceNode
  • Connecting and disconnecting graph nodes (be wary of stuff like connection_from_empty which handles both creation and connection at once)
  • Adding and deleting graph nodes

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.