Leaderboard Reward

Hi, from reading the docs only difference between leaderboard and tournament is you need to join before posting records on tournament while on leaderboard you don’t need to do that, also on tournament you could limit the participant

If I want to make a leaderboard that give reward each time the leaderboard reset that means I need to hook the distributing reward logic on

nk.register_leaderboard_reset()

If I save the reward on the leaderboard metadata when I’m creating it, how do I get those saved metadata when the leaderboard resets in order to distribute the reward? Or in general storing it in metadata won’t works?

we’d like to also know on client side the rewards for the leaderboard if somehow client could query it

nk.register_leaderboard_reset() receives a function with (ctx, payload, reset) signature, where the payload will be the resetted leaderboard table - you can access the metadata with payload.metadata within your function.

1 Like

@sesposito Thanks! in general where do I find the documentation of what is inside the payload of that functions? I cant seem to find it on https://heroiclabs.com/docs/runtime-code-function-reference/index.html