Tutorial  Updated

Play/port your GameMaker games on NintendoSwitch

DISCLAIMER:
THIS TUTORIAL IS A WIP, I'm still (eventually) updating it to contain the latest methods/fixes to allow mostly any gamemaker game to be ported onto the switch. Take in mind this guide is still incomplete, but does contain valuable info to start porting!


So... As you might (or not) already know there is a way to run different Gamemaker games by "overwriting" the main game.win file of an existant switch-gamemaker game (like Undertale for example) with another one (props to Chocolate28 who originally discovered this method). Hoowever, some games might not work properly or might not even launch at all! So here I am, with a guide that will most likely help you fix most of the relevant issues, and hopefully will guide you through the process of doing it so. Good luck!

REQUIREMENTS:

• Having Atmosphére CFW up and running (guide here)
• Having a gamemaker game installed on the switch ("DELTARUNE Chptr 1" is the recommended target)
• The data.win file of the game you want to port (You can find this in your game's installed location, sometimes it's embedded inside the exe of the game itself, so just open it as if it was a zip file and you may find it there!)
• The super awesome but somewhat tricky tool... UnderModTool aka UMT by krzys-h (download here)

LET'S START:

First compilation/testing:
You will want to open UMT tool (aka Undertale-Mod-Tool huh) and once opened drag your data.win file from the game you want to port inside this tool. Once loaded we will just try to compile it and see what's working and what's not.

To compile it again with any changes you've done just go into File >> Save, and save the new modified file as "game.win". Now create a folder named "010023800D64A000" (Deltarune's TitleID) and inside this folder create another one called "romfs", now place your "game.win" file inside this romfs folder. You can now place this folder with a bunch of numbers inside your sdcard to inject it in your switch, you must place this folder inside sdcard:/atmosphere/content/

Great! Now whenever you boot Deltarune in your switch you should see your game running!
Wait... it's not running?
Oddly expected

