How to Use Create a Custom SMBX2 Launcher Page

Share guides you have written for SMBX, and related tools here.
Horikawa Otane
Lakitu
Lakitu
Posts: 485
Joined: Sun Jan 05, 2014 2:02 am

How to Use Create a Custom SMBX2 Launcher Page

Postby Horikawa Otane » Mon Mar 21, 2016 2:34 am

So you jerks aren't using the 2.0 launcher and you should! It's fully compatible with existing 1.3.0.1 levels. All you gotta gotta do is include a new folder! :D

You can even automatically tell players when an update to your episode is out!!!!

Please feel free to ask any questions. To me, this is a key feature of 2.0 (and MUCH easier than LunaLua dev), so I'd like to heavily encourage you all to learn it.

The Basics:
  • To use the launcher for your episode, include a folder in your episode folder called "launcher"
  • You must be using the 2.0 beta for the launcher to show up, but if you include it in a 1.3.0.1 install it won't break anything
  • In this folder include the file "info.json"
  • The file info.json should say:

    Code: Select all

    {
    	"mainPage": "index.html"
    }
    
  • "mainPage" must point to the html file you'll be using for your splash page
  • Create a page using HTML, CSS, Javascript, etc. called "index.html" in your "launcher" folder. Please look at the example!
  • This will display as the splash page for your custom episode!
DOWNLOAD BASIC EXAMPLE (put in worlds folder)

Advanced (episode update alerts, two player mode, custom character names, etc):
  • So if you have an episode and you want to tell people when an update is out, this is possible with the SMBX Launcher.
    • Follow the following form in your info.json:

      Code: Select all

      {
      	"mainPage": "index.html",
      	"current-version": [1, 0, 0],
      	"update-check-website": "http://horikawaotane.pythonanywhere.com/includes/json/update.json"
      }
      
    • "current-version" takes three parameters, separated by commas, which is the version string. [1, 0, 0] represents version 1.0.0.
    • "update-check-website" takes in a parameter which is the update check url, where you will upload your latest version json.
    • Now I am hosting the file update.json on a free site called python anywhere. You'll need to find somewhere to host your own. Do so.
    • Upload a file to your file host of choice (and make sure the path matches the one in "update-check-website") and create it in the following format:

      Code: Select all

      {
      	"current-version": [1, 0, 1],
      	"update-message": "Hey howdy there Partner, thar be an update to them there episode",
      	"download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=69&t=13644"
      }
      
    • "current-version" is the latest version of your episode. In this case, I made an update, so it is [1, 0, 1]. Since the local copy is [1, 0, 0], the user will be prompted to update the game.
    • "update-message" is the message the user will see when they select your level. It will appear as a pop-up.
    • "download-url" is the place where your update is located. The user's browser will automatically open to this url when updates appear. So point this at your download/update release thread or at the full path of your patch if you like.
  • There are other options as well for the local info.json.
    • "allowedCharacters" takes in an array of numbers (unquoted) of the playable characters in your episode. 1 is Mario, 2 is Luigi, 3 is Peach, 4 is Toad, and 5 is Link.
    • "characterNames" takes in an array of names to replace the visible characters on the dropdown. For example:

      Code: Select all

      {
      	"mainPage": "index.html",
      	"characterNames": ["Demo", "Iris", "Unused1", "Unused2", "Sheath"],
      	"allowedCharacters": [1, 2, 5]
      }
      
    • "hidden", if set to true (no quotes around true), this will hide the episode from the launcher selection list. This is useful if you want to make a game out of the world map. It is generally NOT useful unless you know LunaLua and you feel comfortable manipulating the world map dynamically with it.
    • "allowTwoPlayer", if set to false (no quotes around false), will disable Two Player Mode for the episode.
    • "stars" - set it to a number (unquoted), and you can overwrite the auto-generated star count.
    • "credits" - set it to a quoted string (you can include things like \n for newlines) and it will override the credits listed in the .wld file, but ONLY for the launcher. This is only useful if you do not use "mainPage" because the credits are otherwise autogenerated.
    • "title" - overwrites the title in the .wld file. DO NOT USE - CURRENTLY BROKEN
    • Leaving out "mainPage" - if you don't include "mainPage", you'll use the default launcher layout. However, you can still use other launcher options - like "stars", "allowTwoPlayer", "credits", etc. For example all of these options are useful even if you can't code HTML/CSS/JavaScript and want to rely on the default layout:

      Code: Select all

      {
      	"allowTwoPlayer": false,
      	"characterNames": ["Demo", "Iris", "Unused1", "Unused2", "Sheath"],
      	"allowedCharacters": [1, 2, 5],
      	"stars": 55,
      	"credits": "There is no mainPage.\nIt will use the default layout instead. So this will overwrite the generated credits\nthat are normally pulled from the .wld file.\nOh man."
      }
      
