https://metaplay.io logo
I asked metaplay chatGPT this:
# questions-and-feedback
d
"is it possible to create in game offer or offer group that will be purchased with in game currency?" as a response it gave following
Copy code
Yes, this is possible, but it depends on how you've implemented your offers.

Metaplay's offer and offer group systems are data-driven and primarily define:

what is being sold,
when it is available,
who can see it,
purchase limits,
targeting, scheduling, etc.
The framework itself does not require every offer to be purchased via an app store IAP. While the built-in cookbook focuses on real-money purchases and receipt validation, the offer system is extensible and can support other payment methods through your own game logic.
I do not see anywhere in the documentation how to change offers to not require IAP but it would be very useful to be able to utilize the system for use with in game store. Is there a way to do that? is there a guide how to do that?
j
The currently shipped version requires IAP in order to trigger the Offer flow. Soft-currency offers are something we have been considering but just haven't implemented yet. (One unresolved issue is that should we represent the soft-currency cost with some general Game Config system, or require game to add some "provider" maybe in the form of inheriting some Base Action for offer purchases...) That's enough history for now. Attached a quick workaround by triggering the Offer flow manually from an action. Throw in your custom cost on the places marked with TODO and then execute the action. The caveats are that 1) I didn't test this but should work and 2) The API might change in the next release.
Hmm, the example is not enough actually. So what we also need is In custom MetaOfferInfo-derived class (say, MyOfferInfo), you need to mark
RequireInAppProduct
explicitly as false (and you can add your soft currency cost members here ):
Copy code
// TODO: SOFT CURRENCY MEMBERS

// Don't enforce IAP requirement, we have custom non-IAP offers as well
public override bool RequireInAppProduct => false;
Also there example PlayerPurchaseSoftCurrencyMetaOffer given previously was missing the reward granting. Fixed version attached https://cdn.discordapp.com/attachments/1521442249022373958/1521464303738425364/sketch-soft-currency-offer-action.cs?ex=6a44ed8d&is=6a439c0d&hm=b63636a4016737661f3811b3ad010a8375ebe664afb5dab71027e85af6e0bebd&
d
Thank you that will be of great help
8 Views