# Blueprint Nodes

### Universal Intentory System <a href="#undefined" id="undefined"></a>

In this category we have a total of 8 functions, let's see each one.

<figure><img src="https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FeoV2mHJRDLnkvUgly6DK%2Fimage.png?alt=media&#x26;token=b5962ccb-3eda-4001-af6b-7ad84bff4ca7" alt=""><figcaption></figcaption></figure>

> ***Add Item to Inv***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FYdQFf9pE7FJmLyyF9ZwI%2Fimage.png?alt=media\&token=8a7eca42-0212-4cbe-9524-8189c63c8d80)
>
> Attempts to add an item to the inventory.
>
> \
> \&#xNAN;***Object:*** The Object that will be used to call Interface events and that will be **DIRECTLY** linked to the Item.
>
> ***Item Info:*** The Item Information structure you want to add.
>
> ***Can Add to Existent:*** If true, it will try to add the item to an existing one with the same ID \
> (I recommend leaving it disabled, used in specific cases)
>
> ***Return:*** Returns true if the item was added successfully.

> ***Add Items to Inv***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FiGR6onmgigA6MyBH4tmp%2Fimage.png?alt=media\&token=28542cd5-d6cb-47ec-ba72-7ce1768b0375)
>
> Adds multiple items to the inventory at once.&#x20;
>
> The input is a map where each Object is mapped to its corresponding Item Inf&#x6F;***.***
>
> ***Return:*** Returns true if you add at least one item to the inventory.

> ***End Use Item***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FeTVPbmVR8CLlHP9sYeJh%2Fimage.png?alt=media\&token=b7d09101-0900-4e8a-bc52-3fc49360ac3a)
>
> Stops using an item based on its Item Info structure.&#x20;
>
> Ending its usage like the Object-based function.
>
> ***Return:*** Returns true if you successfully stopped using the item.

> ***End Use Item by Object***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FpufxmOnwGQBVe1dahDb3%2Fimage.png?alt=media\&token=cf95e131-24fa-44c6-a5b5-ada71227080f)
>
> Stops using an item referenced by a Object pointer.&#x20;
>
> Ends the usage of the item (e.g., finishing drinking a potion).
>
> ***Return:*** Returns true if you successfully stopped using the item.

> ***Remove Item from Inv***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FDda3boDbk9ffaXgYw0UI%2Fimage.png?alt=media\&token=51267e95-079d-4cab-8d37-0bb08467436f)
>
> Removes an item from the inventory by using its Item Info structure.&#x20;
>
> Similar to the Object-based removal, but based on Item Info.
>
> ***Remove All Items:*** If enabled, it will remove the object from the inventory instead of reducing its quantity.
>
> ***Drop:*** Warns you if you are dropping the item or forcibly removing it.
>
> ***Return:*** Returns true if you successfully removed the item.

{% hint style="info" %}
You don't need to worry about calling this node after using an object, the system does it automatically :)
{% endhint %}

> ***Remove Item from Inv by Object***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2F14QZeRU1P5fHbOydtTGc%2Fimage.png?alt=media\&token=a0052258-2e6d-459f-b8be-f5b5f9ea023e)
>
> Removes an item from the inventory by its Object reference.
>
> ***Remove All Items:*** If enabled, it will remove the object from the inventory instead of reducing its quantity.
>
> ***Drop:*** Warns you if you are dropping the item or forcibly removing it.
>
> ***Return:*** Returns true if you successfully removed the item.

> ***Start Use Item by Object***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FLqUH8uZDNOhuVqWo8Nz9%2Fimage.png?alt=media\&token=9e1c7ae4-e73c-4dcb-b6c8-f443dae9a6b7)
>
> Starts using an item referenced by a Object pointer.&#x20;
>
> Executes any custom logic related to item usage (e.g., consuming a health potion).
>
> ***Return:*** Returns true if you used the item successfully.