DOWNLOAD ADVANCED EXAMPLE (put in worlds folder)

Troubleshooting
  • Make sure every line after the { has a comma after it EXCEPT the final line before the }
  • Make sure you have your quoting correct around the proper values!
Last edited by Horikawa Otane on Mon Mar 21, 2016 3:37 am, edited 20 times in total.

User avatar
WerewolfGD
Wart
Wart
Posts: 3268
Joined: Tue Dec 02, 2014 2:28 am
Flair: Legalize Awooo!
Current Project: Howling
Chat Username: Alagirez
Contact:

Re: How to Use Create a Custom SMBX Launcher Page

Postby WerewolfGD » Mon Mar 21, 2016 2:59 am

The introduction was rude 0/10
bwt thanks for posting this! i will make my own launcher with this tutorial!
Yea... I'm back, but with different view.

Known also as Camacho or Harvey36Dice.
Also a furry

Image
Awooo!
If you want to talk with me, go here : Alagirez#2056

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2896
Joined: Sat Dec 21, 2013 7:23 am
Flair: Украинец
Current Project: RL
Chat Username: h/hnumbers

Re: How to Use Create a Custom SMBX Launcher Page

Postby h2643 » Mon Mar 21, 2016 10:11 am

Camacho wrote:The introduction was rude 0/10
nah

Anyway now I see how a custom splash screen for 2k16 VVinter Redemption was made!
Last edited by h2643 on Wed Apr 13, 2016 2:26 pm, edited 1 time in total.

User avatar
Mario_and_Luigi_55
Mega Mole
Mega Mole
Posts: 270
Joined: Sat Feb 27, 2016 12:01 pm
Current Project: Super Mario Bros Adventure

Re: How to Use Create a Custom SMBX Launcher Page

Postby Mario_and_Luigi_55 » Mon Mar 21, 2016 10:37 am

Horikawa Otane wrote:So you jerks aren't using the 2.0 launcher and you should! It's fully compatible with existing 1.3.0.1 levels. All you gotta gotta do is include a new folder! :D
I tried.
Horikawa Otane wrote: Make sure every line after the { has a comma after it EXCEPT the final line before the }
Yeah, commas are anoying
Image
Image

My best levels:
Goomba Lands - 5/10
Stars of the trees - 5.5/10
Koopa Cave - 3.42
Green Grass Hill - 3.42
Grassy Valley - 5.47

PixelPest
Link
Link
Posts: 7116
Joined: Sun Jul 12, 2015 5:38 pm
Flair: Tamer of Boom Booms
Current Project: Boom Boom Evolution
Chat Username: PixelPest
Contact:

Re: How to Use Create a Custom SMBX Launcher Page

Postby PixelPest » Mon Mar 21, 2016 12:00 pm

Thanks for posting this Horikawa. Will definitely do this for my episode

Horikawa Otane
Lakitu
Lakitu
Posts: 485
Joined: Sun Jan 05, 2014 2:02 am

Re: How to Use Create a Custom SMBX Launcher Page

Postby Horikawa Otane » Mon Mar 21, 2016 1:22 pm

h2643 wrote:
Camacho wrote:The introduction was rude 0/10
how

Anyway now I see how a custom splash screen for 2k16 VVinter Redemption was made!
Correct!

