question

matth avatar image
matth asked

Trading between characters

We are managing all inventory items on characters, but the trading API doesn't support trading between characters. I was planning on transferring the items from character to player account before the trade, but this has to be done individually for each item. Is there a better solution for this if our trades can be up to 4 items for each player?

What is the time frame on any sort of trading API update? Will there be a better way to monitor incoming trades, or a way to trade between characters?

Player InventoryTradingCharacters
1 comment
10 |1200

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

matth avatar image matth commented ·

Sure, I'll post on there. I was attempting to move the items to each player account, and then do the trade, then move the items back to the characters. However it seems that the trading API doesn't keep the instance ID the same after the trade? Is it even the same instance of the item after it has been traded, and if so how can we track this new instance ID from the TradeInfo? We would like to keep the same item instance as it can have custom data on it.

-1 Like -1 ·

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Edited:

No, the Trading feature is not supported for characters, a straightforward solution for your case would be that PlayFab natively supports such feature, you can make a feature request about it here, more votes from other users can help with the priority. And, the MoveItemToCharacterFromUser & MoveItemToUserFromCharacter API only supports moving one item at a time, moving multiple items at a time is not supported.

Actually, you can just revoke items from one character and grant the same items (including add exactly the same custom data) to another and to simulate the trading process.

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.

matth avatar image matth commented ·

The instanceID doesn't matter but the custom item data does, and it doesn't seem like the trading api keeps the same instanceID? How would I get the new instanceID from the trade callback?

0 Likes 0 ·
matth avatar image matth commented ·

Sure, I'll post on there. I was attempting to move the items to each player account, and then do the trade, then move the items back to the characters. However it seems that the trading API doesn't keep the instance ID the same after the trade? Is it even the same instance of the item after it has been traded, and if so how can we track this new instance ID from the TradeInfo? We would like to keep the same item instance as it can have custom data on it.

0 Likes 0 ·
Citrus Yan avatar image Citrus Yan matth commented ·

Sorry for the confusion made earlier, and yes, you're right, trading APIs dose not keep the same instance ID after the trade, however custom data are the same though. If you need to track the new instance id, you might need to get it from GetUserInventory or the "player_inventory_item_added" event.

BTW, As I see it, revoke & grant items seems much simpler.

0 Likes 0 ·
Good Guy avatar image Good Guy Citrus Yan commented ·

@Citrus Yan

When you say "custom data are the same", are you saying with absolute certainty that if PlayerA has an Item with MODIFIED Custom Data and trades that Item to PlayerB, PlayerB will receive the Item with the MODIFIED CustomData instead of the Catalog Item base Custom Data?

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.