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.