Account Balances

Experimental - Customers are encouraged to test and use this feature in their experiences, but it may still require some additional support

Overview

The ability to read and write to things in your collection that can be polled for a number, this can be used for Balances and Currencies and could also be used for the following: - Metagame such as XP, Ranks, High Scores - Consumables, such as potions - Achievement amounts

Integration

The currency system currently supports two types of currencies, the online and the offline. Any online currencies should persist in a players collection and in turn persist over deployments and events. Offline mode doesn't need to interact with the users collection and so does not persist but can be used for one time currencies or point systems.

Creating a currency

Creating a currency is simple, you just need to create a new asset type in the PDAs/Currencies folder, in a world-builder project if it doesn't exist then create that folder too.

Once that has been created you can open this up and fill in the details that you want. If you want this to be an "online" currency then tick the IsCollectionCurrency check box. You will also need to fill in DataSourceId and ObjectId refer to the Online Mode section to see where to get those details. If you are making an offline currency then just leave those 3 things blank.

Online Mode

Online currencies currently need to be setup by our platform team, so reach out to your Support Engineer if you wish to do this.

For a currency to be online we need to setup the object definition in the back end. This will be tagged with the word "Currency" to be used in the currency system.

Offline Mode

For an offline currency there isn't much else to it just set it up as above and you should start being able to start using it!

How to enable

By default if you inherit from the BPM_M2_BasePlayerCharacter your player will already have a wallet component attached to them.

To interact with the players wallet you will want to go through the J_CurrencySubsystem this will give you everything you need to, get, give and take currency from the players wallet. Examples of each of those can be seen below. Getting a currency can be done on a client but giving or taking must be done from the server.

Note: Currently due to limitation of the collection system, getting a currency can only be done on the client if it is an online currency.

Last updated