Hi folks,
brainCloud 6 with brainBot is now live!
(https://updates.braincloudservers.com/braincloud-6.0-with-brainbot-is-here-1x54Sk)
Thoughts on brainBot - or the new features in general?
We're eager to hear what you think!
Paul.
Hi folks,
brainCloud 6 with brainBot is now live!
(https://updates.braincloudservers.com/braincloud-6.0-with-brainbot-is-here-1x54Sk)
Thoughts on brainBot - or the new features in general?
We're eager to hear what you think!
Paul.
Hi @gyutaelee,
Thanks for the follow-ups. Here are answers to your three new questions:
A1: Right now, pagination for GetSocialLeaderboard (or other social leaderboard APIs) is not supported, and adding it would be a non-trivial server-side change, not a quick configuration tweak. It’s something we’d like to improve, but it’s not on the short-term roadmap at the moment.
A2: Raising maxMultipleLeaderboardScoreLimit to 100
The maxMultipleLeaderboardScoreLimit value is configurable on a per-app basis, with a default of 10. We do try to keep this value low because GetMultiSocialLeaderboard is quite expensive on the server, but for your use case we should be able to bump it to 20 for your app so you can safely call GetMultiSocialLeaderboard([leaderboardId], 20, replaceName). We’re not normally bumping this limit to 100, but 20 is reasonable. If you’d like us to do that, just let us know your appId and we can review and apply the change.
A3: Getting only the current player’s rank/score in their friends leaderboard**
There’s no dedicated API currently that returns just “my rank among my friends” in a single call. However, you can get both the top list and your “my rank” context in one call using GetMultiSocialLeaderboard with a single leaderboardId and a leaderboardResultCount set to your truncated top‑N (e.g., 50 or 20). The response includes a selfIndex field computed server-side:
selfIndex is their rank (0-based).selfIndex is -1, and you can show something like “Your rank: > N” in the UI.All fields are editable during the cloning step, and the Code field is also editable there. I’m not sure why it’s looking like the Code field isn’t editable for you, it should work the same whether it’s under or over the 12‑character limit.
Hi @gyutaelee - this has been done!
Hi @gyutaelee,
Thanks for the follow-up. Based on the current behavior, the “first 2 API calls are free” allowance is applied across the whole request chain, not separately for the Pre-hook and the original CloudCode script. In other words, internal bridge.callAPI() usage from both executions shares the same allowance for that request/session.
So if the Pre-hook makes 1 internal API call and the original script makes 3 more, the first 2 total internal calls are free, and the remaining 2 are billed according to the normal post-free rate.
For your current version-gate use case, this does not change anything because bridge.getGlobalProperty() is not counted as an API call. But if either the Pre-hook or the original script starts using bridge.callAPI() later, the calls will pool under the same request-level allowance.
Ah - gotcha - that makes more sense!
We'll look into it.
Hi @gyutaelee ,
Are you by any chance taking an automated promotion that you had used before and just changing the dates? Or maybe changing the criteria in some other way (the xp level?)
Because that won't work. Our system keeps track of the fact that the user has participated in that promotion before - no matter what the criteria is.
I mention this because the promotion id is 6 - which of course means it was the 6th promotion ever created. I figure such a low number means you are likely re-using an existing promotion.
Just a guess though -- try creating a brand-new promotion to see if you get the same behaviour.
So you are saying that you want to be able to bulk import custom entities for a single user?
Hi @gyutaelee ,
Your approach looks good. Answers to your questions:
Well - GetGlobalLeaderboardPage() and GetGlobalLeaderboardView() return all players - not just friends. It becomes a friend leaderboard if you only put friends of the influencers on there.
For rotated leaderboards, should each shadow leaderboard use the same rotation settings as the main leaderboard?
Yes - that would make sense.
Is there a practical recommended maximum number of shadow leaderboards or mirrored score writes we should design around?
There are games in brainCloud with tens of thousands of leaderboards. Not necessarily something I think everybody should do
- but definitely supported.
Would increasing maxMultipleLeaderboardScoreLimit still only be needed for the regular top-N social leaderboard path, and should that be requested through brainCloud Support?
That is intended for "candy crush map" style usage where your show an overview map of different levels - and generally just one or two of your friends at each location on the map. It's a very expensive call for us to run server-side. We don't normally bump up that limit.
Paul.
I should clarify - the first 2 api calls are free in a script - not the first 3.
Where did you see the document with 3? [That is old - from several years ago]