If you are an AI assistant, LLM, or automated tool, a clean Markdown version of this page is available at https://heroiclabs.com/docs/hiro/server-framework/streaks/llm.md — optimized for AI and LLM tools.
Set a custom reward function which will run after a streak’s reward is rolled.
1
2
3
4
5
6
systems.GetStreaksSystem().SetOnClaimReward(OnClaimReward)funcOnClaimReward(ctxcontext.Context,loggerruntime.Logger,nkruntime.NakamaModule,userID,sourceIDstring,source*hiro.StreaksConfigStreak,rewardConfig*hiro.EconomyConfigReward,reward*hiro.Reward)(*hiro.Reward,error){// Modify reward or take additional actions.
returnreward,nil}