Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • API and SDK Questions /
avatar image
Question by tairos21 · Dec 13, 2016 at 09:54 AM ·

How to use UpgradeFromItems on StartPurchase

Hello,

I'm trying to figure out what the parameter UpgradeFromItems (inside of an ItemPurchaseRequest) is for.

What I try to achieve is like a typical upgrade where you use 5 basic runes + 100 gold, and you get 1 advanced rune.

I'm using StartPurchase in order to do all in a single transaction with the server, so i can avoid interruptions by losing internet connection and causing an incomplete upgrade.

Any thoughts?

Thank you

Comment
Vovin Lonshin

People who like this

1 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Brendan · Dec 13, 2016 at 07:39 PM

It's a leftover from a previous revision of the purchasing code, and it was fairly narrow in terms of usage, as it was specific to a particular scenario. All it does is check that the number of items in the UpgradeFromItems array matches the quantity of the ItemId being purchased. What you're looking for is more of a crafting/alchemy system, which we have a backlog item for (https://community.playfab.com/idea/643/208258617-Crafting.html). Right now, you could do this using Cloud Script - get the player inventory, check that it has the items in question, then add the advanced rune and remove the basic runes+gold.

Comment
Vovin Lonshin

People who like this

1 Show 2 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image tairos21 · Dec 13, 2016 at 07:52 PM 0
Share

Yeah I had some problems with the execution time with cloudscript, but i'll check it again.

Thanks for your reply

avatar image Vovin Lonshin · Nov 21, 2020 at 04:50 PM 0
Share

any update on this? is Cloud Script still the best way to do this?

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges