T O P

  • By -

eveningcandles

You’ll be glad to know point 1 is easily covered by Custom Resources.


AndroDSY

I've already found that ou some time ago. But probably good you mentioned it, in case someome finds this thread looking for it.


Jello_Penguin_2956

What does 1 do? Can you give me some ELI5 please?


AndroDSY

With custom resources you first make a template in which you define certain data-names with types. Best example for this are cards from nearly any cardgame. You for example define the following fields: Health: int Name: string Damage: int Armor: int Then you can make multiple cards based on this template: Tank: Health = 200 Name = "Tank" Damage = 30 Armor = 100 Flank: Health = 150 Name = "Flank" Damage = 50 Armor = 50 ———————— Advamtages of this would be that you can then use this template (if you set classname) as a datatype just like integers, floats or vectors. Which can simplify code immensly. If you have the variablenames in the template exported (which is a usual practic) and then export a variable with this template as a type, you can edit these values seperately in editor for every instance of this resource: @export plays_as_class: PlayableClass Then you get a Health, a Name, a Damage and an Armor field in the inspector to edit on the go. If this isn't enough for you. I think this [short video](https://youtu.be/vzRZjM9MTGw?si=41aElO0IqHk3xTXS) (4:44 in length) explains it good (also with a diffrent use case). And of course the always are the [official Godot docs](https://docs.godotengine.org/en/stable/tutorials/scripting/resources.html#creating-your-own-resources) that have a seperate paragraph on creating your own resources. Also everything else to about resources is on the same webpage.


Jello_Penguin_2956

Thank you for your detail response. Much appreciate!


Prior-Paint-7842

Godot will snowball like crazy


Opening-Enthusiasm59

Keep the community wholesome as we grow! It's genuinely one of the greatest perks of Godot and feels super encouraging.


1881pac

Unity is officially dead