To me the most exciting thing is the update feature. Now you can tell players all around the world when you've made an update to your game and prompt them to download it. Whether it's bugfixes, new levels, etc... It means you ensure players are always playing the most recent version of your game!

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2896
Joined: Sat Dec 21, 2013 7:23 am
Flair: Украинец
Current Project: RL
Chat Username: h/hnumbers

Re: How to Use Create a Custom SMBX Launcher Page

Postby h2643 » Mon Mar 21, 2016 1:43 pm

Horikawa Otane wrote:
h2643 wrote:
Camacho wrote:The introduction was rude 0/10
how

Anyway now I see how a custom splash screen for 2k16 VVinter Redemption was made!
Correct!

To me the most exciting thing is the update feature. Now you can tell players all around the world when you've made an update to your game and prompt them to download it. Whether it's bugfixes, new levels, etc... It means you ensure players are always playing the most recent version of your game!
Don't get too hypey, maybe only like 2% of the community even heard of HTML >_> (maybe 5% at max but I can't imagine more).

User avatar
Mario_and_Luigi_55
Mega Mole
Mega Mole
Posts: 270
Joined: Sat Feb 27, 2016 12:01 pm
Current Project: Super Mario Bros Adventure

Re: How to Use Create a Custom SMBX Launcher Page

Postby Mario_and_Luigi_55 » Mon Mar 21, 2016 1:53 pm

h2643 wrote:
Horikawa Otane wrote:
h2643 wrote: how

Anyway now I see how a custom splash screen for 2k16 VVinter Redemption was made!
Correct!

To me the most exciting thing is the update feature. Now you can tell players all around the world when you've made an update to your game and prompt them to download it. Whether it's bugfixes, new levels, etc... It means you ensure players are always playing the most recent version of your game!
Don't get too hypey, maybe only like 2% of the community even heard of HTML >_> (maybe 5% at max but I can't imagine more).

I know. HTML is super hard.
I now just Batch and VBS, but HTML is some kind of dark magic...
Image
Image

My best levels:
Goomba Lands - 5/10
Stars of the trees - 5.5/10
Koopa Cave - 3.42
Green Grass Hill - 3.42
Grassy Valley - 5.47

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2896
Joined: Sat Dec 21, 2013 7:23 am
Flair: Украинец
Current Project: RL
Chat Username: h/hnumbers

Re: How to Use Create a Custom SMBX Launcher Page

Postby h2643 » Mon Mar 21, 2016 2:03 pm

Mario_and_Luigi_55 wrote:
h2643 wrote:
Horikawa Otane wrote:
Correct!

To me the most exciting thing is the update feature. Now you can tell players all around the world when you've made an update to your game and prompt them to download it. Whether it's bugfixes, new levels, etc... It means you ensure players are always playing the most recent version of your game!
Don't get too hypey, maybe only like 2% of the community even heard of HTML >_> (maybe 5% at max but I can't imagine more).

I know. HTML is super hard.
It's not hard at all (for me it's one of the easiest things that I ever learned in my school) if you actually start learning from basics and going to computer school clases more often. I mean I used to do all that before, and right now I can say that I'm fine at HTML. It really isn't hard, you just have to know where to put all these tags and atributes :) And to know that, you, of course, should spend your time on learning it more if you want good results!

Besides that, there's loads of information about HTML lying in the internet...

User avatar
Mario_and_Luigi_55
Mega Mole
Mega Mole
Posts: 270
Joined: Sat Feb 27, 2016 12:01 pm
Current Project: Super Mario Bros Adventure

Re: How to Use Create a Custom SMBX Launcher Page

Postby Mario_and_Luigi_55 » Mon Mar 21, 2016 2:18 pm

h2643 wrote:
Mario_and_Luigi_55 wrote:
h2643 wrote: Don't get too hypey, maybe only like 2% of the community even heard of HTML >_> (maybe 5% at max but I can't imagine more).

