Page 1 of 1
Manialink Station, Custom Menus, and Offline.
Posted: 26 Aug 2013, 23:25
by Darkminus
Hello
I'd like to know if there is a way to handle the offline case for custom title packs.
I mean that if I wanna play my title pack offline, in a LAN for example, it is not possible since it cannot load the manialink station and the custom menu, so it is not playable offline.
The same thing happens for the Manialink Station of the Elite title pack, so it's not playable offline, too...
The solution would be to load the "default" manialink station (I mean like if there was no manialink file linked) and the "default" menu.
Thanks for your answers

Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 07:17
by steeffeen
you can include the menu xml in your title pack and link it with
if you want the online version by default:
you can set a manialink as menu file that just sends a http request and then you navigate to the online link if the request completes or to the offline file if it doesn't
Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 09:13
by Darkminus
The first part is ok, I know how I can check if I'm online or not so I can load the offline manialink, but I don't know how to get my online manialink with HTTPRequest..
Do you have any example? That would be nice

Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 09:17
by steeffeen
Code: Select all
OpenLink("url", CMlScript::LinkType::Goto);

Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 10:36
by Darkminus
Haha, thanks
But... Maybe did I talk a little bit too fast. We cannot check if the user is online or not...

Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 10:51
by steeffeen
of course you can
Code: Select all
declare Request = Http.CreateGet("http://www.mysite.com/test.txt");
wait up to 1-2 sec and check if the request completed or not

Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 11:12
by spaii
if (Request.StatusCode == 12007) : user is offline

Re: Manialink Station, Custom Menus, and Offline.
Posted: 27 Aug 2013, 11:37
by steeffeen
yeah checking only "IsCompleted" wouldn't be enough of course
in my case i'm checking for the correct response
my file's content is only "okay" so it loads fast because it's small
i'm checking if the result is correct because there could also be a timeout happening and the status code is still 0