> ***Start Use Item***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2Fku3E9pdUKeEsB2Xn1aiB%2Fimage.png?alt=media\&token=dfcfadf4-3ea0-4a80-a227-b789bf41d15d)
>
> Starts using an item based on its Item Info structure.&#x20;
>
> Like the previous method, but uses item info instead of a direct object reference.
>
> ***Return:*** Returns true if you used the item successfully.

### Universal Intentory System | Info <a href="#undefined" id="undefined"></a>

In this subcategory we have a total of 9 functions, let's delve deeper into each of them.

<div align="left"><figure><img src="https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FWY24DL474njwjbvWu33c%2Fimage.png?alt=media&#x26;token=a2df855b-630b-47eb-bdad-0334059b963c" alt=""><figcaption></figcaption></figure></div>

> ***Can Add Item***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FMTBLQ8TssTo0OKD6GGEo%2Fimage.png?alt=media\&token=9bff669f-3b42-4e04-afae-7bcc99f23698)
>
> Determines if an item can be added to the inventory.&#x20;
>
> Considers constraints like inventory size and weight limits.

> ***Get Item by ID***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FzjxF9Ucc3LpiJZ3Zc9ll%2Fimage.png?alt=media\&token=6bc66c4c-5605-4b4f-8b3f-0e6bab3673f9)
>
> Searches the inventory for an item matching a specific Item ID and returns its Object and corresponding Item Info if found.

> ***Get Item Info by Object***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FM3IYMpp7TnuXSVK7FPTn%2Fimage.png?alt=media\&token=647a159e-030e-4b2c-8595-588b08ab04d9)
>
> Retrieves the Item Info structure associated with a specific Object, providing details such as quantity and weight of the item.

> ***Get Item Quantity by ID***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FJdD9HTl9Hrs2xGO4nI3E%2Fimage.png?alt=media\&token=3acfa406-bf1f-4fa9-9464-4f0f2ca75108)
>
> Returns the exact number of items that the player has in the inventory, searches for the ID of a single item

> ***Get Items***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FpkPJMrrOhhxspJrrehgt%2Fimage.png?alt=media\&token=7387a02c-d68b-40f4-8903-8366b14f75c5)
>
> Retrieves the entire inventory map containing all items.

> ***Get Items Filtered***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FvZfQnvQ22R6eljvnXSVt%2Fimage.png?alt=media\&token=f4c4bd7a-5e4f-4ca2-9cf2-55ad3eeef324)
>
> It looks like ***GetItems***, but organizes items with the same ID making them one.
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FhZ7lZkwZGjQ1Kmphy717%2Fimage.png?alt=media\&token=24baf7c8-934e-47c1-bb95-58d764365db6)\
> [⬇️](https://emojiterra.com/pt/seta-para-baixo/)
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FTsGUeOBVImjoZscP0Rpi%2Fimage.png?alt=media\&token=1e2d1350-2dbb-4d6d-a925-e697c7cf930d)

> ***Get Object by Item Info***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2F1sNgf9bF23hpGpmhwrzg%2Fimage.png?alt=media\&token=392caf1a-014b-43e4-a7af-1aaf3a6f49d7)
>
> Finds and returns the Object associated with a given Item Info.&#x20;
>
> Useful for reverse lookups when only item info is available.

> ***Get Total Weight***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FPYcsFh0UXQLfKuP9BqkF%2Fimage.png?alt=media\&token=641541a9-1c47-4f5c-aff7-b481249301a7)
>
> Calculates and returns the total weight of all items currently stored in the inventory.

> ***Player Has Item***
>
> ![](https://534259950-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FheZskC8SUj57bJuHA3dm%2Fuploads%2FGofQgFyrsVzI45Kcy7tO%2Fimage.png?alt=media\&token=e6c375b9-c6c7-466a-9452-5f94bba4f606)
>
> Checks if the player has any item in their inventory that matches a specific ItemID.
