> For the complete documentation index, see [llms.txt](/llms.txt)

# Buffs

Temporarily scales what a service hands out, targeted by action or model and limited to a period.




**About this demo**

The demo signs in automatically with an anonymous account. The account is shared across every demo in the showroom, so items and currency you get in one demo carry over to the others. Loading takes a moment. If the frame is too small, open the demo in a new tab.

## Overview

This demo uses GS2-Buff to double idle rewards only while a campaign is running. The campaign is a window opened by a GS2-Schedule trigger, and it lasts 24 hours once started. The buff is applied at the moment you receive, so pressing **Receive** during the campaign doubles everything built up until then.

## How to try it

1. Press **Advance one hour** under **Idle rewards** to move your clock forward an hour, so **To receive** builds up an hour of idle rewards (105 coins).
1. Press **Start campaign** under **Double idle rewards campaign**. **Status** changes to **Running: idle rewards are doubled when you receive**, **Ends** counts down to the end 24 hours later, and **To receive** doubles too.
1. Press **Receive**; the doubled reward goes into **Free balance** under **Where the coins land**.
1. Press **End campaign** to stop the campaign; **Status** goes back to **No campaign running**. Advance the clock again and **Receive** to see only the normal amount paid.

The campaign shares the **happy-hour** trigger with the Scheduling demo. The account is shared by every showroom demo in the same browser, so pressing **Pull** there also starts the campaign here, and a clock moved with the advance buttons carries over to the other demos.

## GS2 services used

- [GS2-Buff](/microservices/buff/): The GS2-Buff entry **double-idle** multiplies the GS2-Idle category's rewards (its acquireActions) by 2. It applies during the GS2-Schedule event happy-hour, and the page applies the buff before receiving.
- [GS2-Idle](/microservices/idle/): GS2-Idle works out and grants the idle rewards, 5 coins every 5 minutes (50 every hour) for up to 8 hours; the buff scales these rewards.
- [GS2-Schedule](/microservices/schedule/): The GS2-Schedule relative event happy-hour is the campaign window; it is open only while the player's own trigger is pulled.
- [GS2-Exchange](/microservices/exchange/): Free GS2-Exchange rates define starting the campaign (pulling the trigger for 86,400 seconds) and ending it (deleting the trigger), run by **Start campaign** and **End campaign**.
- [GS2-Money2](/microservices/money2/): Idle rewards are deposited as free currency into a GS2-Money2 wallet (slot 0), shown as **Free balance**.

## Use it in GS2 Studio

In GS2 Studio's Simple mode, open **Add features** and press **Add** on **Buffs** to bring this feature into your own project. To point at the package directly, choose **Add from GitHub** and enter the package below.

```text
https://github.com/gs2io/gs2-studio-package/tree/main/micro-economy-buff/packages/micro-economy-buff
```

- Owner: `gs2io`
- Repository: `gs2-studio-package`
- Subdirectory: `micro-economy-buff/packages/micro-economy-buff`

## Source code

- Demo project: <https://github.com/gs2io/gs2-studio-package/tree/main/micro-economy-buff/live-demo>
- Feature package: <https://github.com/gs2io/gs2-studio-package/tree/main/micro-economy-buff>



