Adding Items to Inventory - ArtistSaihaan/ArrayRPG-Beta-Godot GitHub Wiki
Now the next thing we will learn is to use the inventory.
Creating and Setting InventoryItem3D
There are many types of nodes like mesh instance, animation player etc. in godot. This plugin adds a custom node called InventoryItem3D which we are going to use
Adding Inventory Item
Add a InventoryItem3D Node to the scene. You can name it whatever you want
Add a mesh instance as a child of InventoryItem. For Prototyping, the addon gives you a golden apple mesh as a .gltf file so you can delete mesh instance and got to addons>array_rpg>golden_apple_stylized, In that folder you will get a .gltf file named 'scene.gltf' and drag that file to InventoryItem3D.
Add a CollisionShape to InventoryItem3D and resize it as you want
Add an Area Node to InventoryItem and add a collision shape as child of that area. Make this collision shape slightly bigger than the last one.
Your InventoryItem3D should look like this:

Now like most of the other custom nodes, we have to code setup this too! To reference our Item, we will do $InventoryItem3DNodeName as it is not child of a parent, its child of root node
The code setup looks like this:

ItemName: It is the item name or the identity of item which a npc recognize
Quantity: How much amount of this item you'll get
ThisItemCollider: Asks for the node path of the area which is child of our InventoryItem3D
Testing Inventory
The problem of this beta is you can't see your inventory in-game. It will be in full version. But for now we have to do debug-magic
In this part of code in our script, you need to get reference of Inventory Node in PlayerCharacter3D
The Code Should Look like this:

This bit of code takes reference of Inventory Node and this node has a variable called 'playerinventory' which has all our inventory data stored in it so this will print our whole inventory.
Now you know how to put items in Player's bagpack
Next: Adding a NPC