it is fantastic since I believe a lot of people are migrating to Godot, but at the same time makes the videos hard to follow at least for me with 2 different scripting languages needing to be addressed at the same time, makes it really hard to absorb the broad range of information. If this is really targeted towards developers at this point rather than people getting INTO game dev, it should probably just give us the run down of how to create said system without getting into the nitty gritty per line
Lol, they sprout like weeds around here. But I was asked several times a while back to do it so here I go making inventories again xD That being said, for the most part, if your willing to dip your toes in c#, the implementations in unity are pretty similar, UI aside.
i know how make inventory system, one on Unity guys explain me on example supermarkets boxes-cases with items. Now i can do this. But me need understand ui Godot. I think Ui Unity and Godot4 little differ. I don't know becouse i not long worked hard with this side stuff, becouse of this not intereseted me before ;)
You should be able to just make a new packed scene, then add that scene to a new ItemData resource and add that to the list of item types just like I did with the one in the video.
Lol I totally agree, but I'm also understanding of the dilemma, do you on one hand make an inventory system that is more complex and allows for more interesting gameplay and risk the majority of people not actually use the thing, or do you go the list route and make it simpler, allowing the majority of projects to at least make use of the underlaying code, but it's pretty boring for the more experienced devs. I think what I'll do is, since the underlaying system is very similar, go ahead and make the list kind as the basic inventory system, and then make a couple of episodes following that with implementing a grid based system, it's actually not too complicated, so maybe I could get it in just one episode...
It is also a bit frustrating that they all use godot's built-in hold click and drag functionality, rather than just a click and release to grab the data. Most games use the latter.
I would like to suggest some changes to the github repo. I would love to see a branch for each episode. The reason being that I just picked up the tutorial, but it's really hard to get the project as it is at the start of the first episode. In reality, it's not much of a problem. i mean, Godot offers a pretty decent player controller to start with, and when you're used to it, it's not that hard to implement movement. The scene can also be whatever you want, it doesn't need to follow exactly what you do. But i can see begginners who would want it that way.
7:48, for better performances, I recommand using "DistanceSquaredTo" instead of "DistanceTo" as we don't use the distance itself. All we care about is finding the nearset item.
So this ones a little bit complex, I actually did a similar method with my fps horror series, but it ended up being rather bloated, I have not thought to do them as different branches though, I will have to try this out and see if it works, that might very well be a better method to keep it clean, but have access to every tutorial version. Sorry about the clunkiness xP
I keep having this problem print("Item id:" + str(i) + " Item Name:" + ItemTypes[i].ItemName) I keep getting these error messages Expected closing ")" after grouping expression. Expected ":" after "if" condition.
Invalid set Index 'visible' (on base: 'Nil') with value of type bool. At InteractableItem, ItemHighlightMesh. I followed your tutorial step by step i rewatched many times I searched and I can't fix it
In the TestCube Packed scene (Or whatever your item packed scene is) make sure that ItemHighlightMesh is assigned to a mesh, the way this error occurs means that field is null. This is done in the inspector, you can just click the field where it says "Assign" and select the outline mesh, I don't know any way that this could be breaking besides this. If your still not able to get this working, hit me up on discord, I can go over it with you in voice and see if I can figure it out.
Does this not work for godot 4.2? @export var ItemTypes : Array[ItemData] = [] var NearbyBodies : Array[InteractableItem] With this I keep getting. Line 5:Could not find type "ItemData" in the current scope. Line 7:Could not find type "InteractableItem" in the current scope
Hmmm should be working just fine in 4.2 Make sure you you have "class_name ItemData" and "class_name InteractableItem" at the top of both their classes just below the extends line, you may also have to restart Godot to see the update. This can also occur if there is an error in ItemData or InteractableItem scripts. If it's not any of those things I honestly am not sure what it could be, let me know if any of those help, if not I might have to see your code to know what's up.
This is a great tutorial. But for some reason, I keep getting an "Item not found" error. I used your code directly from Git. Tried like crazy to fix/debug but can't figure it out. And I'm using Godot 4.1.3
Hmmm, try this, delete the resource for the item template, make a new one following how I did it, where I assigned the packed scene for the item and gave it a name, then delete the items in the scene and drag in an all new one, if that doesn't work I might have to check this out, only thing I can think of is that the difference in Godot version between 4.2 and 4.1 is an issue, but I don't see how it would be.
@@Bonkahe bare with me I'm still green/new to Godot, but did you meant (A) delete the 'extends Resource' in the script? or (B) delete the ItemData.gd script entirely? I tried both, (A) breaks the PlayerInteractionHandler.gd and (B) tried to add -> @export var ItemModelPrefab : PackedScene = preload( my model scene here) to a new ItemData.gd script; neither worked. -sidenote: in your part 2 video when you connected the 'PickUpItem' signal from the PlayerHandler --> Inventory, in your video it shows up at PickUpItem(item : ItemData) but in my project it shows up at PickUpItem(item: Resource) ??
Ok, so I actually didn't mean any one of those things, I meant in the inspector on the interaction area just clearing out all the Item types and remaking them, sorry I was unclear xP As for everything else, honestly there's no way to know at this point what's been changed and what hasn't, why don't you message me on discord and we'll meet up in the godot cafe this evening and I can help you out. You can find me on there under the name Bonkahe. Also as far as the side note, the reason why it says item:resource is because of the previous issue with itemdata not having a class name, nothing that can't be sorted once the first problem is fixed though.
I know you're busy and already have videos planned and stuff, but I'd LOVE to see how to create something similar to a randomized planet. A reference to look at would be similar to the planets in No Man's Sky.
This is something I've wanted to do for a long time, but to be honest, I have so much other stuff going on it's going to be pretty hard to get to it any time soon xP But I will put it on my backlog and we'll see~
the fact that you provide both GDscript and C# version, thanks for the effort !
it is fantastic since I believe a lot of people are migrating to Godot, but at the same time makes the videos hard to follow at least for me with 2 different scripting languages needing to be addressed at the same time, makes it really hard to absorb the broad range of information. If this is really targeted towards developers at this point rather than people getting INTO game dev, it should probably just give us the run down of how to create said system without getting into the nitty gritty per line
Followed step. Works in Godot 4.3 atm
Dude youre insane. Finally a tutorial i can somewhat grasp and it actuall works first try.
such a nice tutorial and way of making things. magic! thanks a lot!!!
Excellent exactly what i needed
"Oh, here we go again."
Again need watch about inventory system after Unity :)
Lol, they sprout like weeds around here.
But I was asked several times a while back to do it so here I go making inventories again xD
That being said, for the most part, if your willing to dip your toes in c#, the implementations in unity are pretty similar, UI aside.
i know how make inventory system, one on Unity guys explain me on example supermarkets boxes-cases with items. Now i can do this. But me need understand ui Godot. I think Ui Unity and Godot4 little differ.
I don't know becouse i not long worked hard with this side stuff, becouse of this not intereseted me before ;)
I am getting an error that exeprestion of type node3d cant be type of InteractableItem
what do i have to change to have a second iteractable item? i have the test cube but i want to also have a colored box iteractable
You should be able to just make a new packed scene, then add that scene to a new ItemData resource and add that to the list of item types just like I did with the one in the video.
the thing i hate about all these inventory tutorials is how theyre all single slot inventory items and not more like diablo 2 or tarkov type inventory
Lol I totally agree, but I'm also understanding of the dilemma, do you on one hand make an inventory system that is more complex and allows for more interesting gameplay and risk the majority of people not actually use the thing, or do you go the list route and make it simpler, allowing the majority of projects to at least make use of the underlaying code, but it's pretty boring for the more experienced devs.
I think what I'll do is, since the underlaying system is very similar, go ahead and make the list kind as the basic inventory system, and then make a couple of episodes following that with implementing a grid based system, it's actually not too complicated, so maybe I could get it in just one episode...
@@BonkaheMan I would love to see a grid tutorial, your tutorials are always top quality. Keep up the good work 💪
@@Bonkahe that would be awesome.. ill definitely sub so i dont miss out
@@Bonkahe would also be cool if you went over implementing rotating items in the inventory as well, like tarkov and DayZ
It is also a bit frustrating that they all use godot's built-in hold click and drag functionality, rather than just a click and release to grab the data. Most games use the latter.
It picks up the object but shows no outline...
Okay it does work now, I added the material to the mesh instead of the outline. Amazing job buddy.
I would like to suggest some changes to the github repo.
I would love to see a branch for each episode.
The reason being that I just picked up the tutorial, but it's really hard to get the project as it is at the start of the first episode.
In reality, it's not much of a problem. i mean, Godot offers a pretty decent player controller to start with, and when you're used to it, it's not that hard to implement movement. The scene can also be whatever you want, it doesn't need to follow exactly what you do.
But i can see begginners who would want it that way.
7:48, for better performances, I recommand using "DistanceSquaredTo" instead of "DistanceTo" as we don't use the distance itself. All we care about is finding the nearset item.
So this ones a little bit complex, I actually did a similar method with my fps horror series, but it ended up being rather bloated, I have not thought to do them as different branches though, I will have to try this out and see if it works, that might very well be a better method to keep it clean, but have access to every tutorial version.
Sorry about the clunkiness xP
I keep having this problem
print("Item id:" + str(i) + " Item Name:" + ItemTypes[i].ItemName)
I keep getting these error messages
Expected closing ")" after grouping expression.
Expected ":" after "if" condition.
Invalid set Index 'visible' (on base: 'Nil') with value of type bool. At InteractableItem, ItemHighlightMesh. I followed your tutorial step by step i rewatched many times I searched and I can't fix it
In the TestCube Packed scene (Or whatever your item packed scene is) make sure that ItemHighlightMesh is assigned to a mesh, the way this error occurs means that field is null.
This is done in the inspector, you can just click the field where it says "Assign" and select the outline mesh, I don't know any way that this could be breaking besides this.
If your still not able to get this working, hit me up on discord, I can go over it with you in voice and see if I can figure it out.
Does this not work for godot 4.2?
@export var ItemTypes : Array[ItemData] = []
var NearbyBodies : Array[InteractableItem]
With this I keep getting.
Line 5:Could not find type "ItemData" in the current scope.
Line 7:Could not find type "InteractableItem" in the current scope
Hmmm should be working just fine in 4.2
Make sure you you have "class_name ItemData" and "class_name InteractableItem" at the top of both their classes just below the extends line, you may also have to restart Godot to see the update.
This can also occur if there is an error in ItemData or InteractableItem scripts. If it's not any of those things I honestly am not sure what it could be, let me know if any of those help, if not I might have to see your code to know what's up.
@@Bonkahe I just place the class_name on top of both classes and Ctrl + S and just works now!
👍
This is a great tutorial. But for some reason, I keep getting an "Item not found" error.
I used your code directly from Git. Tried like crazy to fix/debug but can't figure it out. And I'm using Godot 4.1.3
Hmmm, try this, delete the resource for the item template, make a new one following how I did it, where I assigned the packed scene for the item and gave it a name, then delete the items in the scene and drag in an all new one, if that doesn't work I might have to check this out, only thing I can think of is that the difference in Godot version between 4.2 and 4.1 is an issue, but I don't see how it would be.
@@Bonkahe bare with me I'm still green/new to Godot, but did you meant (A) delete the 'extends Resource' in the script?
or (B) delete the ItemData.gd script entirely? I tried both, (A) breaks the PlayerInteractionHandler.gd and (B) tried to add -> @export var ItemModelPrefab : PackedScene = preload( my model scene here) to a new ItemData.gd script; neither worked.
-sidenote: in your part 2 video when you connected the 'PickUpItem' signal
from the PlayerHandler --> Inventory, in your video it shows up at PickUpItem(item : ItemData)
but in my project it shows up at PickUpItem(item: Resource) ??
Ok, so I actually didn't mean any one of those things, I meant in the inspector on the interaction area just clearing out all the Item types and remaking them, sorry I was unclear xP
As for everything else, honestly there's no way to know at this point what's been changed and what hasn't, why don't you message me on discord and we'll meet up in the godot cafe this evening and I can help you out. You can find me on there under the name Bonkahe.
Also as far as the side note, the reason why it says item:resource is because of the previous issue with itemdata not having a class name, nothing that can't be sorted once the first problem is fixed though.
I know you're busy and already have videos planned and stuff, but I'd LOVE to see how to create something similar to a randomized planet. A reference to look at would be similar to the planets in No Man's Sky.
This is something I've wanted to do for a long time, but to be honest, I have so much other stuff going on it's going to be pretty hard to get to it any time soon xP
But I will put it on my backlog and we'll see~