question

xenonfoxnz avatar image
xenonfoxnz asked

Inventories - Moving items to non player objects

Hi there,

Part of my requirements for my game is to be able to move inventory items to world objects such as vehicles and player owned properties/containers. I realise that this probably isn't possible yet with the current API however, my plan would be to hold that information on a local persistent database with the same item properties as PlayFab requires. I imagine this should allow me to transfer items back and forth at the loss of being able to track those items through PlayFab when they're not currently on a player.

In order to do this, I understand that I would need to remove the item from the player and parse it over to the persistent world DB. My ultimate question here is that if I was to do this and save the unique playfab ID for that item, would I be able to reuse the 'ItemInstanceId' should the player "withdraw/take" the item back from their vehicle or property and back into the PlayFab inventory? Should this method cause any other unforeseen issues?

Cheers

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

·
brendan avatar image
brendan answered

The item instances are really only applicable to items on player accounts. When you're representing this data as belonging to some generic entity in the game world, that's not really the same thing. So you wouldn't be transferring an item instance between player and non-player entities. What I would recommend is just storing the key information about the item in your virtual world structures, and granting the appropriate items to the player when you need to.

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.