Implementing an "available magic rituals" feature in my 2D UI-based game

Godot Version



A beginner here. Im making a 2D UI-based pixel art fantasy-adventure game that is turn based. Bascially, you click a button on the screen and there’s a random event that happens; it can be an empty turn (nothing happens), monster spawns or a material is found (in which case it’s added to inventory). So, it doesn’t actually have a player as a controllable animatedsprite2D, but the player is sort of just the healthbar, the inventory and the rituals he can perform. I’m only strating on implementing the inventory by watching some tutorials but i want to ask ahead for a feature that i want to implement next: available magic rituals.
So, i have a menu which is a different scene called when the menu button is pressed. A child of this menu is a frame (rectangle), texturerect node, inside which i want to display available magic rituals that the player can perform. These rituals need certain materials to be in the inventory (some only in the inventory, some explicitly to be in the inventory hotbar). But, i want the game to automatically show / list icons (which i’ve already made myself) of these rituals in this rectangle i just mentioned. However, theres 20 rituals in the game and i want the box to update how many of them are inside, so that it instances a slider on the side when there’s a lot of icons. Also, of course, it would update when a ritual becomes non-performable. Then, the player can drag these icons of the rituals to a hotbar next to this rectangle, and this hotbar is also on the main UI. So, based on which hotbar the ritual is (there’s 6 hotbar slots), if a key of 1-6 is pressed, that ritual is performed (it can inflict damage to the enemy or some other action).

If you have any questions about the code, i can provide you. I don’t want to put it here in the thread since i dont really know where to start.