> For the complete documentation index, see [llms.txt](https://hiveminddocs.gitbook.io/hivemind/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hiveminddocs.gitbook.io/hivemind/code-systems/ultimate-gathering-system-ugs/classes/bp_ugs_resourcenode_harvestcount.md).

# BP\_UGS\_ResourceNode\_HarvestCount

This class is a child class of the [BP\_UGS\_ResourceNode\_Base](/hivemind/code-systems/ultimate-gathering-system-ugs/classes/bp_ugs_resourcenode_base.md). It has been set up to allow for harvesting a node X amount of times, and allows you randomize the Harvest Count within a range.

If you want to use this for your own game, then you will need to override the GiveItem function, as the system is currently set up to give items that matches the very basic inventory system which comes with this system.

<figure><img src="https://2172137675-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIDY48Kh4vjaW2sp9MS3a%2Fuploads%2FMOFUN5gVBzlVCr0O6WT6%2F%7BBAA1F896-C52F-43BB-B554-01FA6E9B7342%7D.png?alt=media&amp;token=60d3528a-b583-4647-a3a1-bc1cdef73f8c" alt=""><figcaption><p>The Give Item Function. You should override this function to have it support giving items with your own inventory system.</p></figcaption></figure>

Make sure you return true if you successfully give an item to the instigator.

## <mark style="color:blue;">Functions</mark>

### <mark style="color:yellow;">Give Item</mark>

{% hint style="warning" %}
Note: This function should be overridden to integrate with your specific inventory setup.
{% endhint %}

To give an item to the instigator, retrieve the item data from the `ItemToGive` input and use the appropriate function from your inventory system. Ensure you return `true` to indicate a successful transaction; otherwise, the system will assume that the resource node harvest failed.

### <mark style="color:yellow;">Find Item By Tag</mark>

The function returns an item of type `PDA_Lootable_Data_Def` based on the specified tag which matches the item.

## <mark style="color:blue;">Properties</mark>

* <mark style="color:yellow;">**InitialHarvestCount**</mark>: The initial number of times the resource node is harvestable.
* <mark style="color:yellow;">**MaxHarvestCount**</mark>: Defines the maximum times the resource node can be harvested before depletion.
* <mark style="color:yellow;">**MinHarvestCount**</mark>: Defines the minimum times the resource node must be harvested before depletion.
* <mark style="color:yellow;">**ResourceRateRemainders**</mark>: A map of remaining resources.
* <mark style="color:yellow;">**HarvestCount**</mark>: Indicates the current available harvest amount before depletion.
