Donations #
Donations are a way for players to share in-game items, such as currencies, consumables, or collectables. Each user has their own storage object that represents the donations they have, which may be active or expired.
You can customize the donation rules to meet your social and gameplay requirements, such as restricting the number of times a user can send contributions to another user, how many donations can be active at any time, or whether donations can only be made between users who are part of a team, are friends, or have completed some other kind of gameplay together.
Customization parameters #
The following JSON represents the customization parameters you can use to configure donations for the economy system.
|
|
Each individual donation is keyed by id and may define the following:
Donation #
Property | Type | Description |
---|---|---|
cost | DonationCost | What will be spent to donate. |
count | int64 | The initial count to start this donation with. |
description | string | The description for this donation. |
duration_sec | int64 | How long (in seconds) this donation is active. |
max_count | int64 | The maximum amount of donations required for this to be completed. |
name | string | The name for this donation. |
recipient_reward | Reward | The rewards a user should receive once the donation is fulfilled. |
contributor_reward | Reward | The rewards the sender should receive once the donation is fulfilled. |
user_contribution_max_count | int64 | The maximum amount of times each user can donate towards this donation. |
additional_properties | string:string | A map of key value pairs that can contain additional context. |
Donation Cost #
Property | Type | Description |
---|---|---|
currencies | string:int64 | A map of currency IDs and quantities to be donated. |
items | string:int64 | A map of item IDs and quantities to be donated. |