> 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="/files/LEaLOjMobAtXif6bIr6O" 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://hiveminddocs.gitbook.io/hivemind/code-systems/ultimate-gathering-system-ugs/classes/bp_ugs_resourcenode_harvestcount.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
