[Bug?] Records not saving in AscendingScore context
Posted: 11 Nov 2019, 08:19
I'm currently trying to make a point-based campaign in TM, where the best player is determined by their points score. However, I encountered a problem while setting the player's new record.
I have tested both in title edit mode and compiled title, results are the same. My title right now has one campaign with one map. In ManiaPlanetTitle.xml the solo section looks like this:
Note that I replaced some specific word here with "New" to keep my new project somewhat hidden from public for now.
I start my map using PlayMap(Text Map, Text Mode, Text SettingsXml). Synchronisation status seems to be okay:
When I drive the first run, I try to save the new record using this method:
I assume the campaign uses Score instead of Time when context is set to type 0 (ascending scores). CTmResult of the ghost looks as follows:
However, instead of saving a record I am greeted by this message after calling the method (the error message):
To see how my record looks like now, I call a few functions and they return this data:
In conclusion, it looks like the "ascending score" campaigns are not working properly right now since I can't get my mode to set a new record and my online record is always -1. Would be welcome if this could get patched.
Bonus question:
Is it possible to use this campaign system in ShootMania? In theory, Playground_GetPlayerGhost should work with CSmPlayer and the CTmResult of the ghost can be edited to contain the information required for the online records.
I have tested both in title edit mode and compiled title, results are the same. My title right now has one campaign with one map. In ManiaPlanetTitle.xml the solo section looks like this:
Code: Select all
<score_context>
<name>NewSoloCampaign</name>
<maprecord_type>0</maprecord_type>
<medals_enabled>true</medals_enabled>
<compute_medals_from_maprecord>false</compute_medals_from_maprecord>
<author_medals_enabled>true</author_medals_enabled>
<skillpoints_enabled>true</skillpoints_enabled>
</score_context>
<campaign num="0">
<playlist name=""/>
<mode name=""/>
<score_context>NewSoloCampaign</score_context>
<official_record_enabled>true</official_record_enabled>
<disable_unlock_system>true</disable_unlock_system>
<maps folder="Campaigns\New\"/>
</campaign>
I start my map using PlayMap(Text Map, Text Mode, Text SettingsXml). Synchronisation status seems to be okay:
Code: Select all
::ELocalScoreStatus::Loaded
::EMasterServerScoreStatus::Synchronized
Code: Select all
declare Ghost = ScoreMgr.Playground_GetPlayerGhost(Event.Player);
declare NewRecordTask = ScoreMgr.Map_SetNewRecord(NullId, Map.MapInfo.MapUid, "NewSoloCampaign", Ghost);
wait(!NewRecordTask.IsProcessing);
if (NewRecordTask.ErrorCode != "") log(NewRecordTask.ErrorCode^": "^NewRecordTask.ErrorDescription);
Code: Select all
== CNod ==
Ident Id NullId
== CTmResult ==
Integer Time 23089
Integer Score 83
Integer NbRespawns 0
Integer[] Checkpoints [9750, 23089]
Code: Select all
Unexpected: Previous record is best than this one.
Code: Select all
ScoreMgr.Map_GetRecord(NullId, Map.MapInfo.MapUid, "NewSoloCampaign");
// Record is -1
ScoreMgr.Map_GetRecordGhost(NullId, Map.MapInfo.MapUid, "NewSoloCampaign");
// Ghost is Null
ScoreMgr.Map_GetSkillPoints(NullId, Map.MapInfo.MapUid, "NewSoloCampaign");
// SP are 0
ScoreMgr.MapLeaderBoard_GetPlayerRanking(NullId, Map.MapInfo.MapUid, "NewSoloCampaign", "World");
// My rank is 1st
ScoreMgr.MapLeaderBoard_GetPlayerCount(Map.MapInfo.MapUid, "NewSoloCampaign", "World");
// 1 player on record
Bonus question:
Is it possible to use this campaign system in ShootMania? In theory, Playground_GetPlayerGhost should work with CSmPlayer and the CTmResult of the ghost can be edited to contain the information required for the online records.