dgupta avatar image
dgupta asked

Question about Inventory Custom Data


I asked this question as a support ticket but was referred to ask it on the forums instead.

Our game Mirablade allows for a lot of customization for people's character and weapons. For example, a sword can have a different blade, guard, and handle. Also, a sword has different colors for each blade guard and handle. It also has other stats. Similarly, a character can have a bunch of different customizations such as color outfits for different parts of the body. For this reason, our game requires a lot of key-value pairs to be stored as custom item data on each item. A sword is actually just a basic blank item that is currently only identified by it's custom data values. A character is also identified almost solely by its custom data. In fact, one character can have up to 17 custom data key-value pairs. I noticed that in the free tier the maximum updates per key-value pair are 5. To get around this, I only update 5 key value pairs of each item at once, and if I need to update more, I will call the API repeatedly for each 5 pair of items. This works, but I was wondering if the limit of the max key,value pairs stored per item custom data is also 5. If so, our game would need this increased to 20 (just to be safe) once the game is released. I was wondering what the costs for this would be.

We are planning to update our tier from free to Indie in the upcoming month, but we want to know what the total costs associated would be.

Thanks a lot,


dataPlayer 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.

1 Answer

vivecuervo7 avatar image
vivecuervo7 answered

You could always try grouping data in a string, using a specific character as a splitter so you can parse it client-side.

Sword custom data as I'm understanding you would currently have it:

Blade: Silver

Guard: Bronze

Handle: Leather

As proposed:

Customization: Silver:Bronze:Leather

And of course on the client you could have something akin to String[] data = Customization.Split(':') and you'd have an array of values, then assign Blade to data[0], Guard to data[1] and so on.

10 |1200

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

dgupta avatar image dgupta commented ·

Yeah, so the last day I spent fixing up the swords so it pretty much does exactly that. I just thought there would be an easier way maybe that wouldn't requiring programming a whole bunch more. But, I guess it can't be helped. I will do a similar thing for characters. I just wish it was better specified or I had gotten a warning before so I couldve programmed it like this from the get go.

0 Likes 0 ·
brendan avatar image brendan dgupta commented ·

Yes, the main point is that custom data on inventory item instances is fairly limited, in terms of total space. Specifically, that's because a player could have a thousand or more items. Multiply that by the total custom data required, and then by the number of players, and you start to run into serious space requirements. What we'd recommend is either optimizing your custom data to compact the information, or else storing it in player data with references to the item instance IDs.

0 Likes 0 ·

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.