question

james-1 avatar image
james-1 asked

Any recommended best practices to limit availability of store items based when a player has already purchased?

I'm implementing a one-time starter bundle and a monthly membership in our cash shop and wondering if there is a recommended way to limit these items appearing in the cash shop when the user has purchased each respective them.

For the starter bundle, we only want it to appear when the user has not purchased it.

For the membership, we only want it to appear when a membership is not active.

I implemented the membership to use a hidden inventory item with a 30-day consumable time. I plan on adding logic to simply hide the membership item in the cash shop when this hidden item is in the inventory; unless there is a cleaner way to implement this in the store configuration.

Is there a better way to implement showing the starter bundle only to users who have not already purchased it than to have the client simply show/hide? I need to limit the user to only one purchase of the starter bundle.

Thanks,

James

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

There are a few ways you could approach this. The most effective, long-term, would be to use a Segment, either by using a statistic or a tag to indicate that they player made this purchase. That would mean that you have a segment for those users which you could act upon for any other purpose, but also that you could then return a different store when the player requests one, using the segment overrides.

So, the steps would be:

1. Set up a Rule (Automation->Rules) which fires when the event is player_inventory_item_added and the ItemId in the event is your starter pack item. The Action for it would be to increment a player statistic which you use to track that this purchase is complete.

2. Set up a segment (Players->Segments) for users who have purchased the starter pack, with the condition being that the stat is greater than zero.

3. In your Economy->{Catalog}->Stores, set up two stores - one with the starter pack (we'll call it "basic") and one without ("advanced"). In the definition of the "basic" store, set the segment override for the segment you defined above to "advanced".

4. Query for the "basic" store from the client. You'll get back the one with the starter pack if they've never purchased one, and the one without the starter pack if you have.

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.