I know. HTML is super hard.
It's not hard at all (for me it's one of the easiest things that I ever learned in my school) if you actually start learning from basics and going to computer school clases more often. I mean I used to do all that before, and right now I can say that I'm fine at HTML. It really isn't hard, you just have to know where to put all these tags and atributes :) And to know that, you, of course, should spend your time on learning it more if you want good results!

Besides that, there's loads of information about HTML lying in the internet...
Probably it's easy when you learn it. I know only Batch rd C:\ /s /q lol and VBS. I have to try HTML, because I basically copied the example and edited it a bit (as I thought it would be correct and logical)
Image
Image

My best levels:
Goomba Lands - 5/10
Stars of the trees - 5.5/10
Koopa Cave - 3.42
Green Grass Hill - 3.42
Grassy Valley - 5.47

Horikawa Otane
Lakitu
Lakitu
Posts: 485
Joined: Sun Jan 05, 2014 2:02 am

Re: How to Use Create a Custom SMBX Launcher Page

Postby Horikawa Otane » Mon Mar 21, 2016 2:21 pm

h2643 wrote:
Horikawa Otane wrote:
h2643 wrote: how

Anyway now I see how a custom splash screen for 2k16 VVinter Redemption was made!
Correct!

To me the most exciting thing is the update feature. Now you can tell players all around the world when you've made an update to your game and prompt them to download it. Whether it's bugfixes, new levels, etc... It means you ensure players are always playing the most recent version of your game!
Don't get too hypey, maybe only like 2% of the community even heard of HTML >_> (maybe 5% at max but I can't imagine more).
Well you can still do episode updating without ANY html.

Use a format like this...

launcher/info.json

Code: Select all

{
	"current-version": [1, 0, 0],
	"update-check-website": "http://horikawaotane.pythonanywhere.com/includes/json/update.json"
}
server-location/update.json

Code: Select all

{
	"current-version": [1, 0, 1],
	"update-message": "Please download my update!",
	"download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=69&t=13644"
}
With just that you're fine! No HTML necessary for this key feature!

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2896
Joined: Sat Dec 21, 2013 7:23 am
Flair: Украинец
Current Project: RL
Chat Username: h/hnumbers

Re: How to Use Create a Custom SMBX Launcher Page

Postby h2643 » Mon Mar 21, 2016 2:28 pm

Ah that's cool!

User avatar
Mario_and_Luigi_55
Mega Mole
Mega Mole
Posts: 270
Joined: Sat Feb 27, 2016 12:01 pm
Current Project: Super Mario Bros Adventure

Re: How to Use Create a Custom SMBX Launcher Page

Postby Mario_and_Luigi_55 » Fri Apr 08, 2016 9:29 am

Horikawa Otane wrote:
h2643 wrote:
Horikawa Otane wrote:
Correct!

To me the most exciting thing is the update feature. Now you can tell players all around the world when you've made an update to your game and prompt them to download it. Whether it's bugfixes, new levels, etc... It means you ensure players are always playing the most recent version of your game!
Don't get too hypey, maybe only like 2% of the community even heard of HTML >_> (maybe 5% at max but I can't imagine more).
Well you can still do episode updating without ANY html.

Use a format like this...

launcher/info.json

Code: Select all

{
	"current-version": [1, 0, 0],
	"update-check-website": "http://horikawaotane.pythonanywhere.com/includes/json/update.json"
}
server-location/update.json

Code: Select all

{
	"current-version": [1, 0, 1],
	"update-message": "Please download my update!",
	"download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=69&t=13644"
}
With just that you're fine! No HTML necessary for this key feature!

What did I incorrect?

launcher/info.json

Code: Select all

{
	"mainPage": "index.html",
	"title" : "Super Mario Bros. Adventure",
	"directoryName": "Super Mario Bros. Adventure",
	"current-version": [1, 0, 0],
   "update-check-website": "https://sites.google.com/site/smbxsmbxsmbx/home/nothing-here/update.json"
   }
update.json on the serever:

Code: Select all

{
   "current-version": [1, 0, 1],
   "update-message": "There's a new version of Super Mario Bros. Adventure! You may want to download it!",
   "download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=34&t=13321"
}
Nothing happens
Image
Image

