So, I've had a question that I've asked before yet never knew how to structure it. Now that I know more about the engine, I'd like to try asking the question in a much better way.
In a traditional programming environment (I've done this type of thing on a Discord bot using JavaScript) you can create one base class, and then create more derived classes. For example, you may have an Item base class with a use() function, and then derived from this class you may have HealthPotion and ManaPotion each with their own stats and use() functions. This is easy to create even in Godot, but in those other environments I can just instantiate any class that I want whenever I want.
In Godot, from what I've scene these class scripts need to be attached to a scene. I've thought of doing this two ways.
For one, I could have one sceen for each different item ... but if the game has 1000 items, isn't 1000 scenes too much?
I've also thought of having one scene, and like 1000 classes (one for each item). Then just instantiate the scene and attach a specific script to it when I need it... but I'm not sure how that would fair?
I've thought of using JSON but how do I make the JSON relevant when I still need a script for each item anyway. The json would have no information that each script would have anyway.
I'd like some thoughts please. Or if anything, would someone be able to explain how a system would be made anyway?
Thanks!