question

pleasehelpme avatar image
pleasehelpme asked

Need a lot of inventory spaces. Is there another method other then the regular method?

Hello, I am creating a game that is a collection of stories. You will be able to customize your characters and collect items. So for example if I were to have 50 clothing options and 50 items per story. Then the total catalog item is 100 as well as 100 inventory item if the player collects everything.

While I don't expect to hit the 1500 Inventory item limit for the paid tier anytime soon I am thinking for the future. So using the above example I would hit 1500 inventory items in 15 stories. If a player plays the 16th story then they would be capped at 1500 items and wouldn't be able to do anything. Thus my catalog items must = the available amount of inventory items limit.

I have been looking at alternatives but would like to ask the community on how I would accommodate for this situation. I have been looking at Custom Data inside of items and I think that this could be a solution. So instead of having each story take up 100 inventory items I could have 1 single item called "Story 1" with 100 Custom Datas for ex: Shirt_01=, Shirt_02=, Item_01=, Item_02=.

Is this a viable solution? I do not know how much custom data can be placed inside of an item and how I would be capped by this. Additionally, as far as I can tell Item's Custom Data can only be edited with a Server API with UpdateUserInventoryItemCustomData. If I am correct can I be pointed in the right direction on how I can set up my server with PlayFab to make Server API calls.

Thank you!

4 comments
10 |1200

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

pixelsage avatar image pixelsage commented ·

I'm not here to recommend a solution (not really a programmer), but keep in mind that there's also a limit on Player data value size (300,000 bytes, or .3MB). Make sure you don't hit that limit either!

0 Likes 0 ·
pleasehelpme avatar image pleasehelpme pixelsage commented ·

Now that I look at what you stated I see that I only have 1,000 bytes (1KB) of Catalog item custom data size which isn't much. However, that's enough for 99.9% of games but I will have to find another solution to this.

0 Likes 0 ·
pixelsage avatar image pixelsage pleasehelpme commented ·

Yeah, my game is potentially running into some limit issues too, but @Brendan did mention that there's a sort of Economy system update coming later this year that I'm looking forward to.

0 Likes 0 ·
Show more comments

1 Answer

·
Hernando avatar image
Hernando answered

It seems to be a feasible solution for your scenario, but be aware of the limit of key size, value size and the number of key/value pairs which may be updated in a single request(more information you can see in [Setting]->[Limits] page). You can update the custom inventory instance data via calling Server API UpdateUserInventoryItemCustomData in CloudScript or update it in GameManager manually.

Besides, the catalog provides a lot of features that make it easy to build and operate your game and is more secure, so it is always our preferred solution. If you insist on doing this, you need to be careful to do some checks before the cloudscript calls the Server API to avoid the player cheating.

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.