question

HitRock Games avatar image
HitRock Games asked

Battle Pass based on Economy v2

I thought about how to create a Battle Pass like in the game Brawl Stars. For example, the Battle Pass contains 70 levels. Each level contains 2 rewards. One is free, the other is for those who bought the Battle Pass.

1) We create a bundle for each reward. The bundle contains an item or currency. 70 levels * 2 rewards = 140 bundles. Mark them with the tag "BattlePassSeason1".

2) Added a currency that is used to level up the Battle Pass - "Tokens" for example or "TokensSeason1". Tokens are earned for completing quests. Each new season starts with 0 tokens.

3) When the player opens the reward, we make three checks: a) does the player own the Battle Pass? b) does the player have enough tokens? c) has the player already received this reward?

But how to store a list of already received rewards?

I'm thinking about an array in player Objects. Array with 140 elements: [1,1,0,1,0,0,0.....] (1 - reward is open). And every new season of the Battle Pass reset the values in this array. Is this a bad solution?

5441-screenshot-20230130-163414975.jpg

In-Game EconomyPlayer Inventory
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gosen Gao avatar image
Gosen Gao answered

I think the array should work. Maybe you should store this array in User Read Only Data, since this array should not be modified by the client. Players can access User Read Only Data, but only server can modify it. Refer to Player Data.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

drallcom3 avatar image
drallcom3 answered

But how to store a list of already received rewards?

You could also add another currency that reflects the TokensSeason1 spent. Should be simple, now that v2 allows practically unlimited currencies.
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.