How to increase stats when using equipment

Godot Version

Godot 4.2

Hi. Im using Godot Dynamic Inventory System for equipment and I am having trouble increasing my characterstats.tres when equipping items. I’m not sure how to call the resource to increase the stats. Any help would be appreciated. Ill post the link to the inventory system here as well.

Could you single out the issue. I don’t know who will want to ramp up on your code.

A tres is a file. A resource is an instance from that tres. Once a tres becomes a resource class you can just interact with the class. So if you use a weapon and increase the stats you need to resave that file. Probably in user data folder so it doesn’t change the default starting resource state.

If you have a design question, could you be a little more clear on how the system works and what problems you are facing?

1 Like

Im using an EntityItem resource for a slot based equipment scene. When I equip an item into the slot id like to change the stats according to the EntityItem im equipping. I tried using a function that would find the resource using match EntityItem[“name”]:, but that hasn’t worked.

How can I call the resource correctly so the stats will update depending on the item I’m equipping?

I hope I explained that correctly. Sorry, im still a beginning and learning.

Okay, there is no documentation from that github link. Could you explain the interface for the inventory system? At least point me at the classes you use to get or set an item in the inventory?

I took a peak around, even with no documentation I couldn’t find a superficial API to interact with it.

There is a video series on its construction via Udemy. Have you by chance watched those videos?

Yea I’ve watched the majority of the class. It’s not something that is covered in it. The player resource has a class name of EntityPlayer. The item resource has a class name of EntityItem. The slots are based off type and that script has a class name of EntityItemCategoryDisplay.

The interface of the inventory has a grid container that contains each type of armor and weapon. There is also another grid container that holds the equipment inventory. Lastly, there are slots for each type of equipment and it places the equipment in the corresponding slot based off of type after clicking equip.

I’m rewatching the series now so hopefully I just missed something.