Forum Discussion

Virtuallyz's avatar
Virtuallyz
Partner
1 month ago
Solved

Is there a limit on the numbers of entitlements a player can get?

Hello,

Is there a limit on the numbers of entitlements a player can get?

Not asking about the quantities but about the SKU.
We are making a game in which we would like to sell skins, but unfortunately, it seems that after the 20th purchase (by purchase, read "grantItemToPlayer"), the 21st is "overwriting" the 1st, making a kind of rotation of purchased items.

Is that an intended effect?

Has "getPlayerEntitlements" a pagination system to use?

Thanks :)
Sylafrs (@Virtuallyz)

 

  • Hello :)

    I ended up using an additional player variable that contains a string (well.. an object containing a string) which is a BigInt representating a binary mask of every purchasable item.

    For example, having the number 22 would mean having item number 2, 3 and 5.
    .....we have ~100 purchasable items x)

    I used a player variable because using the entitlements quantity for that scared me a little.

    When the player enters the world, I check the entitlements and this variable to make a list, if there is an entitlement but the bit of the variable is 0, I update it.
    When the player buys something, we grant the item and we set the variable

    This works well.. unless the variables are not secured.

    Can those variable be resetted by Horizon or the player itself?
    If so, we might want to check for another solution :/

    It seems the currencies and EXP are also setted in player variables for now, so we might change that as well if it's not secure.

    Note: we call "playervariables" those in the persistent storage

8 Replies

  • It's not pagination: items are placed back into the shop! :O

    Items that were bought are lost :O

    Is there a way to change this limit? Is there any other way we can implement the feature?

  • Honestly, I don't know if the question has ever been asked. I don't know of any documented limited. but if that's the behavior you're seeing then it seems pretty definitive. Probably never been challenged.

    • Virtuallyz's avatar
      Virtuallyz
      Partner

      meh :/

      In that case I'll try to use the quantity as a mask and see if it works; since we do not consume. (tomorrow)

      If this doesn't work, well.. that's a big problem, I guess ^^'

    • Virtuallyz's avatar
      Virtuallyz
      Partner

      Also: is there a place we can report this kind of problematic behaviour so devs can try and fix the issue?

      • KevinJardine's avatar
        KevinJardine
        Member

        There is an option in the desktop editor main menu to report issues.

  • Hello :)

    I ended up using an additional player variable that contains a string (well.. an object containing a string) which is a BigInt representating a binary mask of every purchasable item.

    For example, having the number 22 would mean having item number 2, 3 and 5.
    .....we have ~100 purchasable items x)

    I used a player variable because using the entitlements quantity for that scared me a little.

    When the player enters the world, I check the entitlements and this variable to make a list, if there is an entitlement but the bit of the variable is 0, I update it.
    When the player buys something, we grant the item and we set the variable

    This works well.. unless the variables are not secured.

    Can those variable be resetted by Horizon or the player itself?
    If so, we might want to check for another solution :/

    It seems the currencies and EXP are also setted in player variables for now, so we might change that as well if it's not secure.

    Note: we call "playervariables" those in the persistent storage

    • Virtuallyz's avatar
      Virtuallyz
      Partner

      If the entitlements limit is ever removed, I'll be able to repopulate the granted Items using the player variable if we stick to this solution.