Godot 4 - RPG Inventory System From Scratch

preview_player
Показать описание

Follow along as I code the structure of an RPG type inventory system in Godot 4.

=== Intro / Setup ===
0:00 Intro
0:45 Project Setup

=== Resource Data Structure ===
2:50 Item Data Resource
4:27 Slot Data Resource
5:38 Inventory Data Resource
6:22 Creating a Test Inventory

=== Inventory UI ===
9:07 Slot UI Scene
10:46 Inventory UI Scene
11:47 Inventory Interface
13:12 Populating the Item Grid
15:29 Setting Slot Data
18:02 Quantity Bugfix
19:34 Link Player Inventory Data to Interface
21:24 Toggle Inventory Interface Visibility

=== UI Input ===
23:05 Slot Clicked Signal
25:38 Inventory Interact Signal
27:00 Grab Slot Data
28:35 Update Grabbed Slot Display
30:28 Inventory Updated Signal
31:40 Drop Slot Data
33:41 Fully Merge Slot Data
36:24 Drop Single Slot Data

=== Chest / External Inventory ===
39:22 Interact With Chest
42:12 Link Chest Inventory Data to Interface
44:50 Display External Inventory
46:43 Clear External Inventory

=== Picking Up / Dropping Items ===
48:48 Pick Up Scene
50:59 Pick Up Script
52:25 Picking Up a Slot Data
53:52 Merging Pick Ups
54:56 Drop Slot Data Signal
56:14 Instancing a Dropped Pick Up
57:13 Misc Drop Item Fixes
58:41 Dropping a Single From Multiple
59:31 Drop When Toggling Inventory

=== Simple Consumable Item Example ===
1:00:20 Item Data Consumable
1:02:22 Use Item Slot Function
1:04:24 Heal Function

=== Hotbar ===
1:06:53 Hot Bar Inventory Scene
1:07:44 Populating the Hotbar
1:09:53 Using the Hotbar

=== Basic Equipment Slot Example ===
1:11:20 Item Data Equip
1:12:41 Inventory Data Equip
1:14:13 Equipment Slot UI

=== Misc / Outro ===
1:15:38 Chest Bugfix
1:17:17 Outro
Комментарии
Автор

This is the best godot tutorial I have encountered so far. Aside from being practical implementation of an inventory system, there's just so much incidental stuff about how to navigate the interface, signaling, singletons, project organisation as code evolves, and all kinds of little extras that I haven't seen in so many other tutorials. Massively useful.

PeterGilesKnows
Автор

I'm glad Godot is used by people like you,
you have great tutorials

tomargamedev
Автор

I've been going crazy trying to put together an inventory and item system from different tutorials over the past few days. This video ia a godsend! And I love that you use Resources.

lordhuebi
Автор

Thanks man, you really helped me. I couldn't for the life of me get an inventory system to work well. This video is absolute gold.

_NISHI
Автор

The greatest YouTube tutorial I have ever seen. Insane

leolambert
Автор

Can't say I understood even half of what was going on, but it was fascinating nonetheless! I just picked up Godot for the first time last week, which is apparently right when version 4 came out. There's been almost no tutorials covering the updated software, except for yours! And they're so well done! Thanks so much for all you do.

RonaldFinger
Автор

Love your tutorial! I'm learning SO much!

Just a request for future videos: Please include the list of scripts in the sidebar of your script editor. I'm sure it's prettier without it but it makes it harder to follow along with what script you're in.

And please keep up the good work!

Cablesfish
Автор

Awesome tutorial. One suggestion I have for future videos is to enable the script list sidebar for the tutorials (the one that shows up only while in script mode). I need to go back and rewatch sections of the video frequently and it's difficult to tell at a glance which script you are currently editing. It would really help a lot to have that info on screen rather than having to back track and try to watch which script you click on/search, and then fastforward to where I was.

Haxses.
Автор

Your a gem of a teacher due to the great design, programming, and Godot skills you possess . Please keep making tutorials!

Snafuey
Автор

You are a legend, I'm off to a great start in Godot thanks to your tutorials. Keep 'em coming 🙌

Schwilliam
Автор

Really loving this tutorial, was searching for a proper one. Even wanted to order a survival course on Udemy for it.. But glad I found this.

Cafeinrush
Автор

13:45 - When you dragged the item grid into the code and it preloaded the path with a variable name for you I actually gasped, "wow" out loud. I know it's simple but that's the kind of editor behaviour that really makes this thing accessible. Amazing

baboonaiih
Автор

I like that you're doing stuff from scratch, which is the best way to learn for newbies like me. Thanks for your work!

borob.
Автор

Such an amazing teacher!! Please come back 😢

mazander_man
Автор

A bit late to the party but i just wanted to say this tutorial helped me a ton.
The only criticism i have is that I don’t like that the inventory interface and the player have to know each other. I changed that instead to having a global getter/setter for the inventory data and on “change”, emit an ‘inventory_changed” signal that the inventory interface would listen to and update its own reference.
My way also has the advantage that @23:39 you don’t need to do all that signal connection crossing the streams between your data interface and the UI

bushmonkey
Автор

I love how you created this tutorial, even just outside of the tutorial you showed a TON of shortcuts I didn't know about even having used Godot for months now!

Not only that, but when I decided to go look at your other videos, I realized I'd already watched 4 of them during those aforementioned months, without realizing you were the same person!

Thank you and I hope you continue! People would likely love a followup to show how to apply this to a graphic inventory visual, it took me a while to learn to link something like this to actually fit in a inventory UI with so many different options and setups for them out there, with few videos going over how to do it without using a specific and very basic UI. A proper tutorial on it would have saved me weeks.

lric
Автор

I was really considering quitting Godot... But now watching your tutorial made me get back to learning Godot. This is exactly what I needed for my small project. I hope you will continue making these videos. Thank you.

Simon-ikkb
Автор

Finished the tutorial in full, AMAZING wealth of info, thank you so much!

I'll be spending a lot of time going through and trying to understand more of what just happened, but it's not because you didn't explain it well, there's just so much information packed into this and even understanding 10% of it makes me feel so much better using godot.

AprilGhost
Автор

This is actually an amazing tutorial for Unity users switching to Godot.
From what I've seen, Resources behave basically lile ScriptableObjects, signals like events, and even the UI system is quite similar (I'd say it's even better in Godot!).

Even though I don't actually need an inventory in my game, just seeing how an experienced Godot developer does things helps tremendously understanding the engine.

Thanks a lot! Amazing work!

felixp
Автор

I've been loving how more Godot 4 tutorials are popping up and this is definitely one of the best ones! Great job on this!

Mattazz
welcome to shbcf.ru