Page 1 of 1

2017-11-22 udpate: custom campaigns

Posted: 22 Nov 2017, 17:35
by xbx
hello!

So there are some changes in the november update.
in the title.xml campaigns sections:

Code: Select all

	<score_context>
			<name>Platform</name>
			<maprecord_type>3</maprecord_type> <!-- 0=scoreasc, 1=scoredsc, 2=time, 3=respawns -->
			<medals_enabled>true</medals_enabled>
			<compute_medals_from_maprecord>false</compute_medals_from_maprecord>  <!-- only available for maprecord_type=2, other modes must use scripted medals via Solo_SetNewRecord() -->
			<author_medals_enabled>false</author_medals_enabled>
			<skillpoints_enabled>true</skillpoints_enabled>
	</score_context>
	<campaign num="2">
			<playlist name=""/>
			<mode name="PlatformSolo"/>
			<score_context>Platform</score_context>
			<official_record_enabled>true</official_record_enabled>
			<maps folder="PlatformTMUF\"/>
	</campaign>				
  • It is now possible to specify a mode name per campaign, which will override the general "solo" mode.
  • There's a 'disable_unlock_system' if you want to make custom menus and not be limited by the old unlock rules
  • 'compute_medals_from_maprecord' is now forced to false if 'maprecord_type' is not 2. (other modes must use scripted medals via Solo_SetNewRecord() )
  • In addition bugs when using multiple campaigns with different score contexts have been fixed.

Re: 2017-11-22 udpate: custom campaigns

Posted: 22 Nov 2017, 17:43
by xbx
In addition I was looking at the 'TM2 United Forever' title by adamkooo, and here are a few things I stumbled upon:
  • If using url='#campaign=PlatformA1@TM2UF@adamkooo' to start a map, pay attention that the map is searched by name from the campaigns. If the map is duplicated in several campaign folders it may not use the one you expect.
  • The title displays the maps in a fully custom manialink, with a explicit list of the maps. If this menu list doesn't match the files in the campaign folder (say, the menu displays MapA1, MapA2, .... whereas there's a MapA0 in the campaign folder) when trying to load 'MapA1' it will say that the map is locked: because it's the second map in the series.
  • the CScoreMgr API is 'not perfect'... The UserId arguemnt to most functions is not the 'LocalUser.Id'. (it's a left over from the TM Turbo console version) Just use NullId...

    Code: Select all

    declare SkillPoints = ScoreMgr.Campaign_GetSkillPoints(NullId, DataFileMgr.Campaigns[0].CampaignId);
    Or to get the Medals of some map:

    Code: Select all

    		declare Campaign0  = DataFileMgr.Campaigns[0];
    		declare Map5 = Campaign0.MapGroups[0].MapInfos[4];
    		declare NbMedals = ScoreMgr.Map_GetMultiAsyncLevel(NullId, Map5.MapUid, Campaign0.ScoreContext);
    		log("medals on " ^ Map5 .Name ^ ": " ^ NbMedals ^ ", unlocked? = " ^ Map5.Unlocked);
    
  • Pay attention that ScoreMgr is not available when a manialink page is open 'out of context' in the manialinkbrowser. It must be the main menu page or a layer of the CManiaAppTitle.

Re: 2017-11-22 udpate: custom campaigns

Posted: 22 Nov 2017, 19:08
by Miss
Thanks for the detailed information! :thx:

Re: 2017-11-22 udpate: custom campaigns

Posted: 22 Nov 2017, 20:02
by Dommy
This can definitely help bringing back Invasion solo compaign. :thumbsup:

Re: 2017-11-22 udpate: custom campaigns

Posted: 22 Nov 2017, 20:24
by xbx
Dommy wrote: 22 Nov 2017, 20:02 This can definitely help bringing back Invasion solo compaign. :thumbsup:
?
The old MP3 invasion title stills works perfectly for me.
(I use it all the time to test the game!)

Re: 2017-11-22 udpate: custom campaigns

Posted: 22 Nov 2017, 20:57
by Florenzius
Thank you for updating! We got green lights to make our platform mode work!

Re: 2017-11-22 udpate: custom campaigns

Posted: 23 Nov 2017, 07:09
by adamkooo2
Many thanks :thx: :thumbsup: :yes:

Re: 2017-11-22 udpate: custom campaigns

Posted: 23 Nov 2017, 17:59
by Dommy
xbx wrote: 22 Nov 2017, 20:24
Dommy wrote: 22 Nov 2017, 20:02 This can definitely help bringing back Invasion solo compaign. :thumbsup:
?
The old MP3 invasion title stills works perfectly for me.
(I use it all the time to test the game!)
Good to hear it's useful :lol:

Although, I was speaking about including Invasion's solo mode in Galaxy title pack, which features scripted menus.