I think the benefit to resource is that it can also contain methods, not just data
@CodingQuests Жыл бұрын
that is also true
@thesomeone2nd Жыл бұрын
Wdym with methods?
@qooldeluxx Жыл бұрын
@@thesomeone2ndit can contain functions in it as well. Like get sets. Atleast i think im still figuring out how it all works.
@CodingQuests Жыл бұрын
@@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
@thesomeone2nd Жыл бұрын
@@qooldeluxx oh ok thx I am still learning the engine
@gonderage6 ай бұрын
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.
@CodingQuests Жыл бұрын
Read the Description for short answer, Also check out my upcoming course Godot Genesis on my site: www.codingquests.com/courses
@MoogieSRO4 ай бұрын
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.
@andrewgrinn3435 Жыл бұрын
Thank you.
@7shiroi7 ай бұрын
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?
@CodingQuests7 ай бұрын
I believe so yes. I think ive seen a few threads on this topic.
@6355748 ай бұрын
Nice, I was looking for alternative to just dictionaries becuuse I canot declare types within and they also dont pass existing variable as reference.
@jaysistar27115 ай бұрын
3:40 I think that you mean "It's inspectable by the editor, so instance contents are editable in the inspector."
@owenlloyd2528 Жыл бұрын
Thank you
@Asilhan6 ай бұрын
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?
@CodingQuests6 ай бұрын
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?
@Asilhan6 ай бұрын
@@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.
@ennazen27935 ай бұрын
Try plugin "edit resources as table"
@Asilhan5 ай бұрын
@@ennazen2793 Thanks man, this is what I wanted.
@tsiapal Жыл бұрын
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!
@CodingQuests Жыл бұрын
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
@Wisdawms Жыл бұрын
You can't have a resource unless you have a script that extends Resource.
@maixior1234 ай бұрын
Script is like a blueprint for resource
@MoraesMusician6 ай бұрын
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...
@DinoTeaser Жыл бұрын
jjviu
@charliecharliewhiskey94032 ай бұрын
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.