Maybe I am not understanding well the system but for example if you watch an ad you usually receive a callback response from the SDK you are using to indicate that the economic reward is being granted so you can now reward your users.
@SamFashionLeague Most Ad mediation services support server-side callbacks when Ad watches are completed and Hiro provides a fallback mechanism as well for when some Ad networks do not report the callback (i.e. Admob).
when finishing a certain level in game for example beating a boss (not linked to any reward or monetisation system)
I assume this would be an interstitial Ad which shows at the end of the level. You would show the Ad via the mediation SDK and then inside its callback you could call:
await economySystem.PollPlacementStatusAsync("someAdPlacementId");
when cheating for dev (there is a way by just modifying the storage manually but not handy for non-tech people)
You shouldn’t never need to manually update any storage objects which are created by Hiro in the gameplay systems. If you want to just grant energy to the player from some debug UI on the client you can use:
await energySys.GrantAsync(...);
I would assume needs to be instant otherwise we are losing a lot but then how is this done?
Reward grants are always instant, you may need to refresh the gameplay system’s state but if you have an observer registered you’ll get a “signal” for when the response produced a state change:
SystemObserver<EnergiesSystem>.Create(energiesSystem, system =>
{
// Update game UI.
});
when daily login award.
With a daily reward I’d just define an achievement which can grant it and resets each day:
{
"achievements": {
"daily_reward": {
"name": "Daily Reward",
"description": "Login for the first time today.",
"category": "daily",
"count": 0,
"max_count": 1,
"reset_cronexpr": "0 0 * * *",
"reward": {
"guaranteed": {
"energies": {
"lives": {
"min": 5
}
}
}
}
},
// ...
}
}