A Godot plugin helping in building interactive fictions and dialog system

StoryTeller Engine

A Godot 3.x plugin helping in building interactive fictions and dialog system.

Creation of story

This engine can be created entirely in a GDScript or via the editor for the creation of narration (stories, interactive fictions, dialogs...)

  1. via GDScript

The useful classes are: st.StoryLock (a boolean data), st.StoryValues (a float data), st.StoryChunk (a chunk of story), st.StoryCommand (a command to execute), st.StoryTeller (which tells story and executes commands), StoryListener (which hold values, locks, command option's values, namespaces to activate or not...). So the basic process is this one:

  • Instanciate a st.StoryListener with two dictionaries names to values, one for locks and another for values

  • If you need commands, load them (listener.load_commands([namespace...])) using instances of st.StoryCommandNamespace. in each namespace, it is possible to add st.StoryCommand (namespace.add_command(command)).

  • Instanciate a st.StoryTeller with that listener and load st.StoryChunks (teller.load_story_chunks([chunk...])

  • Set the start point (teller.set_start_point(chunk_id)) of the story to a chunk id

There we already have the teller for the next step

  1. via the editor

The two necessary classes are: st.StoryInterpreter (which is used to interpret a story file and st.StoryTeller.

  • Open the editor, by clicking st.StoryTeller at the bar where 2d and 3d are.

  • Make a story in the Sandbox and save it as a file. It is obviously possible to modify the file later.

  • The steps it requires in GDScript to load the story:

    • get the default interpreter st.get_default_interpreter()
    • set a base path to get stories from (interpreter.set_base_path(path))
    • load a story file (interpreter.load_story(story_filename, [custom_listener])) [with extension or not]

Loading the story from a file returns the teller for the next step

Execution of story

With the teller (st.StoryTeller) got we have the possibilities to tell the story and to execute a command.

  1. Telling Story

Each story chunk can have a condition for it to get read/shown. So if a chunk has no condition or verified conditions, it is read by the teller. Delayed chunk are pushed into the stack of delayed chunks waiting for the moment to show. The method of the teller to show story chunks is tell( delta ): delta is used to calculated elapsed time for delayed chunks. The method returns a string if there is a story chunk to read or else it returns null.

  1. Executing Commands

Each command is in a particular namespace. if its namespace is activated, the command can be executed. The command can have a default chunk to read (always read or not) and option related to a chunk to read too. When a command is executed a list of chunks is registered for reading. The method of the teller to execute a command is execute( command ): command is a string like "walk left=5". The method returns a boolean telling if the command has been successfully executed.

To see how the engine works, check the folder scenes. It contains a scripted story and the test scene which loads some stories. The folder assets/stories contains the story created via the editor. It is possible to choose which story to load in the script TestScene.gd at line 36.

The project is still a WIP... I'm busy ending a game at studio I work with. But once free, I'll get back and add features like save, load, replay and many more. If you have issues or suggestions, it will be a pleasure to know know about it. Just write it in Issues! Thanks

Owner
HeavenMercy
A sololearner who really like video games and exploring computer programming. And a pure Godot lover!
HeavenMercy
Similar Resources

A Sonobuoy plugin to assess @crossplane conformance.

Crossplane Conformance Suite A Sonobuoy plugin to assess Crossplane conformance. To try it, first download the sonobuoy CLI, then: # The version of Cr

Jun 19, 2022

Kong Verifier plugin for HSDP API signed requests

Kong Verifier plugin for HSDP API signed requests

Jan 7, 2022

mackerel metric plugin for count lines in log

mackerel metric plugin for count lines in log

Nov 13, 2021

Simple plugin to enable the /flip command inside of Mattermost

Plugin Starter Template This plugin serves as a starting point for writing a Mattermost plugin. Feel free to base your own plugin off this repository.

Nov 4, 2021

Rollup plugin go wasm

Rollup plugin go wasm

May 11, 2022

A helm plugin that shows a diff explaining what a helm upgrade would change

A helm plugin that shows a diff explaining what a helm upgrade would change

Helm Diff Plugin This is a Helm plugin giving your a preview of what a helm upgrade would change.

Jan 4, 2023

Traefik plugin for MaxMind GeoIP2

Traefik plugin for MaxMind GeoIP2 Traefik plugin that registers a custom middleware for getting data from MaxMind GeoIP databases and pass it downstre

Dec 19, 2021

The Webhooks Listener-Plugin library consists of two component libraries written in GoLang

The Webhooks Listener-Plugin library consists of two component libraries written in GoLang: WebHook Listener Libraries and Plugin (Event Consumer) Libraries.

Feb 3, 2022

:chart_with_upwards_trend: Monitors Go MemStats + System stats such as Memory, Swap and CPU and sends via UDP anywhere you want for logging etc...

Package stats Package stats allows for gathering of statistics regarding your Go application and system it is running on and sent them via UDP to a se

Nov 10, 2022
An interactive menu for Magisk's module installer with tools to alter Android

JD's Toolbox I'll update this with some details later, just getting the source code out for now... LICENSE The source code for JD's Toolbox is release

Jan 24, 2022
Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app.
Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app.

Package buildinfo provides basic building blocks and instructions to easily add build and release information to your app. This is done by replacing variables in main during build with ldflags.

Nov 14, 2021
Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging

Tanzu Framework provides a set of building blocks to build atop of the Tanzu platform and leverages Carvel packaging and plugins to provide users with a much stronger, more integrated experience than the loose coupling and stand-alone commands of the previous generation of tools.

Dec 16, 2022
Boilerplate for building a monolighic Go and React application
Boilerplate for building a monolighic Go and React application

Monolithic Go and React Application Boilerplate This repository provides a simple and monolithic service with a server written in Go and frontend with

Dec 19, 2022
A tool that facilitates building OCI images
A tool that facilitates building OCI images

Buildah - a tool that facilitates building Open Container Initiative (OCI) container images The Buildah package provides a command line tool that can

Jan 3, 2023
An experiment building a custom binary protocol for a calculator

Overview Implementation of a calculator service built on a custom protocol on top of TCP Details The server is in main.go, and the client is in client

Nov 28, 2021
A boilerplate for building Gradescope autograders for Go projects.

go-autograder A boilerplate for building Gradescope autograders for Go projects. Getting started This autograder works by running all Go tests in a st

Nov 6, 2022
[Building]Use Go & Vue3 to build an easy blog

Go + Vue3 Study 环境安装 本地环境:Go 1.17 后端框架:Gin 注意Go在使用Go Module的话需要使用修改Go的代理 首先查看Go相关的环境变量 go env 修改Go代理 go env -w Go111MODULE=on go env -w GOPROXY=https:

Jan 25, 2022
This Go based project of Aadhyarupam Innovators demonstrate the code examples for building microservices, integration with cloud services (Google Cloud Firestore), application configuration management (Viper) etc.

This Go based project of Aadhyarupam Innovators demonstrate the code examples for building microservices, integration with cloud services (Google Cloud Firestore), application configuration management (Viper) etc.

Dec 22, 2022
A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture
A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

A boilerplate/starter project for quickly building APIs using Golang with Clean Architechture

Mar 2, 2022