Giter VIP home page Giter VIP logo

godot-eventsystem's Introduction

Project moved!

🪧 Godot-EventSystem [2.0] 🎉

An easy but powerful event system implementation for Godot Engine

🪧 About the plugin

EventSystem is a Godot Plugin that will help you manage events sequentially, easy to implement and highly customizable, allowing you to execute code fragments in order according to the conditions you give it.

This plugin doesn't do much on its own, it promises to help you with the task of controlling events, but these events must be done by you. Some events of tasks commonly done in code are included in this plugin.

Whether you want to create a dialog sequence, verify that certain events have been fulfilled or an incredibly complex case maker, the possibilities are almost endless.

Features

🧵 Timeline editor

A visual tool for viewing and editing sequences of events, as well as the individual properties of each event.

Timeline

See, edit and control events in a timeline. The events will be executed in order, one by one.

🚩 Event class

Event Class

Create and modify your own events, making them do exactly what you want them to do anywhere in the game.

🎬 Event Manager

Event Manager

A node prepared exclusively to run your timeline. You don't need to worry about managing the timeline, only about when to advance in it.

Installation

Download the lastest release and extract the ZIP file. Move the addons folders to the root of your project.

Open your project in Godot and enable the plugin.

It's that easy!

If you want more information about installing plugins in Godot, please refer to official documentation page.

Updating

Follow installation steps, but remove your old event_system_plugin folder before adding the new version.

Updating from 1.x ⚠️

Using a Version Control System (like git) is strongly recommended.

2.0 is not backwards compatible, this means that your work from 1.x may be broken in 2.0. If that's your case, ask for help in Discord server.

Documentation

All the information about the plugin you will find at the dedicated documentation page.

Contributing

See Contributing file.

Let me know if you made something with this plugin. I'm always happy to see what people does with things that I do.

If you need help, you can join in to the discord server: https://discord.gg/83YgrKgSZX

License

See LICENSE.

godot-eventsystem's People

Contributors

anidemdex avatar crystalwarrior avatar joaopedrosgs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

godot-eventsystem's Issues

json import/export

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Add functionality to allow json import/export of the timelines for sharing over the web, importing into other programs, etc.

Add `return` event

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

This event is a similar implementation of return keyword. Whetever is called, ends the timeline execution.

Adittional information

No response

`Condition` event reverses all events of the timeline it jumps to

OS

Windows 10 x64

Godot Version

Godot_v3.4.2-stable_win64

Plugin Version

Lastest commit from repository

Issue description

When using Condition event, once it jumps to the true/false timeline, it completely reverses the event order and executes bottom-to-top instead of top-to-bottom as would be expected.

Steps to reproduce

  1. Make a condition event
  2. When it's true, the timeline it jumps to should have multiple events in it
  3. When the True timeline is being processed, every event will be in reverse.

Workaround

Build the whole target timeline in reverse order to what's normally expected. This also means that particular timeline cannot be accessed using normal "change timeline" :/

Add the ability to duplicate events

Describe the project you are working on

EventSystem

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Duplicate events, this can save many time while making events.

Adittional information

No response

Consolidate "Call" and "Call From" into a single "Call" event

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Make "NodePath" an optional argument for "Call" event. If nothing is selected it'll replicate the "Call" event behavior, otherwise use "Call From" behavior.

Adittional information

No response

Add optional "node path" argument for Hide/Show events

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Similar to "call from", this would allow you to hide dialog manager and name label without hiding the character portrait for some situations. Right now, if you wanted to achieve this, you'd have to use "call from" event, "set visible", "false".

image

Adittional information

No response

"Go To" events show bizzare labels

OS

No response

Godot Version

3.4.stable

Plugin Version

1.4.1 (latest)

Issue description

Event shows an offset in to the timeline. This offset also does not update when the relevant target is moved nor are the numbers shown on the interface anywhere. It is possible to name an event such as a comment to work as a kind of movable label however the GUI shows the original offset instead of the block's name.

Steps to reproduce

  1. Create a comment
  2. Rename the comment
  3. Create a go to block
  4. Set the target to the comment
  5. Title will read "[0;]" instead of the comment block's name
    2022-04-30_00-36

Workaround

No response

Drag&Drop does not accept dropping on top of an event header

OS

Windows 10 x64

Godot Version

3.4.stable

Plugin Version

Lastest commit from repository

Issue description

Drag and Drop functionality is currently counter-intuitive and makes it too easy to lose the event you're dragging with no undo when trying to drop it into a spot:
Godot_v3 4 2-stable_win64_XrrqtUrD6Y

Steps to reproduce

  1. drag
  2. try dropping anywhere that's not the right side of the event
  3. lose the event
  4. cry

Workaround

Drop into the right side of the event despite starting the drag on the left side

Change timeline event bad ignore property

OS

No response

Godot Version

No response

Plugin Version

1.0 (lastest)

Issue description

Ignore property continue_at_end is skip in the resource script

Steps to reproduce

none

Workaround

No response

"New" timeline buttons show all classes

OS

No response

