I'm currently learning and building a turn-based RPG like FINAL FANTASY but it still follows similar ideas.
There's a lot you have to learn, I'm not familiar with how much programming / coding knowledge you have, so I'll try to explain the logic simply.
For the turn-based system, you'd probably do something as follows.
This would be all the possible states in the battle. You could have more, or less, if you wanted.
enum STATES = {
PLAYER, # Player's turn
ENEMY, # Enemy's turn
WIN, # If player wins
LOSE, # If enemy wins
RUN # If they RUN from the battle
}
var current_state = null
This allows you to change or reference state like this
current_state = STATES.PLAYER
Then you may want a function that handles state change and changes the game
func _handle_state(new_state):
current_state = new_state
match current_state:
STATES.PLAYER:
pass # What will happen on player's state?
STATES.ENEMY:
pass # What will happen on enemy's state?
STATES.WIN
pass # What will happen on player win?
STATES.LOSE
pass # What will happen on player lose?
STATES.RUN
pass # What will happen on player run?
Then you can change the state whenever you want like this
_handle_state(STATES.PLAYER)
and the function will handle the change in the game
For a logical point of view, you can think of the game as always the player's turn unless otherwise stated. So you'd have to create a GUI, learn about signals and building GUIs using the godot docs:
Signals - https://docs.godotengine.org/en/stable/getting_started/step_by_step/signals.html
GUI - https://docs.godotengine.org/en/stable/tutorials/gui/index.html
What I do in my game is hide the GUI when it's not the player's turn, and show the GUI when it is. The GUI will have buttons that call functions. So you'd probably have buttons like "Move, Item, Run" or something.
As for characters, and a pokedex, you'd probably benefit from storing all possible catchable characters as JSON like this
[
{
"id": 1,
"name": "Fire Monster",
"attack": 32,
"defense": 18
},
...
]
You can easily load all your JSON files by making an autoload singleton and structuring it like this
var monster_data
func _ready():
var monsterdata_file = File.new()
monsterdata_file.open("res://your/path/to/json", File.READ)
var monsterdata_json = JSON.parse(monsterdata_file.get_as_text())
monsterdata_file.close()
monster_data = monsterdata_json.result
YourSingleton.monster_data becomes a json array with all the information of your monsters
Since this is structured by monster ID, you can have an array of all IDs of monster that a player has. Then when showing a pokedex you can generate all the monsters and only light up or only show as visible the monsters that are in the player's "owned" array.
I hope this helped you at least get started. I suggest messing around and building the turn-based battle system first, before worrying about other aspects of your game. Build the game "system by system" and eventually it'll come together
Good luck!