> For the complete documentation index, see [llms.txt](https://docs.ninjutsugames.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ninjutsugames.com/game-creator-2/loot-locker/replenish-system.md).

# Replenish System

## Initialization

To use this system simply call the **Initialize Replenish Value** instruction.

<figure><img src="/files/ZSQ0zTrVlyUW9jEmINHd" alt=""><figcaption></figcaption></figure>

#### Replenish Key

A key needed to store the value in Player's storage

#### Initial Value

The initial value that will have the Player's storage value

#### Max Value

The maximum value the player can earn with the system

#### Interval

How often this value will be incremented by 1.

#### Auto Collect Offline Earnings

If enabled offline earnings will be auto collected, otherwise an event will be triggered that can be used to do it manually

## Offline Earnings

Offline earnings can be received manually by using a trigger.

<figure><img src="/files/dInLuosAcYF2G1UHws36" alt=""><figcaption></figcaption></figure>

Once this trigger is execute the instruction **Collect Offline Earnings** can be used

<figure><img src="/files/vdibzRAeRmQu5Zbn8xsz" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
To see this in action you can play the demo scene **9\_ReplenishSystem**
{% endhint %}


---

# 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://docs.ninjutsugames.com/game-creator-2/loot-locker/replenish-system.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.
