A flexible Turn Based System for Godot version 4.x
- 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
- Add
TurnBasedController Node to your main scene to activate the Turn Based System - Add
TurnBasedAgent Node to your Characters (Player & Enemy) - Add classic_command_menu Scene as a child of a canvas layer in your main scene
- optional Add classic_turn_order_bar Scene as a child of a canvas layer in your main scene
- optional Add classic_status_container Scene as a child of a canvas layer in your main scene
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.

For the targeting system and the command menu to work, the skill resource must have certain variables.
There are 2 options for this:
- you extend your skill with the CommandResource:
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.
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.
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.
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:

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:
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)




