I’m trying to define an ability system, and wanted to model properties similar to how Unreal GAS does. In that system I see them defined as a hierarchy and using dot notation.
Example:
Attribute.Strength.Max
I want to be able to add these properties to an array variable in a resource type within the inspector. I’m having trouble finding a way to structure the properties as a hierarchy. I’ve tried a few things but they didn’t allow the definitions to be added to the resource’s array.
Have you looked into using inner classes. I use it for making data structures as well methods to manipulate.
Example:
class Strength:
var max: int=0
var name: String=""
func incr():
max += 1
class Attributes:
var strength:=Strength.new()
var amount: float=10.0
pass
func _ready():
var attr=Attributes.new()
attr.strength.max=10
attr.strength.incr()
attr.strength.name="ABC"
attr.amount=100.0
pass
That is a great question. I like C# anyway, but didn’t know how much of the OO aspects I can use and still integrate with Godot. I haven’t found any tutorials yet, mostly just how to setup the C# environment.
I’m also looking into this, and have been spoiled by Unreal’s hierarchial gameplay tags, but not only due to their convenient query and lookup functions, but rather mostly because there’s a clean and simple interface for adding new tags. You basically do it in a table interface the same way you add input actions in Godot, and then every time you want to use them you get nice auto complete.
But to get that convenience, now we’re entering the realm of plugins, right? Or can this be created with the @tool functionality I’ve heard about?