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

DerEineee

Well-Known Member
Member
Joined
Aug 22, 2015
Messages
189
Trophies
0
Age
24
XP
1,134
Country
Germany
No.... I couldn't find a game that had a new enough version of gamemaker. Or maybe it's another issue, I don't know for sure :(
Oh thats sad :( I tried to play it on Android installed on my Switch, but the it wasn't really a nice way to play Untertale yellow. So I stick to the desktop version I guess xD
 

JohnnyBeeMon

Member
Newcomer
Joined
Jan 13, 2024
Messages
5
Trophies
0
Age
29
XP
30
Country
United States
No.... I couldn't find a game that had a new enough version of gamemaker. Or maybe it's another issue, I don't know for sure :(
I'm also starting the process of getting UTY on switch with this method. what games have you tried? I was going to try using Katana Zero, since its the most recent game made with GMS that i own.
 

JohnnyBeeMon

Member
Newcomer
Joined
Jan 13, 2024
Messages
5
Trophies
0
Age
29
XP
30
Country
United States
I've tried with Katana Zero and got the exact same error message as UT and DR. So, I've downloaded moonleap and tried with the just a game.win file, and did not get an error message, but the game crashed. So I tried putting the audio files and splash image in my romfs folder, and got to the splash screen, then a crash. I feel like I'm super close to getting this to work, though. Gonna fiddle with it some more and report back.
Post automatically merged:

 
Last edited by JohnnyBeeMon,

iKirby8

Member
Newcomer
Joined
Dec 5, 2022
Messages
16
Trophies
0
Age
23
XP
152
Country
United States
I've tried with Katana Zero and got the exact same error message as UT and DR. So, I've downloaded moonleap and tried with the just a game.win file, and did not get an error message, but the game crashed. So I tried putting the audio files and splash image in my romfs folder, and got to the splash screen, then a crash. I feel like I'm super close to getting this to work, though. Gonna fiddle with it some more and report back.
Post automatically merged:


I've gotten the splash screen to show, the furthest i've gotten was with zeroranger I think? I assume that port has some sort of debug enabled which meant I could see the error in regards to the audio_bus. If what we were theorizing is true then UTY requires the newer version of GMS, I think the update with audio FX came out like march or april of 2023? So if there was any GMS game that came out past that point, that'd probably be our best option to try and port it with. I just can't find a game with a newer version of GMS. Turnip Boy Robs a Bank releases in a few days, supposedly using Gamemaker. Maybe we'll get lucky and it'll work with that game. Let me know if you figure anything else out!
 

JohnnyBeeMon

Member
Newcomer
Joined
Jan 13, 2024
Messages
5
Trophies
0
Age
29
XP
30
Country
United States
I've gotten the splash screen to show, the furthest i've gotten was with zeroranger I think? I assume that port has some sort of debug enabled which meant I could see the error in regards to the audio_bus. If what we were theorizing is true then UTY requires the newer version of GMS, I think the update with audio FX came out like march or april of 2023? So if there was any GMS game that came out past that point, that'd probably be our best option to try and port it with. I just can't find a game with a newer version of GMS. Turnip Boy Robs a Bank releases in a few days, supposedly using Gamemaker. Maybe we'll get lucky and it'll work with that game. Let me know if you figure anything else out!
as far as i know, Moonleap was developed for a game jam and released on switch in March 2023, and when i used it as a base, i did not get the audio_bus error. hopefully youre right about Turnip Boy, and if I find anything before then, i'll be sure to post updates.
 

Elchmann

New Member
Newbie
Joined
Jan 16, 2024
Messages
1
Trophies
0
Age
24
XP
3
Country
Germany
Hey, this sounds Incredibly interesting, but I want to know 2 things.
1. If I want to port (for example) undertale yellow, and the sounds and music are in a separate folder next to the data.win, will the compiled data.win contain all the Audio? (or is that the point of compiling the file in the first place?)
2. Can I save the game, restart the switch, launch the modded deltarune and continue from the spot I saved?
 
Last edited by Elchmann,

JohnnyBeeMon

Member
Newcomer
Joined
Jan 13, 2024
Messages
5
Trophies
0
Age
29
XP
30
Country
United States
Hey, this sounds Incredibly interesting, but I want to know 2 things.
1. If I want to port (for example) undertale yellow, and the sounds and music are in a separate folder next to the data.win, will the compiled data.win contain all the Audio? (or is that the point of compiling the file in the first place?)
2. Can I save the game, restart the switch, launch the modded deltarune and continue from the spot I saved?
I have attempted several games as a base for Undertale Yellow with no success. i have also recenntly tried using some of the scripts in the modding tool to import those folders directly into the game, but something tells me that that would cause issues somewhere else. regardless of using a game.win with the audio files imported or not, the farthest iv gotten is a splash screen and a crash with no log.. hopefully a game using the latest version of GM:S will release soon, so we can try using it.
 

YumeKumo

New Member
Newbie
Joined
Feb 12, 2024
Messages
1
Trophies
0
XP
47
Country
United States
I'm trying to run the steam version of the game, Dreamcutter. The game was released around a week ago (02/02/24) on the Switch but has been released on Steam since May 2023. Since I'm just porting the Steam version, I don't think I need to use a separate GMS game to use as the base.

When trying to import the data.win into UMT, I get a lot of errors which I feel might be preventing me from running the game.
  • Invalid value for resource ID of type UndertaleChunkSPRT: 825 (There are only 778)
  • Invalid value for resource ID of type UndertaleChunkSPRT: 824 (There are only 778)
  • Invalid value for resource ID of type UndertaleChunkSPRT: 824 (There are only 778)
  • Warnings occurred during loading. Data loss will likely occur when trying to save!
    • This error code shows up when exporting: Errors occurred during loading. High chance of data loss! Proceed at your own risk.

However, when it comes to exporting it, besides the error at the end, it comes out fine but still wouldn't run.
I changed the resolution to from 1080x1920 to 1280x720 and included the audiogroup1.dat and audiogroup2.dat but the game would just crash before reaching the menu. I tried putting the game.win into the Deltarune title folder, but that didn't work. Also tried to put this in Dreamcutter's title folder and run it but it also didn't work. I did look around the scripts to see if there was something that could help, but I don't know what I'm doing so I didn't mess with it.

I am currently stumped as I don't know where to go from here since I am not given any error code besides "An error has occurred" and this is my first time doing this.
 

KardchCode

Well-Known Member
OP
Member
Joined
Sep 18, 2017
Messages
133
Trophies
0
XP
873
Country
Spain
I'm trying to run the steam version of the game, Dreamcutter. The game was released around a week ago (02/02/24) on the Switch but has been released on Steam since May 2023. Since I'm just porting the Steam version, I don't think I need to use a separate GMS game to use as the base.

When trying to import the data.win into UMT, I get a lot of errors which I feel might be preventing me from running the game.
  • Invalid value for resource ID of type UndertaleChunkSPRT: 825 (There are only 778)
  • Invalid value for resource ID of type UndertaleChunkSPRT: 824 (There are only 778)
  • Invalid value for resource ID of type UndertaleChunkSPRT: 824 (There are only 778)
  • Warnings occurred during loading. Data loss will likely occur when trying to save!
    • This error code shows up when exporting: Errors occurred during loading. High chance of data loss! Proceed at your own risk.

However, when it comes to exporting it, besides the error at the end, it comes out fine but still wouldn't run.
I changed the resolution to from 1080x1920 to 1280x720 and included the audiogroup1.dat and audiogroup2.dat but the game would just crash before reaching the menu. I tried putting the game.win into the Deltarune title folder, but that didn't work. Also tried to put this in Dreamcutter's title folder and run it but it also didn't work. I did look around the scripts to see if there was something that could help, but I don't know what I'm doing so I didn't mess with it.

I am currently stumped as I don't know where to go from here since I am not given any error code besides "An error has occurred" and this is my first time doing this.
Yeah this looks like the typical issues with UMT when importing non Undertale games heh. The tool is built targeting proper decompilation of both Undertale and Deltarune but has wide support indeed for many GMS games, now some may fail to import properly as is probably the case here. Thing is, whenever you get import errors that usually impacts exporting, as the gms executable expects certains blocks of data in the data.win file. Still, you might get away with them if there's not too many or if they're not essential at all.

So, if I were you I would copy the log and report an issue in their github (https://github.com/krzys-h/UndertaleModTool/issues/new/choose), or just ask them nicely in their Discord for support (previous link too).

Now, you might wanna try as well doing a regular import/export as you've done already with the steam version, then a quick execution test trying it on your computer (just replace your steam game data.win file with the "new" one full of errors and play it, just to see if it's actually an issue of the tool or the switch environment itself).

And yep, this is actually part of what porting a gamemaker game is, welcome! XD
 

Swix

New Member
Newbie
Joined
Mar 16, 2024
Messages
1
Trophies
0
Age
18
XP
25
Country
Russia
I have attempted several games as a base for Undertale Yellow with no success. i have also recenntly tried using some of the scripts in the modding tool to import those folders directly into the game, but something tells me that that would cause issues somewhere else. regardless of using a game.win with the audio files imported or not, the farthest iv gotten is a splash screen and a crash with no log.. hopefully a game using the latest version of GM:S will release soon, so we can try using it.
any progress?
 

sm0045

New Member
Newbie
Joined
Apr 2, 2024
Messages
1
Trophies
0
Age
23
XP
3
Country
United States
You can usually tell because luckily UMT shows the gamemaker version so if two data files are very close to each other they are more likely to work but UTY is really recent in bytecode version (I believe it's like 2023 or 2022 something).
Post automatically merged:

You can usually tell because luckily UMT shows the gamemaker version so if two data files are very close to each other they are more likely to work but UTY is really recent in bytecode version (I believe it's like 2023 or 2022 something).
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan @ BakerMan:
    i said i was sleeping...
  • BakerMan @ BakerMan:
    sleeping with uremum
  • K3Nv2 @ K3Nv2:
    Even my mum slept on that uremum
  • TwoSpikedHands @ TwoSpikedHands:
    yall im torn... ive been hacking away at tales of phantasia GBA (the USA version) and have so many documents of reverse engineering i've done
  • TwoSpikedHands @ TwoSpikedHands:
    I just found out that the EU version is better in literally every way, better sound quality, better lighting, and there's even a patch someone made to make the text look nicer
  • TwoSpikedHands @ TwoSpikedHands:
    Do I restart now using what i've learned on the EU version since it's a better overall experience? or do I continue with the US version since that is what ive been using, and if someone decides to play my hack, it would most likely be that version?
  • Sicklyboy @ Sicklyboy:
    @TwoSpikedHands, I'll preface this with the fact that I know nothing about the game, but, I think it depends on what your goals are. Are you trying to make a definitive version of the game? You may want to refocus your efforts on the EU version then. Or, are you trying to make a better US version? In which case, the only way to make a better US version is to keep on plugging away at that one ;)
  • Sicklyboy @ Sicklyboy:
    I'm not familiar with the technicalities of the differences between the two versions, but I'm wondering if at least some of those differences are things that you could port over to the US version in your patch without having to include copyrighted assets from the EU version
  • TwoSpikedHands @ TwoSpikedHands:
    @Sicklyboy I am wanting to fully change the game and bend it to my will lol. I would like to eventually have the ability to add more characters, enemies, even have a completely different story if i wanted. I already have the ability to change the tilemaps in the US version, so I can basically make my own map and warp to it in game - so I'm pretty far into it!
  • TwoSpikedHands @ TwoSpikedHands:
    I really would like to make a hack that I would enjoy playing, and maybe other people would too. swapping to the EU version would also mean my US friends could not legally play it
  • TwoSpikedHands @ TwoSpikedHands:
    I am definitely considering porting over some of the EU features without using the actual ROM itself, tbh that would probably be the best way to go about it... but i'm sad that the voice acting is so.... not good on the US version. May not be a way around that though
  • TwoSpikedHands @ TwoSpikedHands:
    I appreciate the insight!
  • The Real Jdbye @ The Real Jdbye:
    @TwoSpikedHands just switch, all the knowledge you learned still applies and most of the code and assets should be the same anyway
  • The Real Jdbye @ The Real Jdbye:
    and realistically they wouldn't

    be able to play it legally anyway since they need a ROM and they probably don't have the means to dump it themselves
  • The Real Jdbye @ The Real Jdbye:
    why the shit does the shitbox randomly insert newlines in my messages
  • Veho @ Veho:
    It does that when I edit a post.
  • Veho @ Veho:
    It inserts a newline in a random spot.
  • The Real Jdbye @ The Real Jdbye:
    never had that i don't think
  • Karma177 @ Karma177:
    do y'all think having an sd card that has a write speed of 700kb/s is a bad idea?
    trying to restore emunand rn but it's taking ages... (also when I finished the first time hekate decided to delete all my fucking files :wacko:)
  • The Real Jdbye @ The Real Jdbye:
    @Karma177 that sd card is 100% faulty so yes, its a bad idea
  • The Real Jdbye @ The Real Jdbye:
    even the slowest non-sdhc sd cards are a few MB/s
  • Karma177 @ Karma177:
    @The Real Jdbye it hasn't given me any error trying to write things on it so I don't really think it's faulty (pasted 40/50gb+ folders and no write errors)
  • DinohScene @ DinohScene:
    run h2testw on it
  • DinohScene @ DinohScene:
    when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying
    DinohScene @ DinohScene: when SD cards/microSD write speeds drop below a meg a sec, they're usually on the verge of dying