Skip to content

derdrache/Turn-Based-System-Plugin

Repository files navigation

Turn-Based-System-Plugin

A flexible Turn Based System for Godot version 4.x

🌟 Highlights

  • 2D and 3D Support
  • Full system:
    • Turn Combat Control
    • Targeting System
    • Command menu
    • Player Status Container
    • Turn Order Bar
  • Different turn based combat systems:
    • classic
    • value based
    • dynamic

🚀 Quick start

  1. Add TurnBasedController Node to your main scene to activate the Turn Based System
  2. Add TurnBasedAgent Node to your Characters (Player & Enemy)
  3. Add classic_command_menu Scene as a child of a canvas layer in your main scene
  4. optional Add classic_turn_order_bar Scene as a child of a canvas layer in your main scene
  5. optional Add classic_status_container Scene as a child of a canvas layer in your main scene

📖 More Information

TurnBasedAgent

The Agent needs the character resource where the Commands (attack/skill/item resources) are saved. The TurnOrderValue will be checked in the character Resource too.



Command / Skill Resource:

For the targeting system and the command menu to work, the skill resource must have certain variables.
There are 2 options for this:

  1. you extend your skill with the CommandResource:

2. you put the variables in your skill resource:



Classic Command Menu Scene

This is a scene and have to add with "instantiate child scene" (not with "add child node") It is a copy of the command menu from FF X.

CommandButtonNames: Set the name of the Commands CommandButtonReference: Set the variable reference from the characterResource in the TurnBasedAgent. The variable shoud be a Resource or a Array of Resource CommandButtonIcons: Set icons in front of your command name. OwnCommandButton: if you need special actions, copy classic_command_button.tscn and change the script with our own.



Turn Order Bar Scene optional

This is a scene and have to add with "instantiate child scene" (not with "add child node").
It is a copy of the command menu from FF X.



Classic Player Stats Container optional

This is a scene and have to add with "instantiate child scene" (not with "add child node")
It is a copy of the command menu from FF X.

It is connected with the characterResource of the turnBasedAgent and you can setup the reference in the inspector.



Character Setup:

All skills / commands has to be connect to the "player_action_started" or "enemy_turn_started" signal. Put "turn_based_agent.command_done()" at the end to finish the turn and to start the next character turn.
Example:

⬇️ Installation

If you don't have a "addons" folder in your project tree:

copy the "addons" folder in your project tree

elif you have a "addons" folder already:

copy the "Turn_Based_System" folder in your "addons" folder

At the end it should look like this:

💭 Feedback and Contributing

You are always welcome to open issues for improvements or bugs: https://github.com/derdrache/Turn-Based-System-Plugin/issues

Let's discuss wishes and improvements: https://github.com/derdrache/Turn-Based-System-Plugin/discussions

or with a pull request to extend the code (there are no guidelines)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published