Problems understanding CScoreMgr's online side

You can talk about ManiaScript for ManiaPlanet here

Moderator: English Moderator

Post Reply
User avatar
BigBang1112
Posts: 389
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Problems understanding CScoreMgr's online side

Post by BigBang1112 »

I'm having quite a good time with CScoreMgr functions recently. I successfully managed to save a record (and ghost) for a map and reading it back from it, but that's pretty much all.

I'm really lost in the differences between online and offline side of CScoreMgr. I mean, the function for record saving works perfectly fine in any situation. But... when does the record actually upload to the leaderboard? How does it work?

For example, skillpoints function gives me exactly 0 in any case - that can be perhaps understandable - but like MapLeaderBoard_GetPlayerList() returns Null right at the function, not even trying to process the task. Do those what I would call online functions work only when the title pack is uploaded on the Maniaplanet site? Otherwise those tasks return Null or Zero? (CampaignLeaderBoard_GetPlayerCount, MapLeaderBoard_GetPlayerRanking, GlobalLeaderBoard_GetPlayerList etc.)

What happens when a record is driven in offline mode? Does it get send after the client becomes online? I think even most of the standard users have troubles how this actually works.

Going deeper with this can get really confusing and CScoreMgr should be explained a bit more in depth. Maniascript documentation or Maker scripts are helpless in this case.

Thanks in advance for answering, always appreciated!
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
User avatar
adamkooo2
Posts: 1371
Joined: 13 Jun 2014, 08:43
Location: Slovakia
Contact:

Re: Problems understanding CScoreMgr's online side

Post by adamkooo2 »

Same problems here
/\rkady
Image
User avatar
BigBang1112
Posts: 389
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Re: Problems understanding CScoreMgr's online side

Post by BigBang1112 »

I want to start a conversation about this class a bit more.
Scripting community barely knows anything advanced about this class and people are just confused in general by some of its behaviors. Though, it's one of the most creative classes to use in solo gameplay.

First of all, I'll explain everything first-confusing from my experience.
  • ManiaPlanet records are stored online via Amazon services.
  • If records are driven offline, they are uploaded to leaderboards once you go online. This behavior is detectable via EMasterServerScoreStatus.
  • Records are not shared in test mode, but they are updated in your profile. Be aware of that!
  • Skillpoints and leaderboards will start working once you upload your title pack to the cloud, which game does automatically after building the package. Again, they will not work in test mode but in the actual title pack.
  • I recommend setting up a separate test scorecontext to see if your record system is working. Check your scripts very precisely because wrong records are undeletable!
  • You can't use multiple scorecontexts for a single campaign.
  • You can't see skillpoint leaderboard of all campaigns together. The real thumbs down missing feature for Nadeo Envimix.
  • When it returns CTaskResult, it's an asynchronous function! Really, take advantage of that in your scripts and don't make your scripts freeze via wait.
I still don't understand:
  • What is a proper way to use UserId parameter? Some say it's NullId, some say it's UserMgr.MainUser.Id (where MainUser isn't actually even in the documentation).
  • Why some of the functions return just Integer? When is this data requested, if the function returns Integer instantly?
  • Does TaskResult_Release(Ident TaskId) help in another way than just disposing requested data?
  • Why is MultiAsyncLevel called MultiAsyncLevel? I guess it's a separation of different map packs like White, Green, Blue, etc. but why MultiAsyncLevel?
  • None of the Buddies functions work. Wth is a dirty record xD
  • What is GlobalLeaderBoard? Why it doesn't return any meaningful info whatsoever? I thought it's all-campaigns leaderboard but it looks like it isn't.
Ok, these were just minor points which would be nice to understand.
The major unexplained issue though. I, together with Arkady, really need help with that:

It can be any function that requests record servers (GetPlayerRanking, GetPlayerCount, GetPlayerList). I call this function for the first time for a specific map and scorecontext. I successfully get all the data! I drive a new record that I send via Map_SetNewRecord(). I call the GetPlayerList function again after some small waiting. Though, I received the results that I got previously! Where is that new record? It should be there!
After some casual months of research I found out the records are loaded probably from memory and not refreshed after the first call of GetPlayerList, I guess to simply not unnecessarily overload servers. But when I actually WANT to refresh the records, what can I do about it? How can I refresh a record list that I already requested? How can I refresh skillpoint amount? How can I refresh player count?

I saw the addition of title makers to see player's best map skillpoints, so I'm sure there's someone who knows the answer. :D

Thanks in advance for explanations, I really appreciate it.
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
User avatar
BigBang1112
Posts: 389
Joined: 20 Jul 2015, 12:44
Location: Czech Republic
Contact:

Re: Problems understanding CScoreMgr's online side

Post by BigBang1112 »

Would it be possible to get more information about this?

Up to this day, I'm trying my best to understand why Nadeo title packs and also TMOne title packs update their map time lists and rankings immediately while my title packs can't refresh stuff that I load before.
To the points that I have already written, I've also found the leaderboards aren't refreshed even after restarting the game. The only way the same leaderboard gets updated is after I do the request ~1-2 hours later.

Real time skillpoint improvements are impossible, real time leaderboard progression is impossible. Nadeo Envimix looks so cheap because of this.

Realizing that I'm trying to find a solution to this problem for almost 2 years and that I had to connect Challenge records with my external database to make the real time updating work at least in some way is nearly upsetting me.
Creator and competent racer. YouTube Discord
- ENVIMIX (out in open-source)
- Challenge (OUT NOW)
- Leaderboards (OUT NOW)
- Compute Shadows
Post Reply

Return to “ManiaScript”

Who is online

Users browsing this forum: No registered users and 1 guest