I’m a novice too, but a long-time programmer. What I’ve found is that for menu-driven scene, you want to put your menus into one scene. but separate them out because it can get messy. So for like my game start menu, I have a menu_root.tscn.
This simply has my main settings: new game, load save, etc buttons:
One of the buttons is the custom control settings button. I add another scene so that when they click configure controller, it makes that guy visible.
Eventually in my menuroot, it will have the load/save scenes.
It sounds like this is horrible and tedious to have separate scenes for everything, but it actually keeps things clean. You could stick them all into one root menu, but you’ll start coding and then say to yourself, aw crap, this is really annoying when trying to manage state for these windows.
Then attached to your main root menu, you could create a gd script which manages the button pushes:
@onready var start_button = $SettingsPanel/Panel/VBoxContainer/StartNewGame
@onready var load_button = $SettingsPanel/Panel/VBoxContainer/LoadGame
@onready var save_button = $SettingsPanel/Panel/VBoxContainer/SaveGame
@onready var controls_button = $SettingsPanel/Panel/VBoxContainer/Settings
@onready var about_button = $SettingsPanel/Panel/VBoxContainer/About
@onready var credits_button = $SettingsPanel/Panel/VBoxContainer/Credits
@onready var quit_button = $SettingsPanel/Panel/VBoxContainer/Quit
@onready var main_settings = $SettingsPanel
@onready var controller_settings = $ControlsSettingsPanel
signal start_new_game
func _ready():
start_button.pressed.connect(_on_start_pressed)
load_button.pressed.connect(_on_load_pressed)
save_button.pressed.connect(_on_save_pressed)
controls_button.pressed.connect(_on_settings_pressed)
about_button.pressed.connect(_on_about_pressed)
quit_button.pressed.connect(_on_quit_pressed)
controller_settings.visible = false
func _on_start_pressed():
print("🚀 Start New Game pressed")
self.visible = false
emit_signal("start_new_game")
func _on_load_pressed():
print("📂 Load Game pressed")
func _on_save_pressed():
print("💾 Save Game pressed")
func _on_settings_pressed():
print("⚙️ Settings pressed")
controller_settings.visible = true
main_settings.visible = false
func _on_about_pressed():
print("ℹ️ About pressed")
func _on_quit_pressed():
print("🛑 Quitting game")
get_tree().quit()
These are stubbed out for later, only the controller settings, start new game and quit works right now, but you get the picture.
As for how to structure your data, this really depends upon your data model, but I would create a class with the structure of what the people select and then use that within the scene that you use to configure the character and then save that structure to your game state. If you could share code I could get a little more specific.