Godot Version

3.4.stable

Plugin Version

1.4.1 (latest)

Issue description

Creating a new timeline doesn't seem to filter for the Timeline class; nor is there a way to save a timeline to an external file like there are in other parts of the Godot UI where this same UX is used.

Steps to reproduce

  1. Create an EventManager
  2. Click on "Timeline"
  3. Be flooded with "New $kitchen-sink" menu entries
    2022-04-30_00-33

Workaround

No response

Invalid operands 'String' and 'Nil' in operator 'in'.

OS

No response

Godot Version

No response

Plugin Version

1.2.1 (lastest)

Issue description

Invalid operands 'String' and 'Nil' in operator 'in'. appears when you creates an event that exports an array.

Steps to reproduce

Create an event and export an array. Add an item to that array.

Workaround

No response

Hide script on the inspector

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Just hide the script on the inspector for timelines and events to avoid problems of accidentally removing them
image

Adittional information

No response

The Timeline resource is not saved when playing project

OS

Occurred on Windows 10 x64 and Windows 11

Godot Version

3.4.stable

Plugin Version

1.2.1 (lastest)

Issue description

If you press the "play project" or "play scene" buttons when editing the timeline without pressing Ctrl+S beforehand, that timeline resource will break for the rest of the editor session without telling you. It will appear as if the timeline is saved properly, but in-game tests indicate that is not the case. When reloading the project, it will be revealed that none of your changes actually saved.

It's a horrendously frustrating bug that should be fixed ASAP, it could be godot-related but regardless it must have something to do with the debug instance locking up the resources and perhaps the timeline resource does not save fast enough or something. Whatever it is it's utterly wack.

Steps to reproduce

  1. Create a timeline
  2. Edit the timeline without saving via Ctrl+S
  3. Launch your game.
  4. Realize your in-game timeline does not match your most recent edits.
  5. Restart the editor
  6. Open the timeline
  7. Realize your timeline did not save, despite lying to you saying it did.

Workaround

Make a habit to Ctrl+S every time you edit the timeline for anything. Otherwise get used to reloading your project after every change :/

Add a "recent timelines" list button next to "load timeline"

Describe the project you are working on

I am using the Dialog System's choice event, and each choice is a unique timeline. I press on the timeline to edit it, now that I'm done I want to go back. But I don't know how! So I'm stuck there, reopening the timeline again, confused.

I am now aware the resource inspector has forward and backward arrows, which is helpful - but this is for resources in general and the resource history can be potentially clogged up pretty bad.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

image
Click on it, and you get a list of up to 10 timelines you opened recently.

Adittional information

No response

Add plugin to asset lib

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

I was wondering if there was a particular reason this plugin is not in the godot asset library. It looks really promising and it could get more reach that way, while also being easier to add to projects from Godot directly

Adittional information

No response

Event editor desyncs when using check boxes for if/else blocks

OS

No response

Godot Version

3.4.stable

Plugin Version

1.4.1 (latest)

Issue description

Creating a timeline for an if/else block then disabling it with the tick and creating a new timeline will result in the GUI becoming cursed and out of sync.

Steps to reproduce

  1. Create an if/else node
  2. Create a new timeline for true
  3. Place nodes in the branch
  4. Uncheck events if
  5. Create a new timeline for true
  6. Despair

2022-04-30_00-28
2022-04-30_00-28_1

Workaround

No response

Sometimes EventManager properties disappear

OS

Windows 11 x64

Godot Version

v3.4.stable.official [206ba70f4]

Plugin Version

1.0 (lastest)

Issue description

Sometimes properties on EventMananger node vanishes for no reason.

zkiMqbeb2q.mp4

I found myself wasting time trying to replicate it but wasn't able to do it.
See: godotengine/godot#43491 (comment) and godotengine/godot#23316

Steps to reproduce

I wasn't enable to reproduce it. It happens sometimes but I can't find how or when this issue is triggered.

Workaround

For now, just reloading the editor seems to fix this.

Preview timeline button

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

There should be a way to preview the timeline in game. Just a little button to play the current timeline and see if it works as expected

Adittional information

No response

Add contextual menu for events

Describe the project you are working on

EventSystem

Describe the feature / enhancement and how it helps to overcome the problem or limitation

A context menu for each event, adding some options that are done already with shortcuts (like deleting the event with DEL key).

Context menu: aka, that menu that appears when you right-click something

Adittional information

No response

`EventChangeTimeline` add a way to come back to the original timeline

Describe the project you are working on

No response

Describe the feature / enhancement and how it helps to overcome the problem or limitation

EventChangeTimeline may be able to return to the caller timeline when the timeline ended. This way those two options are possible

|- Event A
|- Change Timeline (not return to original caller)
- Event B <- Not called
|- Event A
|- Change Timeline (return to original caller)
|- Event B <- Called when the previous timeline ends

Adittional information

No response

Debug event visualizer

A node to visualize what EventManager see. Useful to debug the timeline in runtime. #53 can enable this behaviour automatically

Event Presets System

