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 make a donation. |
count | int64 | The initial progress towards completion. |
description | string | The description text for this donation. |
duration_sec | int64 | How long (in seconds) this donation is available to progress after creation. |
max_count | int64 | The number of times this donation must be progressed to be fulfilled. |
name | string | The display-friendly name for this donation. |
recipient_reward | Reward | The rewards that a user should receive once their requested donation is fulfilled. |
contributor_reward | Reward | The rewards that the sender should receive once the donation they contributed to 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. |