top of page

Virtual Currencies

The Virtual Currencies plugin is specifically designed to manage the application's virtual store, currency and user's side of economy and inventory through the PlayFab service, for games built using Construct 3 and Construct 2.


Interconnected with major platforms including Google Play, Game Center, Apple Login, Instant Games, Facebook, Facebook Instant Games, Steam, Xbox Live, Nintendo Switch, PS4 and of course PlayFab's own account system allows you to access the player's inventory, purchases, subscriptions, claims, redeem coupons, manage virtual currencies and other transactions.


The economy, store list, catalog items, virtual currencies, and user's inventory and transaction data are accessible through the PlayFab Console.


Use this PlayFab plugin to manage and create your user's inventory, purchases, subscriptions and other store or inventory transactions.

PlayFab API v2.png

Introduction

Step 1.png

The Construct Master Collection supports the full and easy integration of the PlayFab service for both Construct 3 and Construct 2.


Please click here to learn more about PlayFab.

Features


Here are some of the features of the PlayFab service:

  • Purchases

  • Subscriptions

  • Advanced purchases

  • Advanced subscriptions

  • Redeem Codes

  • User inventory

  • Consume products or items

  • Bundles

  • Containers

  • Drop Tables

  • Stores

  • User virtual currencies


For more information about all the integrated PlayFab service features, please click here to learn the introductory lessons to PlayFab.


Network Services


Here are some of the platform services that can be linked:

  • PlayFab

  • Google Play

  • Game Center

  • Facebook

  • Facebook Instant Games

  • Steam

  • Xbox Live

  • Instant Games (Android Studio port)

  • Nintendo Switch (3rd party porting services)

  • PS4 (3rd party porting services)

  • Nintendo Switch (3rd party porting services)


Editor Features


Here are some of the features in the Construct editor:

  • All platforms support, including web, mobile and desktop.

  • Construct 3

  • Construct 2

Introduction
Features

How to use?

It is easy to use the Virtual Currencies plugin, you will only need to follow the steps below.

  1. Set up the PlayFab API plugin, please click to visit the documentation. This includes creating a PlayFab account, studio and title.

  2. Set up the Authentication plugin, please click to visit the documentation.

  3. Finally, you can now use the Virtual Currencies object, and include more PlayFab addons for more features.


Instructions
Documentation

Documentation

There is currently nothing to show, we will add more in the future.



Server Configuration


The Virtual Currencies with PlayFab is implemented by creating catalogs, store lists and virtual currencies for store trade and other transactions. It is easy to set in the PlayFab console.



Step 1 : From the PlayFab Dashboard, select the Economy menu option. By default, the Catalog tab will initially show.

Step 2 : Click the New Catalog button, then fill up the configuration form.



Step 3 : Once the catalog is created, press the New Item button.

Step 4 : An item creation configuration form will launch, fill the necessary settings configuration for the new item.



Step 5 : Once your catalogs are set, you will need to configure your virtual currencies. Now, click the Currency tab. ​ Step 6 : Finally, add and configure your new virtual currency that will be used in your application's virtual store.



Virtual Currencies


To allow Construct 3 or Construct 2's event sheet system to add or subtract virtual currencies, you need to enable the API features in your PlayFab title settings.

  1. Login to your PlayFab account.

  2. Choose a studio and select the title you want to enable adding and/or subtracting virtual currencies.

  3. From the sidebar, select the settings icon.

  4. Then, click the Title Settings option.

  5. From the Title Settings page, select the API features tab.

  6. Under the Enable API Features section, check the following checkboxes.

    • Allow client to add virtual currency

    • Allow client to subtract virtual currency


Once you are finished with your PlayFab console server configuration, including the virtual currencies setup. You should now be able to use the Virtual Currencies plugin in your game application project.



Related Plugins


ACEs

Actions, Conditions & Expressions

Actions

The following action groups:

  • Virtual Currency

  • Item Management

  • Reward Management

Virtual Currency

  • Add User Currency - Increments the user's balance of the specified virtual currency by the stated amount.

    • Virtual Currency - Name of the virtual currency which is to be incremented.

    • Amount - Amount to be added to the user balance of the specified virtual currency.

    • Tag - The tag to differentiate requests.


  • Subtract User Currency - Decrements the user's balance of the specified virtual currency by the stated amount. A Negative Balance is possible.

    • Virtual Currency - Name of the virtual currency which is to be decremented.

    • Amount - Amount to be subtracted from the user balance of the specified virtual currency.

    • Tag - The tag to differentiate requests.



Item Management

  • Get User Inventory - Retrieves the user's current inventory of virtual goods.

    • Tag - The tag to differentiate requests.​​


  • Consume Item - Consume uses of a consumable item. When all uses are consumed, it will be removed from the player's inventory.

    • Item Instance ID - Unique instance identifier of the item to be consumed.

    • Consume Count - Number of uses to consume from the item.


  • Purchase Item - Buys a single item with virtual currency.

    • Item ID - Unique identifier of the item to purchase.

    • Price - Price the client expects to pay for the item (in case a new catalog or store was uploaded, with new prices).

    • Virtual Currency - Virtual currency to use to purchase the item.


  • Advanced Purchase Item - Buys a single item with virtual currency. Using advanced features.

    • Item ID - Unique identifier of the item to purchase.

    • Price - Price the client expects to pay for the item (in case a new catalog or store was uploaded, with new prices).

    • Store ID - Store to buy this item through. If not set, prices default to those in the catalog.

    • Virtual Currency - Virtual currency to use to purchase the item.

    • Catalog - Catalog version for the items to be purchased (defaults to most recent version.

    • Catalog Version - Specific Catalog version for the items to be purchased.


Reward Management

  • Redeem Coupon - Adds the virtual goods associated with the coupon to the user's inventory.

    • Coupon Code - Generated coupon code to redeem.

    • Tag - The tag to differentiate requests.​


  • Redeem Coupon by Version - Adds the virtual goods associated with the coupon to the user's inventory. With Specify the Catalog Version.

    • Coupon Code - Generated coupon code to redeem.

    • Catalog Version - Catalog version of the coupon.

    • Tag - The tag to differentiate requests.​

Conditions

The following condition groups:

  • Virtual Currency

  • Get User Inventory

  • Consume Item

  • Purchase Item

  • Redeem Coupon

Virtual Currency

  • On Add User Currency - Triggers when the On Add User Virtual Currency Succeeded.


  • On Add User Currency Error - Triggers when the On Add User Virtual Currency Failed.


  • On Subtract User Currency - Triggers when the On Subtract User Virtual Currency Succeeded.


  • On Subtract User Currency Error - Triggers when the On Subtract User Virtual Currency Failed.


Get User Inventory

  • On Get User Inventory - Triggers when the On Get User Inventory Succeeded.


  • On Get User Inventory Error - Triggers when the On Get User Inventory Failed.


  • For Each Inventory - Loops through the "Inventory List" if "On Get User Inventory" is successful.


Consume Item

  • On Consume Success - Triggers when the On Consume Item Succeeded.