All the tutorials I made are free. All the tutorials I will make will be free. Support this vision by joining the YT member club, or with a pledge on Patreon: kzbin.infojoin www.patreon.com/gamedevelopmentcenter
@SilverDungeoneer9 ай бұрын
Don't know who may see this. But if you're in godot 4+, rect_size was changed to size. So if you're as confused as I was for a hot minute. That may be why
@alcothzeither2618 ай бұрын
Thanks for the info, I could've gotten stuck here for a while trying to figure out why it didn't work
@nicolasdalianides49732 жыл бұрын
At 8:00 minutes in the video you can save some time by ctrl + clicking all the icon nodes that you want to add the Equipment.gd script to and then drag and drop the Equipment.gd script in the inspector window at the very bottom where the Script property is located, that should add the script to the selected nodes. Thank you for the tutorials
@Remissius3 жыл бұрын
First let me say that I've been scouring GameDev tutorials and engine docs since the glory days of vanilla WoW and you sir are doing great things here. If I could go back in time with your tutorials and Godot engine (icon.png 4 life) as a starting point I can't imagine how much further I'd be. Keep up the great work. :)
@GameDevelopmentCenter3 жыл бұрын
Wow, thanks Jasim! I'm happy to hear my content is so well received :)
@NarZeL73 жыл бұрын
Thanks Stefan, thanks for your courage in checking out rare topics in godot on youtube, keep going bro
@Sean-gx1sf Жыл бұрын
I'm making a card game; this has been incredibly useful to me since many of the same concepts apply
@nobutadas2 жыл бұрын
Really appreciate the tutorials! And I really appreciate the speed at which you go! As a new user with Godot, it's nice to see HOW you layout all of your GUIs.
@GameDevelopmentCenter2 жыл бұрын
Welcome aboard! :)
@pelicano19873 жыл бұрын
Thank you, specially for going function through function explaining, allowing us to learn. Already implemented variations of your 2 previous videos, hope to implement this code soon. But before I do that and fiddle around with it, I'm already wandering a few things, like how to discard items in a trash bin slot or a shop/trade/loot/chest menu. Again, thank you and keep up the good work!
@GameDevelopmentCenter3 жыл бұрын
Yeah, I got some more episodes coming with things like a hover display with item information, I think I will do the trashcan bit too. Shop/trade/loot is really just another window and very similar code :)
@Rikikiz Жыл бұрын
Excellent tutorial ! I lIke the way you actually explain why you are doing stuff
@sestalacto3 жыл бұрын
Thanks man I love your videos!
@GameDevelopmentCenter3 жыл бұрын
That great to hear Cesar :) Thx!
@USNTM23 жыл бұрын
Hey, Stephan, letting you know that there were reports of people using the "== null" or "!= null" and it blowing up production projects. There was the offering of using "is_instance_valid()" as opposed to checking against nulls. Food for thought, Sir. Keep up the great work!
@GameDevelopmentCenter3 жыл бұрын
Thx Kevin! Always good to sharpen those practices!
@USNTM23 жыл бұрын
Yup. Flipping through the code and altering this for my uses, I found that giving an initial item requires a "!= null" during the iterations. So, I'm guessing it's different when reading through a dictionary loaded from JSON.
@USNTM23 жыл бұрын
@@GameDevelopmentCenter Okay. Now I am getting into the dragging. It seems to break the code that you've got. So, please, for this tutorial and your purposes, keep yours the same. :( I am sorry if you've already altered your code... I feel like a jackass at this point.
@GameDevelopmentCenter3 жыл бұрын
@@USNTM2 Life of a gamedev, yes/no, left/right. Glad you sharing your thoughts and experiences. It is how we all learn :)
@AdredenGaming3 жыл бұрын
I have really found this a useful set of tutorials. Thank you for making them. images/icon were a lot of trouble and debugging would have been easier if it were on git hub,( CR issues I bet are involved). Thank you though for all the information and ways to think about things. Look forward to learning more from you
@GameDevelopmentCenter3 жыл бұрын
Thx Adreden, yeah cr for the assets. Code is available for supporters. Looking forward to make more tutorials :)
@jamie99262 жыл бұрын
Great video - so well explained!
@artourprice2435 Жыл бұрын
Really appreciate the tutorials! Great help!
@PrimoNelson3 жыл бұрын
Always get so much from your vids. Top man x
@GameDevelopmentCenter3 жыл бұрын
Glad you like them! Thx Primo :)
@darthgame21333 жыл бұрын
hello your videos are incredible! I have an error this showing how (invalid get index 'Item' on base: 'float'). I checked the icons and the paths and it is correct what will that be?
@GameDevelopmentCenter3 жыл бұрын
Jump on discord and share a screenshot :)
@rl_ledge92843 жыл бұрын
Awesome tutorial, how would you go about saving the current inventory and charactersheet and it saving again once a item has been swaped? Could you make a tutorial about this?
@GameDevelopmentCenter3 жыл бұрын
There are a ton of save and load tutorials out there :) You can use any one of them :)
@shirotonbo6315 Жыл бұрын
Hello, how do I change the z index of dragged data, its behind the sprite of the item (not the whole node, just the sprite) any ideas. Ive watched the video so many times, everything is working as expected just this one thing its really stressing me out.
@GameDevelopmentCenter Жыл бұрын
You either have to set it above parent with a function or change the order of the nodes in the node tree. I can't help much more than this without screenshots. Join the Discord if you remain stuck.
@shirotonbo6315 Жыл бұрын
@@GameDevelopmentCenter Thank you man! Yes it was the parents fault. It worked!
@jaredw.7712 Жыл бұрын
I don't know if you're still around or not. But I'm wondering if it's possible to hide the control while dragging and make it show again if I stop dragging but the control didn't enter a draggable zone
@GameDevelopmentCenter Жыл бұрын
Not sure what you mean, probably a whole lot easier to show what you mean on Discord :)
@neeshchiiking2 жыл бұрын
I wanted to have multiple inventory pages to separate my weapons, items, quest items, etc. would I have to do this process multiple times to do that or is there a simpler way? Thank you again for your informative tutorials
@GameDevelopmentCenter2 жыл бұрын
No, you would probably add some filter icons and reload the inventory. In the load inventory code you will have to apply the filter
@-GIGA-3 жыл бұрын
I'm curious as to why you prefer using JSON and dictionaries for items as opposed to Godots' resource files? I've found only a handful of tutorials that really explain resources and I didn't quite get what's so special about them. I'm developing a little 2D game that has a ton of clothing options for characters so I store all the clothes in a dictionary with relevant values describing them and then a load function to the PNG file for that specific clothing item. However, I'm new to game development so I'm not all that aware of best practices for situations like mine. Regardless, I appreciate the time you spent making these informative videos, keep up the good work!
@GameDevelopmentCenter3 жыл бұрын
I prefer json because I can easily pull them out of Google Sheets. With all my items in Google sheets balancing is a lot easier. Imagine I have a game with 80 different melee weapons, and I want to add another one. How much damage do I give it? How much durability, what sword/axe names do I already have? In Google Sheet I can filter for weapon type, sort on various stats to quickly balance this new weapon with all exsisting weapons. This becomes extra obvious when you data consist of not just weapons, but all kinds of other items, hundreds of them.
@-GIGA-3 жыл бұрын
@@GameDevelopmentCenter Thank you so much for replying. I believe I'll be using JSON soon in my game so your videos are really invaluable to me right now.
@rainsong773 жыл бұрын
Resource files give you a gui editor inside the engine, with things like dropdowns, sliders, pickers, constrained ranges. You can also put setters/getters, _ready, and really any kind of logic (including inheritance) because they are classes. I would argue that for an rpg they are better than JSON. If I want to create, say, a weapon, I just do Create resource->Weapon, and I get a weapon editor where I don't have to worry about mistyping property names, or curly brackets. If I want to add a "elemental damage" field to my weapons, I just add it to the class, and all my resource files now have that field, without me having to manually edit every entry.
@WestlyLaFleur Жыл бұрын
@@rainsong77 Is there a solid video tutorial somewhere demonstrating this sort of functionality in the engine?
@avequenta56333 жыл бұрын
Love your videos!
@GameDevelopmentCenter3 жыл бұрын
Glad you like them AVEQUENTA!
@BdyPhrk3 жыл бұрын
If I buy the assets you used from Unity asset store can I use them in Godot for commercial use?
@GameDevelopmentCenter3 жыл бұрын
Yeah, Unity end user license agreement states that assets may be used to make (commercial) applications, like games. It does not state it has to be made with the Unity Game Engine (safe to use with Godot). And the license includes the use for commercial purpose, check the FAQ and EULA for more details (linked on the right hand-side of the unity store page (desktop) under the price.
@BdyPhrk3 жыл бұрын
@@GameDevelopmentCenter Thank you!
@olexayko Жыл бұрын
By calling set_drag_preview, i get error "E 0:00:00.436 set_drag_preview: Condition "!get_viewport()->gui_is_dragging()" is true." and can't figure out this. What is my error?)
@dantescanline3 жыл бұрын
hey this is a great tutorial!!
@spielville5087 Жыл бұрын
Just wanted to confirm it is working or Godot 4.Rc1 as of now with little (if any) changes in the code. A few quick questions though: 1) How can we hide the "can't drop icon"; 2) How can we implement duplicate equipment slots (e.g. multiple rings)?
@fruitdudetv3 жыл бұрын
i am stuck at 17:20 - when i try to drag an equipment to my inventory it gives me following error messeag "Invalid get index 'InventorySlot' (on base: 'Dictionary'). im clueless where my error is because im pretty sure my code is excactly like yours.
@GameDevelopmentCenter3 жыл бұрын
I will need a screenshot of the code to help you. You can provide it on the Discord server.
@jocamar153 жыл бұрын
Can't you merge both scripts together, while allowing one of them to be extensible, by using inheritance? Putting the common functionality in a base ItemSlot node and extending inheriting both other nodes from that one?
@GameDevelopmentCenter3 жыл бұрын
You could, that's actually how I started out when prepping for the tutorial. When I was finished I could only conclude it made the code needlessly complex.
@JBS5123 жыл бұрын
Everytime I drag an item to an equipment empty slot it duplicates an invisible item in the place of the inventory origin item. I may have missed it somewhere but how do you get equipment_data in PlayerData to show up in equipment when you open the character sheet? When I print(data["target_item_id"]) it says null for empty spaces in the inventory, but it says 10002 or something when I drag it to an empty slot. I've been trying to figure this out for hours. Any help would be appreciated.
@GameDevelopmentCenter3 жыл бұрын
Hi Jon, this will probably go faster if I can see your code. If you could join the Discord and send a screenshot (or multiple if needed), that would be great :)
@gamedev_byhobby88723 жыл бұрын
I'm following with a bit of a different structure UI-wise but I'm having an odd problem where I can swap items and place the on the equipment and all but I can't place items on regular empty inventory slots. I'll rewatch and see if I did something wrong
@gamedev_byhobby88723 жыл бұрын
Fixed! I missed a return true in can drop data
@plyczkowski3 жыл бұрын
I'm guessing this functionality can't be used for dragging a Control node, with animations playing inside it, around?
@GameDevelopmentCenter3 жыл бұрын
I don't see a technical limitation to that. I think with some experimenting you should be able to get that to work.
@Gamedev001003 жыл бұрын
thanks for this magnificent tutorial keep up the good work i love your channel. And i want to learn how to apply changing in equipment to reflect i n the player character for example if i equip new armor it will change the texture in the KinematicBody2d (player) to the new one.
@GameDevelopmentCenter3 жыл бұрын
Thank you Karg! I got something for the equipment to show planned ;)
@Gamedev001003 жыл бұрын
@@GameDevelopmentCenter good to read this from you thanks for the reply
@mrvladimir37953 жыл бұрын
Thx big for your work!
@mauriciodossantos97073 жыл бұрын
awesome!!!!!!
@agriasoaks67212 жыл бұрын
Can we make a logic in drop_data() if can_drop_data() returns false?
@GameDevelopmentCenter2 жыл бұрын
No, that wouldn't make sense as they are two separate code instances
@lkasikakalus1233 жыл бұрын
nice
@adamdaniels16823 жыл бұрын
Anyone else get "invalid get index 'Rect' (on base: 'GDScriptNativeClass')." For var drag_texture = Texture.Rect.new() when they try to drag an item? The script is on the TextureRect node.
@GameDevelopmentCenter3 жыл бұрын
You have a dot in between Texture and Rect
@artyombeliy7569Ай бұрын
For anyone else confused why dragging doesn't work in Godot 4, change the function names to include an underscore: _get_drag_data(_pos) _can_drop_data(_pos, data) _drop_data(_pos, data)
@jasper8598Ай бұрын
its still not working for me
@migueleduardo78953 жыл бұрын
I am having an error when transferring the item from the inventory to the inventory itself (I will not use a team inventory), what can it be?
@migueleduardo78953 жыл бұрын
The error is in line with "texture = data [" origin texture "]" Invalid get index 'origin_texture' (on base: 'Dictionary').
@migueleduardo78953 жыл бұрын
I mean, can you tell me which parts of the video are important for me to watch? (I will only use an inventory)
@GameDevelopmentCenter3 жыл бұрын
@@migueleduardo7895 seems like ypu never defined origin_texture. Share a screenshot of the code on Discord. Sure it is something that can be fixed in seconds :)
@yusarimahubara Жыл бұрын
None of these tutorials deal with what happens if the preview is dropped somewhere outside the allowed field. It just disappears and you don't know how to get it back.
@GameDevelopmentCenter Жыл бұрын
Not the goal of this tutorial. Several ways a developer may implement this depending on platform. This tutorial is about drag and drop inventory. Not about UI windows.
@ナルトうずまき-c9p3 жыл бұрын
makes a crafting system
@GameDevelopmentCenter3 жыл бұрын
Repeating the same message on multiple videos is not going to help you :)
@aliosha1233 жыл бұрын
the foam on the wall doesnt help you much coz i can hear the echo in the room like crazy...