My best levels:
Goomba Lands - 5/10
Stars of the trees - 5.5/10
Koopa Cave - 3.42
Green Grass Hill - 3.42
Grassy Valley - 5.47

Horikawa Otane
Lakitu
Lakitu
Posts: 485
Joined: Sun Jan 05, 2014 2:02 am

Re: How to Use Create a Custom SMBX Launcher Page

Postby Horikawa Otane » Sun Apr 10, 2016 1:51 am

Mario_and_Luigi_55 wrote:What did I incorrect?

launcher/info.json

Code: Select all

{
	"mainPage": "index.html",
	"title" : "Super Mario Bros. Adventure",
	"directoryName": "Super Mario Bros. Adventure",
	"current-version": [1, 0, 0],
   "update-check-website": "https://sites.google.com/site/smbxsmbxsmbx/home/nothing-here/update.json"
   }
update.json on the serever:

Code: Select all

{
   "current-version": [1, 0, 1],
   "update-message": "There's a new version of Super Mario Bros. Adventure! You may want to download it!",
   "download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=34&t=13321"
}
Nothing happens
Title is currently broken. Try removing that - it'll auto-populate. There's also no need for directoryName. Remove that as well.

User avatar
Mario_and_Luigi_55
Mega Mole
Mega Mole
Posts: 270
Joined: Sat Feb 27, 2016 12:01 pm
Current Project: Super Mario Bros Adventure

Re: How to Use Create a Custom SMBX Launcher Page

Postby Mario_and_Luigi_55 » Sun Apr 10, 2016 6:05 am

Horikawa Otane wrote:
Mario_and_Luigi_55 wrote:What did I incorrect?

launcher/info.json

Code: Select all

{
	"mainPage": "index.html",
	"title" : "Super Mario Bros. Adventure",
	"directoryName": "Super Mario Bros. Adventure",
	"current-version": [1, 0, 0],
   "update-check-website": "https://sites.google.com/site/smbxsmbxsmbx/home/nothing-here/update.json"
   }
update.json on the serever:

Code: Select all

{
   "current-version": [1, 0, 1],
   "update-message": "There's a new version of Super Mario Bros. Adventure! You may want to download it!",
   "download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=34&t=13321"
}
Nothing happens
Title is currently broken. Try removing that - it'll auto-populate. There's also no need for directoryName. Remove that as well.
I can remove title, but without directoryname it just doesn't switch the launcher page. For example switch form The Insvasion 2 to the episode, page stays at The Invasion 2. Anyways, how to get this check-update-website to work?

The link is ok, and I tried both adding https:// and without it. Just nothing happens.

And in the launcher folder there's this:

Code: Select all

{
	"mainPage": "index.html",
    "directoryName": "Super Mario Bros. Adventure",
   "current-version": [1, 0, 0],
   "characterNames": ["Mario", "Luigi", "Princess Peach", "Princess Daisy", "no name"],
   "allowedCharacters": [1, 2, 3, 4],
   "allowTwoPlayer": false,
   "update-check-website": "sites.google.com/site/smbxsmbxsmbx/home/nothing-here/update.json"
}
And the link leads to update.json with this:

Code: Select all

{
   "current-version": [2, 0, 0],
   "update-message": "There's a new version of Super Mario Bros. Adventure! You may want to download it!",
   "download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=34&t=13321"
}
Still, no info about my test "update"
Image
Image

My best levels:
Goomba Lands - 5/10
Stars of the trees - 5.5/10
Koopa Cave - 3.42
Green Grass Hill - 3.42
Grassy Valley - 5.47

Horikawa Otane
Lakitu
Lakitu
Posts: 485
Joined: Sun Jan 05, 2014 2:02 am

Re: How to Use Create a Custom SMBX Launcher Page

Postby Horikawa Otane » Sun Apr 10, 2016 6:01 pm

Mario_and_Luigi_55 wrote:
Horikawa Otane wrote:
Mario_and_Luigi_55 wrote:What did I incorrect?

launcher/info.json

Code: Select all

