question

Dylan Hunt avatar image
Dylan Hunt asked

How to handle item changes? What about item instance properties?

While making items, we're still learning things and making last-second changes.

Let's say we assign someone an item and later on need to add a custom val to it:

What would be the most efficient way to resolve this? When testing, I can just revoke and add another one back. However, let's say we're live and I want to add a new value as a new feature.

How should I handle this? What is the best way to "swap" the old item for the new in users' inventories? My best guess would be postman using pf server, but maybe the "tasks" in dash?

While I'm on the topic, I also noticed that there are individual instance properties:

How can I update these? Only via the PF dash? I was trying to think of the best way to "equip" an item. I'm leaning towards PlayerData just an "equippedWeapon / equippedArmor" prop and perhaps save the catalog id.

I'm deciding if there would be any value to edit an instance property for a similar "isEquipped" prop.

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

If the Item ID isn't changing for the item, and the value in question is global to all users, there's nothing to change. The Custom Data set on items at the catalog level is meant to be the global configuration info for items in your game, and so applied to all items.

If you mean Custom Data that's set on each player's individual item instance, or other changes to item instances, your best bet is to have an OnLogin Cloud Script handler which you call whenever the client logs in. In it, you can check for changes based upon tweaks you've made to the game (store them in Title Data, or hard-code the changes into the handler).

For custom info on the set of equipped items on a player, I would recommend using player data, yes. That way, you can have one key where you store all the info on the equipped items.

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.