Economy #

The Economy features enable you to define multiple in-game currencies and rewards, allow players to spend soft or hard currency in exchange for in-game energy, inventory, and rewards, and offer video ad watches as a way for players to obtain rewards.

Customization parameters #

The following JSON represents the customization parameters you can use to configure the default user experience for the economy system.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
{
  "initialize_user": {
    "currencies": {
      "<currencyName1>": 100,
      "<currencyName2>": 50
    },
    "items": {
      "<itemId1>": 1,
      "<itemId2>": 10
    }
  },
  "donations": {
    "<donationId1>": {
      "cost": {
        "currencies": {
          "coins": 10
        },
        "items": {}
      },
      "count": 1,
      "description": "Description for donation one",
      "duration_sec": 10000,
      "max_count": 10,
      "name": "Donation one",
      "recipient_reward": {},
      "contributor_reward": {},
      "user_contribution_max_count": 2,
      "additional_properties": {
        "<propertyName>": "value"
      }
    }
  },
  "store_items": {
    "<itemId1>": {
      "category": "<categoryName>",
      "cost": {
        "currencies": {},
        "sku": "com.example.item1"
      },
      "description": "The description for item one",
      "name": "Item one",
      "reward": {
        "guaranteed": {
          "currencies": {
            "gold": {
              "min": 100
            }
          },
          "items": {
            "hero_card": {
              "min": 1,
              "max": 5
            }
          }
        }
      },
      "additional_properties": {
        "<propertyName>": "value"
      },
      "disabled": false
    }
  },
  "placements": {
    "<placementId1>": {
      "reward": {},
      "additional_properties": {
        "<propertyName>": "value"
      }
    }
  }
}

The JSON schema defines several objects which define the various store items, collectables, consumables, placements and donations that will be available in your game. You can configure as few or as many of each as needed for your desired gameplay. It also defines an initialize_user object which defines what currencies, collectables and consumables a user starts with.

PropertyTypeDescription
initialize_userInitializeUserThe currencies and items a user should start with when their account is created.
donationsstring:DonationA map of all donations.
store_itemsstring:StoreItemA map of all store items.
placementsstring:PlacementA map of all placements.
allow_fake_receiptsboolShould fake receipts be allowed? A receipt is fake if it contains the string: fake receipt.

Initialize User #

The initialize_user object is structured as follows:

PropertyTypeDescription
currenciesstring:int64A map of currency IDs and quantities that a user account should be created with.
itemsstring:int64A map of item IDs and quantities that a user account should be created with.