#Exchange

CoinsEngine features built-in exchange system that allows your players to exchange one currency for another.

#Setup

In this guide we setup exchange rates between gems.yml and coins.yml currencies, where 1 Gem = 5 Coins.

Add coins exchange rate for the gems.yml currency:

Exchange: Allowed: true # Must be enabled. Rates: coins: 5.0

This allows gems currency to be exchanged for coins with a rate 1 Gem to 5 Coins.

Add gems exchange rate for the coins.yml currency:

Exchange: Allowed: true # Must be enabled. Rates: gems: 0.2

This allows coins currency to be exchanged for gems with a rate 1 Coin to 0.2 Gems, so you need 5 Coins to exchange them back to 1 Gem.