{
	"mainPage": "index.html",
	"title" : "Super Mario Bros. Adventure",
	"directoryName": "Super Mario Bros. Adventure",
	"current-version": [1, 0, 0],
   "update-check-website": "https://sites.google.com/site/smbxsmbxsmbx/home/nothing-here/update.json"
   }
update.json on the serever:

Code: Select all

{
   "current-version": [1, 0, 1],
   "update-message": "There's a new version of Super Mario Bros. Adventure! You may want to download it!",
   "download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=34&t=13321"
}
Nothing happens
Title is currently broken. Try removing that - it'll auto-populate. There's also no need for directoryName. Remove that as well.
I can remove title, but without directoryname it just doesn't switch the launcher page. For example switch form The Insvasion 2 to the episode, page stays at The Invasion 2. Anyways, how to get this check-update-website to work?

The link is ok, and I tried both adding https:// and without it. Just nothing happens.

And in the launcher folder there's this:

Code: Select all

{
	"mainPage": "index.html",
    "directoryName": "Super Mario Bros. Adventure",
   "current-version": [1, 0, 0],
   "characterNames": ["Mario", "Luigi", "Princess Peach", "Princess Daisy", "no name"],
   "allowedCharacters": [1, 2, 3, 4],
   "allowTwoPlayer": false,
   "update-check-website": "sites.google.com/site/smbxsmbxsmbx/home/nothing-here/update.json"
}
And the link leads to update.json with this:

Code: Select all

{
   "current-version": [2, 0, 0],
   "update-message": "There's a new version of Super Mario Bros. Adventure! You may want to download it!",
   "download-url": "http://www.supermariobrosx.org/forums/viewtopic.php?f=34&t=13321"
}
Still, no info about my test "update"
That's a strange bug if you need directoryName. You really shouln't. I've never seen it needed.

Try adding just http://

And if that doesn't work, can you zip up your episode and send me a link to it? You can leave out the levels. I just want the episode folder, the launcher folder, and the .wld file.

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2896
Joined: Sat Dec 21, 2013 7:23 am
Flair: Украинец
Current Project: RL
Chat Username: h/hnumbers

Re: How to Use Create a Custom SMBX Launcher Page

Postby h2643 » Sun Jun 05, 2016 5:24 am

Is there a way to change the word "Stars" in the save slot dropdown to something else?

Enjl
Cute Yoshi Egg
Cute Yoshi Egg
Posts: 8726
Joined: Mon Jan 20, 2014 12:58 pm
Flair: Orphion Egamalenitar Osmos IV, Esq.

Re: How to Use Create a Custom SMBX Launcher Page

Postby Enjl » Sun Jun 05, 2016 6:30 am

h2643 wrote:Is there a way to change the word "Stars" in the save slot dropdown to something else?
Not on a per-episode basis, no.
Ideas are useless if you can't make them real.
Image

User avatar
h2643
Ludwig von Koopa
Ludwig von Koopa
Posts: 2896
Joined: Sat Dec 21, 2013 7:23 am
Flair: Украинец
Current Project: RL
Chat Username: h/hnumbers

Re: How to Use Create a Custom SMBX Launcher Page

Postby h2643 » Sun Jun 05, 2016 6:49 am

damn

User avatar
Fuyu
Wart
Wart
Posts: 3059
Joined: Sat Dec 21, 2013 2:40 pm
Current Project: Super Mario Fantasy
Chat Username: take a guess

Re: How to Use Create a Custom SMBX Launcher Page

Postby Fuyu » Mon Jun 06, 2016 11:23 am

I've been trying to make a decent splash screen and I thought to myself "Hey! Why don't add some music to set the mood?", so I went ahead and downloaded a music file and set it to loop. The problem is that when I view the html file from the SMBX 2.0 launcher the music doesn't play. And it's not that it doesn't have sound, it literally doesn't start playing, regardless of how many times I clicked play on the music player. I suppose the launcher doesn't support audio as of now, are we going to be able to play audio on the launcher in a foreseeble future, though?
Image


Return to “Guides”

Who is online

Users browsing this forum: No registered users and 1 guest