@@qooldeluxx yes you are correct, it can hold any function. the main point to understand that a resource is just a template basically which holds a script inside it. so it can have functions, variables, w.e u want
Maybe you've improved your videos since this one, but you should really script what you're wanting to say before hitting record. Listening to someone stumble over their words and repeatedly backtrack because they can't think of the best way to describe something is super frustrating to listen to and drags on the video length.
commenting b4 watching but when i want more certainty about the data i work with, and I use a specific format consistently a lot, and if I want intellisense, i use a resource. if it's a one-off container of data, then a dict is enough, and I don't have to write a whole class for it.
Let's say we created a item resource then, using it we create 50 different items which have different values. How can I see their values in a excel-like environment? I mean listing them in a box. Do we need to export resources into a different program?
@@CodingQuests Hmmph. In a typical RPG game we have hundreds of items, enemies and quests. Represting them with resources must be hard if listing them isn't possible.
How about data-driven development? For example, if we have a JSON for items. I normally use a dictionary but the typing can be hard to manage. Is there a way for us to use resources?
One thing that confused me. You created the item script before you created the item resource. Are these two related because of the same name or because of the extends Resource? And if it's the second doesnt that mean that all my resources will have the same variables even if I dont want to? And btw.... Happy New Years Eve!
you need a script attached to a resource, u can have 10 resources based on the same script. thats the general advantage of them, is that thy can use the same template baically
I think the benefit to resource is that it can also contain methods, not just data
that is also true
Wdym with methods?
@@thesomeone2ndit can contain functions in it as well. Like get sets. Atleast i think im still figuring out how it all works.
@@qooldeluxx yes you are correct, it can hold any function. the main point to understand that a resource is just a template basically which holds a script inside it. so it can have functions, variables, w.e u want
@@qooldeluxx oh ok thx I am still learning the engine
Maybe you've improved your videos since this one, but you should really script what you're wanting to say before hitting record. Listening to someone stumble over their words and repeatedly backtrack because they can't think of the best way to describe something is super frustrating to listen to and drags on the video length.
commenting b4 watching but
when i want more certainty about the data i work with, and I use a specific format consistently a lot, and if I want intellisense, i use a resource. if it's a one-off container of data, then a dict is enough, and I don't have to write a whole class for it.
3:40 I think that you mean "It's inspectable by the editor, so instance contents are editable in the inspector."
Very useful, thank you
Let's say we created a item resource then, using it we create 50 different items which have different values. How can I see their values in a excel-like environment? I mean listing them in a box. Do we need to export resources into a different program?
im not sure if theres a way to do that. maybe you could convert the .tres values into a json folder then go that way?
@@CodingQuests Hmmph. In a typical RPG game we have hundreds of items, enemies and quests. Represting them with resources must be hard if listing them isn't possible.
Try plugin "edit resources as table"
@@ennazen2793 Thanks man, this is what I wanted.
Thank you.
How about data-driven development? For example, if we have a JSON for items. I normally use a dictionary but the typing can be hard to manage. Is there a way for us to use resources?
I believe so yes. I think ive seen a few threads on this topic.
Thank you
One thing that confused me. You created the item script before you created the item resource. Are these two related because of the same name or because of the extends Resource? And if it's the second doesnt that mean that all my resources will have the same variables even if I dont want to?
And btw.... Happy New Years Eve!
you need a script attached to a resource, u can have 10 resources based on the same script. thats the general advantage of them, is that thy can use the same template baically
You can't have a resource unless you have a script that extends Resource.
Script is like a blueprint for resource
Nice, I was looking for alternative to just dictionaries becuuse I canot declare types within and they also dont pass existing variable as reference.
you gotta structure/plan these a little bit better, man.
the amount of times you went "no, let's do it a different way" made it so confusing...
Read the Description for short answer, Also check out my upcoming course Godot Genesis on my site: www.codingquests.com/courses
Slow down your typing a little bit. There's no point typing fast if you're going to spend all that gained time fixing mistaken keystrokes.
jjviu
9:33