Describe the feature / enhancement and how it helps to overcome the problem or limitation

For example, there could be an "Event Preset" drop down that's part of all events, and there's an option to "Save Preset"
Optionally, when creating a new event if it detects any presets existing it could prompt what preset you want to create an event with
Event Presets are remembered by the plugin per-event
What a preset is is basically configuration you want to repeatedly add
So if you want an event preset that introduces an IF-ELSE check you wanna do a lot you can just open that preset instead of painstakingly changing all the variables yourself every time

Presets only decide the default variables when you click the circle thing that appears on variables that you have edited
So you click the circle to reset to either default state or the preset state

Text-based markup language version of the timeline structure

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Instead of using an UI a user could optionally open the timeline file to read and modify it with basic text editing. Syntax should be extremely simple so non-programmers can understand stuff.
Example:

# looping blip strategy, using one sound file, with blip rate of 2. Everything not specified is default values.
use blip loop with sounds "narrator.wav" with rate 2
# Showname of "" saying everything after : inside the ""
"": "One day..."
# looping blip strategy using blips same as character with blip rate of 2.
use blip loop with rate 2
# Have the character Jack join with specified expression on default coordinates
"Jack" joins with "Happy" expression
# Jack shows up as ??? via showname, but the dialog knows which character to use due to "as". (next) means to proceed next immediately. Opposite to (next) is (stop) but it's optional for text event.
"Jack" as "???": "Hello! My name is " (next)
# cont. continues previous text, "Jack" due to being a character with a defined showname assumes it's a character.
cont. "Jack": "Jack, and I love Godot!" (next)
# wait event can be miliseconds, deciseconds, seconds, minutes, hours.
wait 1.0 seconds
# Use two randomized blip sounds
use blip loop with sounds "unknown1.wav", "unknown2.wav" with rate 1
# Blank character as "Jack" clears its reference and gives a showname to a default non-character state. Not entirely necessary, but should be possible.
"" as "Jack": "Actually, am I Jack..?"
# Same as "jump to event", go to the start of the timeline. You can also use goto "thing" where "thing" is a tag defined as tag "thing".
goto start

Add `resource_name` next to timeline resource path on the editor

Describe the project you are working on

Textalog

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Textalog has a "choice" event, wich edits many timelines. There's no way to know what timeline is being edited, and the resource path gives no clue about that (since uses ::X for built in resources).

The idea is to give those timelines a resource name, and that resource name can be displayed next to the resource path.

Adittional information

No response

`Condition` event should not come back to the timeline it got called from

Describe the project you are working on

Point-and-click investigation segment in a game where you have to find all objects to be able to leave the room.

Describe the feature / enhancement and how it helps to overcome the problem or limitation

We cannot look at the timeline system as an extension of a scripting language - instead, the most comparable reference we have is the Assembly language. In ASM, there's a 'Conditional Jump' and 'Unconditional Jump'. Unconditional Jump equivalent in the event system is the "Change Timeline" and "Jump To", while Conditional event behaves like a standard GDScript IF-ELSE.

There is a big problem with this behavior, however. Without a background in programming, this behavior is not obvious. It is more intuitive to understand that when a condition is successful, it will JUMP to that targeted timeline, and since you do not explicitly say to "come back to previous timeline", then it shouldn't come back.

Otherwise, having large if-else chains with the timelines jumping back and forth is really easy to get lost in and is completely unintuitive, especially since in the current interface, unlike scripting, you do not see all the code at once, and instead have to jump back and forth.

Adittional information

Simply put, "condition true: go to target timeline, condition false: ignore this event".
False timeline could still be optional to include, meaning the only real change this is suggesting is to simply "change timeline" to the condition.

External/standalone version of the editor

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Being able to use the timeline editor outside of Godot would be nice. Godot doesn't like plugins very much and we keep running into annoying issues associated with that so having an option to use the plugin as standalone would help in those scenarios where Godot does not cooperate.

A way to save the state of the timeline

Describe the project you are working on

Event System

Describe the feature / enhancement and how it helps to overcome the problem or limitation

Sometimes you want to save the state of the event manager between game sessions. Sure, saving it manually can works, but why forcing the user to deal with complex things when we can make a helper class for that?.

The idea is to create a class that stores the state of the EventManager, and a function in event manager that takes that resource to continue doing its stuff.

extends Resource
class_name EventManagerState
var last_timeline:Timeline
var last_event:Event
# in EventManager
func resume(data:EventManagerState):
    # continue doing stuff

This only makes sure to continue with its own stuff, it doesn't care about other data (like, the state of the scene tree)

Adittional information

No response

Simple and Advanced search bar to comb through timelines, characters, etc.

We need a search bar that allows users to search for specific lines of text, event names, character names, etc. - basically anything.
Can use Discord as reference which lets you filter what you're searching - such as "in:textevent I ma poo" to search ONLY in text events for the sentence "I ma poo".

Dunno about the search markup yet for advanced tags, but for simple search it should be able to look through legit anything - in my head it's a simple search with a filter for the resource files associated with the plugin.

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.