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.
Introduction
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
How to use?
It is easy to use the Virtual Currencies plugin, you will only need to follow the steps below.
Set up the PlayFab API plugin, please click to visit the documentation. This includes creating a PlayFab account, studio and title.
Set up the Authentication plugin, please click to visit the documentation.
Finally, you can now use the Virtual Currencies object, and include more PlayFab addons for more features.
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.
Login to your PlayFab account.
Choose a studio and select the title you want to enable adding and/or subtracting virtual currencies.
From the sidebar, select the settings icon.
Then, click the Title Settings option.
From the Title Settings page, select the API features tab.
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
Title Manager - is a plugin that is designed to manage the title-wide (game-wide) features. You can retrieve here the global game economy data for the store catalogs and store item listings.
Real Currencies - is a plugin that implements purchases using real currencies or legal tender payment. It currently includes validating the purchases of payments made using In-App Billing on Android and In-App Purchases on iOS. Which in turn will automatically complete a purchase, subscription or claim matching the id from PlayFab's game economy - Store Catalog.
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.
On Consume Error - Triggers when the On Consume Item Failed.
Purchase Item
On Purchase Success - Triggers when the On Purchase Item Succeeded.
On Purchase Error - Triggers when the On Purchase Item Failed.
Redeem Coupon
On Redeem Success - Triggers when the On Redeem Coupon Succeeded.
On Redeem Error - Triggers when the On Redeem Coupon Failed.
On Coupon Already Redeemed - Triggers when the Coupon Code is already redeemed.
On Coupon Code Not Found - Triggers when the Coupon Code is not found.
For Each Received - Loops through the "Granted Items List" if "On Redeem Coupon" is successful.
Expressions
The following expression groups:
Consume Item
Purchase Item
Get User Inventory : Inventory
Get User Inventory : Virtual Currency
Redeem Code
Add User Virtual Currency
Subtract User Virtual Currency
Server Response
Request