question

Oleksii avatar image
Oleksii asked

Craft System,Crafting system

I'm trying to figure it out the proper way of how to create items crafting system with recipes. I found few different solutions of how to do this. But maybe sytem was updatesd and there are any other way hot to realize this. So i need to convert few items into another item with and user have to spend the time to craft. Thank You for help!

In-Game Economy
2 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.

Seth Du avatar image Seth Du ♦ commented ·

The normal crafting system can be realized by Cloud Script/Azure Function, but I want to know more details about this scenario so that we can provide a good workaround solution.

"User have to spend the time to craft" -- May I ask how long does the process take? Is the time varied or fixed? Should this crafting process be always foreground, or is it like a background task?

0 Likes 0 ·
Oleksii avatar image Oleksii Seth Du ♦ commented ·

Thank you, for response. "May I ask how long does the process take?" - Depends on item, first items 1-3 minutes, the last more then 24 hours, it should be like background task and player have to be able to reduce crafting time by spending Hard Currency

0 Likes 0 ·
Seth Du avatar image
Seth Du answered

I’ve come up with a workaround solution for you, feel free to let me know if there are any questions.

  • All the items, including components and finished products, should be simply stored in the player’s inventory.
  • The composting/crafting formula should be both stored at the client side and PlayFab side. (in Title data or as a fixed dictionary variable in Cloud Script/Azure Function)
  • The player will select components items and VC, then clicks a UI button to “craft”, which will call a Cloud Script/Azure Function. The item instance IDs, VC types and quantities will be sent to the function as parameters. In the meantime, the client will create a local timer.
  • The function will first check the crafting formula to confirm this request is valid.
  • If valid, the cloud script will remove items and subtract VC for players, and record a timestamp. Those data will be processed as a JSON/object log for storage in Player Read-only Data.
  • When the local timer is done, the player can click a UI button to “get” the item, which is also calling a Cloud Script/Azure Function, where timestamp will be checked and required items will be granted if valid. Then remove the log in Player Read-only data.

It is the basic idea, of course, you may modify this solution according to your requirement, and you may also add a “cancellation” feature as you want.

10 |1200

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

duartedd avatar image
duartedd answered

you guys should actually have a timers section, currently the method with VC being as a timer is an ok workaround at best...and ive already maxed out my VC allowed so I have to come up with a diff solution or just not user a timer that is not client controlled

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.