Time to get hands dirty and fix things by yourself! This part is a little more advanced than what you may think, so there's that, nonetheless... I believe in you!
Welcome to the awesome world of GMS decompilation and game modifying! (aka Gamemaker's modding hell)

First issue, Resolution Scale:
Usually lots of gamemaker games run in a window of a certain resolution, the switch can kind of handle different resolutions but only at supported scales. Most of the times this is the only fix you need to make the game display at all. So, go back to UMT, and with your data.win loaded double click on General Info in the left panel and look for Default windows size to check the resolution values. These values must be compatible with what the switch supports, so set them to 640x480 if the game uses 4:3 ratio scale or set them to 1280x720 if the games uses 16:9 ratio scale. Sometimes different values are valid and can cause much better image results than others (wide resolutions for example) so just play along with them while testing to see what works best for you.
Tbh I still have no clue to this day what the full supported resolutions are, so just try and let me know what worked and what didn't, ty!

Test again, Compilation/Testing reminder:
Now try and do the compiling process you followed earlier (File, Save, game.win...) and save the new modified game.win file in your sd card where you placed earlier the old one. This is how you are going to do the testing for the rest of the porting process, so get comfortable with it (because you're gonna be doing it a A LOT).

Uncommon issue, Collisions: (Todo, quote the use of the flag "FastCollision" system)
Now that your game is likely booting and all... you might have noticed that when you collide with certain objects, these don't have a proper collision (if every collision works fine just skip this step) and you would sometimes get stuck within those. To fix this you will want to navigate to the room where this collision is glitching and make sure it's marked as a solid object. So go into the left panel >> Rooms and search there for the room (go in fullscreen mode to see the whole room displayed). Once found your room, locate the collision object, it's usually an ugly block or something like that. Once found the collision object, double click on it and it will highlight the object in the object-list above, double click on the one highlighted and you will be now in that object's property panel. Now once there make sure the Solid checkbox is ticked, if it already is, you might want to go into the main character object properties and check the Solid box there as well (disclaimer: making your character solid can cause additional issues).
If this tips weren't enough to fix the collisions, please, report it and let me know here!

Implementing, Joycons:
You might have noticed that joycons work out of the box but only do so when attached to the console in handheld mode. To fix this you're gonna have to create an object that handles the joycons processes. Find the "Game Objects" section in the left panel and right click on it, click then on "Add". Name this object whatever you want and uncheck the Visible checkbox. You now want to place this object in the first loaded room, to do this open the Rooms section and navigate to the one where your character spawns, double click to open it and now navigate to the Game Objects section and find your object (do not click on it). While the room view is opened drag your newly created object to the room viewport. If UMT asks you to select a layer click on the Layer section above in the room's property panel and select any layer, then drag and drop your object in the viewport again and your done. Great! Now let's add some code! Double click on the created object and double click behind "Create" in the Events section. A new entry will be created but it's empty, you will see now the two buttons at the right of the new created entry, it's a plus sign next to a cross, click on add (+). Now a new code entry will be created, double click on it.

[THIS TUTORIAL IS A WIP]
 
Last edited by KardchCode, , Reason: update altar link and a few advises

jimmyj

Official founder of altariaism. Copyright jimmyj
Member
Joined
May 26, 2017
Messages
1,485
Trophies
1
Location
Hyrule
XP
1,632
Country
United Kingdom
breath of the nes was a gamemaker studio game? I NEED THIS NOW!HOPEFULLY I STILL HAVE AN EXECUTABLE OF IT ! ^^
 

PiracyForTheMasses

Well-Known Member
Member
Joined
Sep 25, 2018
Messages
290
Trophies
0
Age
47
XP
590
Country
United States
there's a windows program that can extract the files from data.win. Its called GM Editor, but I think it only extracts assets. I'm in the process of compiling AM2R for the switch, it's a wip at the moment.
 
Last edited by PiracyForTheMasses,

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
888
Country
Spain
there's a windows program that can extract the files from data.win. Its called GM Editor, but I think it only extracts assets. I'm in the process of compiling AM2R for the switch, it's a wip at the moment.
I know but altar is also more complete and has more export options, also it has this project style structure that makes it really easy to edit code, assests, textures, etc
Thanks for letting me know anyways! Btw can you show a bit of your wip I'd love to see your progress! ;D
 

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
888
Country
Spain
how can I rebuild the nsp
You will need the exefs of undertake, you can extract this using hactool, with your keys and all that, once you got that you can build a new nsp using 4HCNI nspbuilder, and using the exefs from undertale and a romfs folder with your own game.win file
 
  • Like
Reactions: jimmyj

Crambles

New Member
Newbie
Joined
Oct 3, 2018
Messages
3
Trophies
0
Age
33
XP
156
Country
United States
I've managed to run a test build of one of my projects with method 1. The game runs perfectly in portable mode. How did you manage to change the name and thumbnail of the application? I'd like to do that as well.
 

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
888
Country
Spain
I've managed to run a test build of one of my projects with method 1. The game runs perfectly in portable mode. How did you manage to change the name and thumbnail of the application? I'd like to do that as well.
I guess you mean the nsp, right?
Then you only need the exefs from undertale and a romfs folder with your game.win, then build an nsp using the tool from https://github.com/The-4n/hacPack/releases/tag/v1.01 then install it and you should be done!
 

Crambles

New Member
Newbie
Joined
Oct 3, 2018
Messages
3
Trophies
0
Age
33
XP
156
Country
United States
I don't see any clear options to rename the application or change the game's logo with this tool. I'm guessing I need to build and NCA first as it mentions a logo file? From there I've got no clue what to do.
 

Bigjokker

Well-Known Member
Member
Joined
Jan 4, 2015
Messages
98
Trophies
0
Age
47
XP
356
Country
United States
I don't see any clear options to rename the application or change the game's logo with this tool. I'm guessing I need to build and NCA first as it mentions a logo file? From there I've got no clue what to do.

The logo file only contains the 2 nintendo logos. What you want is the control folder which contains the control.nacp and icon_AmericanEnglish.dat.

Open the control.nacp with a Hex editor and change the games title to your new game.

The icon_AmericanEnglish.dat is just a 256x256 jpg. To see for yourself rename the dat to jpg and open in a photo viewer.

To change it find a jpg of your game and resize to 256x256 and rename to icon_AmericanEnglish.dat. Its recommended to first save the jpg to a bmg file then back to a jpg for better results. You can use paint for that.
 
Last edited by Bigjokker,
  • Like
Reactions: KardchCode

Crambles

New Member
Newbie
Joined
Oct 3, 2018
Messages
3
Trophies
0
Age
33
XP
156
Country
United States
@CardochDM
That was exactly what I needed. Thanks for the help! I've successfully created a new NSP with a unique name and logo. Also thanks Bigjokker for the info. I'm new here so every bit helps.

I look forward to whatever else you manage to discover about gamemaker projects on the switch. Best of luck!
 
  • Like
Reactions: KardchCode

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Anyone wanna play with my joydock
  • BigOnYa @ BigOnYa:
    Biomutant looks cool tho, may have to try that
  • Quincy @ Quincy:
    Usually when such a big title leaks the Temp will be the first to report about it (going off of historical reports here, Pokemon SV being the latest one I can recall seeing pop up here)
  • K3Nv2 @ K3Nv2:
    I still like how a freaking mp3 file hacks webos all that security defeated by text yet again
  • BigOnYa @ BigOnYa:
    They have simulators for everything nowdays, cray cray. How about a sim that shows you playing the Switch.
  • K3Nv2 @ K3Nv2:
    That's called yuzu
    +1
  • BigOnYa @ BigOnYa:
    I want a 120hz 4k tv but crazy how more expensive the 120hz over the 60hz are. Or even more crazy is the price of 8k's.
  • K3Nv2 @ K3Nv2:
    No real point since movies are 30fps
  • BigOnYa @ BigOnYa:
    Not a big movie buff, more of a gamer tbh. And Series X is 120hz 8k ready, but yea only 120hz 4k games out right now, but thinking of in the future.
  • K3Nv2 @ K3Nv2:
    Mostly why you never see TV manufacturers going post 60hz
  • BigOnYa @ BigOnYa:
    I only watch tv when i goto bed, it puts me to sleep, and I have a nas drive filled w my fav shows so i can watch them in order, commercial free. I usually watch Married w Children, or South Park
  • K3Nv2 @ K3Nv2:
    Stremio ruined my need for nas
  • BigOnYa @ BigOnYa:
    I stream from Nas to firestick, one on every tv, and use Kodi. I'm happy w it, plays everything. (I pirate/torrent shows/movies on pc, and put on nas)
  • K3Nv2 @ K3Nv2:
    Kodi repost are still pretty popular
  • BigOnYa @ BigOnYa:
    What the hell is Kodi reposts? what do you mean, or "Wut?" -xdqwerty
  • K3Nv2 @ K3Nv2:
    Google them basically web crawlers to movie sites
  • BigOnYa @ BigOnYa:
    oh you mean the 3rd party apps on Kodi, yea i know what you mean, yea there are still a few cool ones, in fact watched the new planet of the apes movie other night w wifey thru one, was good pic surprisingly, not a cam
  • BigOnYa @ BigOnYa:
    Damn, only $2.06 and free shipping. Gotta cost more for them to ship than $2.06
  • BigOnYa @ BigOnYa:
    I got my Dad a firestick for Xmas and showed him those 3rd party sites on Kodi, he loves it, all he watches anymore. He said he has got 3 letters from AT&T already about pirating, but he says f them, let them shut my internet off (He wants out of his AT&T contract anyways)
  • K3Nv2 @ K3Nv2:
    That's where stremio comes to play never got a letter about it
  • BigOnYa @ BigOnYa:
    I just use a VPN, even give him my login and password so can use it also, and he refuses, he's funny.
  • BigOnYa @ BigOnYa:
    I had to find and get him an old style flip phone even without text, cause thats what he wanted. No text, no internet, only phone calls. Old, old school.
    K3Nv2 @ K3Nv2: https://youtu.be/z9E_uv5IT-o?si=0qMdVEnRK8mmclzS