Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

UndertaleModTool Switch

From GameBrew
Revision as of 03:23, 25 August 2024 by Hyatt (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
UndertaleModTool
Undertalemodtoolnx.png
General
Authorkrzys-h
TypeHack Utilities
Version0.6.1.0
LicenseGPL-3.0
Last Updated2024/08/24
Links
Bleeding Edge - Stable Download
Website
Source

The most complete tool for modding, decompiling and unpacking Undertale (and other Game Maker: Studio games).

Features

  • Can read every single byte from the data file for lastest version of Undertale, Deltarune, and most other GameMaker: Studio games (GM:S 1.4 and GMS2 bytecode versions 13 to 17 are currently supported) for every platform and then recreate a byte-for-byte exact copy from the decoded data.
  • Properly handles all of the pointers in the file so that if you add/remove stuff, make things longer/shorter, move them around etc. the file format won't break.
  • An editor which lets you change (almost) every single value, including unknown ones.
  • Includes a simple room/level editor.
  • Allows for code disassembly and editing. This means you can add any custom code to the game, either using the built-in GML compiler or GML assembly.
  • Experimental high-level decompiler. The output is accurate (except for the latest GameMaker versions), but it could use some more cleaning up of the high-level structures.
  • Support for running scripts that automatically modify your data file (or perform other nefarious tasks) - this is the way to distribute mods, but creating them is a manual job for now. It also serves as a replacement for sharing hex editor offsets - if you make it into a file-format-aware script instead, there is much smaller change of it breaking after an update.
  • All core IO functionality extracted into a library for use in external tools.
  • Can generate an .yydebug file for the GM:S debugger so that you can edit variables live (see here).
  • Automatic file associations for all GameMaker related files. This can be disabled by having a dna.txt file next to the executable.

User guide

UndertaleModTool has different builds per release. The differences are as follows:

  • .NET bundled - Bundles the required .NET runtime version needed to run the tool alongside it. All stable releases are .NET bundled, so you don't have to worry about installing the necessary runtime.
  • Single file - The tool is only one executable, with all dependencies embedded within it. This does make your folders cleaner, however it also causes some unexpected stability issues.
  • Non-single File - All dependencies are not embedded within the executable, but are now located right next to it. Choose this if you don't care about finding the right executable in-between of ~300 dll's, or if the stability issues from the Single file build affect you.

Some test scripts are included:

  • Universal:
    • Search - Basic text search within decompiled code entries.
    • Scripts to batch import and export various types of asset files.
  • Undertale only:
    • EnableDebug - Activates Undertale's debug mode by enabling the global variable 'debug' at game start.
    • DebugToggler - Allows toggling the debug mode on and off with the F1 key.
    • BorderEnabler - Facilitates the importation of PlayStation exclusive borders into the PC version, while ensuring proper display by patching version checks.
    • Testing - Displays random text on the main menu, this was the first script ever created.
    • TTFFonts - Makes the game load fonts in TTF format from current directory instead of using the spritesheet fonts. You'll need to provide the font files yourself.
    • RoomOfDetermination - Adds a new room to Undertale 1.08. Although incomplete, it serves as a comprehensive example of adding content.
  • Deltarune only:
    • DeltaHATE - HATE-inspired script for corrupting Deltarune
    • DeltaMILK - Replaces every non-background sprite with the K.Round healing milk. Don't ask why.
    • TheWholeWorldRevolving - Creates a spinning effect.
  • Undertale and Deltarune only:
    • GoToRoom - Replaces the F3 button's debug mode functionality with a dialog allowing you to jump to any room by its ID.
    • ShowRoomName - Displays the current room name and ID on the screen during debug mode.

Additionally, there are some community-made scripts. For more information, consult the SCRIPTS.md file.

Documentation is available on UndertaleModTool wiki.

Screenshots

undertalemodtoolnx2.png

Undertale: Bits and Pieces
undertalemodtoolnx3.png

RIBBIT - The Deltarune Mod
undertalemodtoolnx4.png

Changelog

0.6.1.0

  • Changed
    • The RunSwitchOnPC.csx script now helps with running the Switch and Xbox versions of Undertale on PC. It has thus also been renamed to RunSwitchAndXboxOnPC.csx
  • Fixed
    • Fixed the EmSize field on font assets always being loaded as the number 0, in games where it was a floating point number.
    • Fixed GameMaker version 2023.1 getting misdetected when loading, due to some unnecessary leftover code.

0.6.0.0

  • Added
    • Added GameMaker 2023.4, 2023.6, 2023.8, and 2024.2 support.
    • Added GameMaker 2022.0.2+ LTS support.
    • Added partial save/load support for GameMaker 2024.6.
    • The GUI will now show extension options from GameMaker 2022.6.
    • A new tooltip explains what the asset index shown in the bottom right corner means.
    • Profile mode support has been added for GameMaker 2.3+ games.
    • YYSWF support has been added for GameMaker 2022.1 games
    • The "ImportGMS2FontData" script is now able to handle font data from GameMaker 2023 IDEs.
    • A "TouchControlsEnabler" script has been added, which allows enabling touch controls in an Undertale game.
    • Added Spine sprite support for GameMaker 2023.1.
    • Struct support has been added.
  • Changed
    • The "ImportGraphics" script has been changed to accept sprites with zero-padded indices (e.g. spr_abc_001.png).
    • The "SpriteOriginCopy2_3" script has been removed, as its behavior was merged into the "SpriteOriginCopy" script.
    • The "ApplyBasicGraphicsMod" script will no longer tell you that image dimensions are not the proper size, as the check for it was faulty.
    • The "NewTexturePacker" script has been improved to bin pack better, as well as have the ability to change the bin sizes for both dimensions.
    • Decompiling and disassembling code entries will now be slightly faster and use a lot less RAM.
    • The "ImportAllEmbeddedTextures", "ImportAllStrings", "ExportAllStrings", "ExternalizeAllOGGs", and "ExportAllSounds" scripts are no longer Windows-only.
    • The "TTFFonts" script now makes it clearer that it's only meant for Undertale.
    • Removed redundant .NET localization folders (e.g. "cs", "de", "es"...) for the non-single file version.
    • When failing to fetch a localization comment for Undertale or Deltarune, it is now shown as // <localization fetch error>.
    • More assets in Deltarune will now be shown correctly rather than as numbers.
    • When using scripts with the CLI, the "Newtonsoft.Json" library is now added as a reference.
    • The "ExportAllSprites" script will now ask you if you want each sprite in a subfolder.
    • The "DebugMsg" script can now be used again.
    • A message box is no longer shown when saving a profile for profile mode.
    • Updated GitHub URLs to point to the new organization's version of the repository.
    • Some discrepancies between Debug and Release builds have been removed, when loading data files.
    • The Git commit hash is now shown in the title bar of bleeding edge builds produced by GitHub Actions.
    • Exception messages in the GUI, as produced by C# scripts, have been improved to look better with multiple scripts in the stack trace.
    • The line numbers in search results are now clickable.
    • API: Multiple public lists now have a setter.
    • API: Add a lot more documentation.
    • API: Small documentation revisions made to some models in the library.
  • Fixed
    • UTMT will no longer duplicate function names.
    • UTMT will no longer randomly crash when attempting to save.
    • The "ImportGMLFile" script will not prompt you to enter an object name when importing collision event scripts.
    • UTMT will no longer sometimes open an incorrect tab, as opposed to the one you clicked on.
    • UTMT will no longer scroll the tab view if the current tab is already fully visible.
    • Some code entries which contained switch statements will no longer freeze the decompiler.
    • The CLI will no longer crash when attempting to dump code from a YYC game.
    • The warning that appears when a file has unexpected padding will no longer be shown in the CLI, when verbose is off.
    • Fix edge case where pasting new code on top of a code entry that had an exception in its output will crash UTMT.
    • Fix UTMT crashing in certain cases when exporting a room as a PNG ("ExportAllRoomsToPng.csx").
    • Adding a new shader now properly allows you to edit it.
    • The disassembly tab will no longer freeze on large code entries.
    • UTMT will now properly discover GameMaker 2.3+ runtimes.
    • When decompiling code, return statements will now be properly shown again.
    • When decompiling certain code entries, parentheses will now be placed to prevent inaccurate decompilation.
    • Fix decompilation errors from code entries using the Boolean type introduced in GameMaker 2.3.7.
    • Fix an edge case where compiling a code entry that had boolean expressions inside of a binary operation would cause games to crash.
    • Detecting GameMaker 2.2.2.302 no longer fails on certain edge cases.
    • Fixed cases where games using shaders and bytecode 13 would not load correctly.
    • Fixed background/tileset parsing for bytecode 12 games.
    • Renamed the ClearDisplayBuffer flag to DoNotClearDisplayBuffer, as that's what it's actually doing.
    • Fix the font size being inaccurately saved as whole numbers.
    • Fix the CLI crashing when a warning or an error has occurred.
    • Fixed an edge case where the built-in updater would crash.
    • When using profile mode, fetching localization comments for Undertale or Deltarune will not endlessly append them.
    • Allow some GameMaker 1.0.0.1250 games, which used builtin audio groups, to load.
    • Fix a regression that led to GameMaker 2.3.1 detection not working correctly in some games.
    • Fix external textures producing warnings when loading data files.
    • Fix false-positive GameMaker 2022.1 version detection, which led to some early 2.3 games failing to load.
    • Fix GameMaker 2.0.6 version detection occurring too late in the load process.
    • Fixes in the decompiler involving parentheses and correctness of the right sides of arithmetic.
    • Fix C# scripts being unable to use relative paths when using the #load preprocessor.

0.5.1.0

Additions:

  • The dark mode setting (@VladiStep in #1141, #1221, *#1273, #1336, #1342).
  • Tabs content state saving and restoring (tab sessions) (@VladiStep in #1152).
  • More ways of opening an object in a new tab (@VladiStep in #1232).
  • The "Find all references" feature and the new "Find" menu: (@VladiStep in #1246)[0].
  • Allows you to search for references of any common type asset by right-clicking:
    • An asset in the main list.
    • An object reference in the "Object definition" fields.
    • A tile on the GMS 2 tileset image (@VladiStep in #1288).
    • A texture page item on the embedded texture image (@VladiStep in #1293)[0].
  • A support for the tile layer exported data (.csv) from "Tiled" (@VladiStep in #1280)[0].
  • A proper support for code with multiple functions (@Jacky720, @VladiStep in #1191).
  • Proper code editors for shaders (@VladiStep in #1294).
  • A support for sequence text tracks (GM 2022.2 - e.g. "Dono’s Tale") (@VladiStep in #1197).
  • New scripts - "SpriteOriginCopy.csx", "SpriteOriginCopy2_3.csx" (@fixdude in #1144).
  • A support for GM 2023.1 games (e.g. "HoloCure", "Alien XENOCIDE") (@VladiStep in #1206).
  • A support for some GMS 2.0 games (@VladiStep in #1205, #1329).
  • A support for GM 2023.2 games (and particle systems) - e.g "The Slormancer", "Nova Drift" (@VladiStep in #1238, #1353, #1361).
  • An indication for the sub-functions cache building on first decompilation and 3 minutes timeout for it (@VladiStep in #1241).
  • Proper sequence model names for debugging and the "Find all reference" results (@VladiStep in #1254).
  • A support for games with room path layers (@VladiStep in #1256, #1268).
  • A possibility to delete room objects through context menu (@zivmaor, @VladiStep in #1301).
  • The "Run other script..." option on missing "Scripts" folder (@VladiStep in #1364).
  • An option to export one sprite with padding (@VladiStep in #1367).

Fixes:

  • A memory leak of UTMT scripts and the command box (@VladiStep in #1220).
  • A bug with textures not being displayed in GM 2022.3+ games; improvements of an "ImportGMS2FontData.csx" script (@Dobby233Liu, @Miepee, @VladiStep in #1048).
  • A bug with PromptChooseDirectory() infinite loop in CLI (@VladiStep in #1183).
  • An "ExportAllRoomsToPng.csx" script error (@VladiStep in #1164).
  • A crash in CLI version on events replacing (@TheAwoo in #1174).
  • A "Texture failed to loaded!" error in the embedded texture editor (@VladiStep in #1199).
  • An extension file and function tab titles display (@VladiStep in #1200).
  • A room background definition removing (@VladiStep in #1202).
  • A crash in "Deltarune 1&2" after a "Ch2 Debug.csx" script (@Jacky720 in #1188).
  • The "Gdip" crash in CLI version on loading GM 2022+ games (@VladiStep in #1302).
  • An annoying XAML binding error in "Visual Studio" log (@VladiStep in #1228).
  • Environment.ProcessPath warnings in "Visual Studio" (@VladiStep in #1234, #1258).
  • A bug in the code editor that led to freezes on some errors (@VladiStep in #1243).
  • The "FindUnusedStrings.csx" script (@VladiStep in #1246)[1].
  • A rare crash on drag&dropping within the asset list and the tab panel (@VladiStep in #1264, #1289).
  • A crash on the tileset image click (@VladiStep in #1274).
  • Incorrect GMS 2 rotated/flipped tiles display (@VladiStep in #1280)[1].
  • A bug that broke the "Disassembly" code editor tab on some localizations, e.g. Turkish (@VladiStep in #1298).
  • A random SaveCodeChanges() crash on data saving (@VladiStep in #1304).
  • A rare crash on opening the "Disassembly" code tab (@VladiStep in #1322).
  • A crash on invalid entered color value (@VladiStep in #1357).

Changes:

  • The version flags cleanup and proper GM(S) version in the title (@Jacky720, @Miepee, @VladiStep in #1047; @VladiStep in #1213).
  • Game data loading is noticeably faster and uses less RAM (@VladiStep in #1161).
  • Made the embedded texture image zoomable and more interactable (@VladiStep in #1293)[1].
  • A lot of the font editor improvements: (@VladiStep in #1328, #1331, #1332, #1346).
    • Added the red marker for the selected glyph, made the font texture clickable.
    • Made the glyphs table show and accept actual characters.
  • ... and more! See the PR description.
  • Disabled room layers are highlighted with gray color (@VladiStep in #1201).
  • The "Timestamp" value (in "General info") is in human-readable format (@VladiStep in #1226).
  • An optimization of the "data.win" file context menu options - e.g. "Run game normally" (@VladiStep in #1245).
  • An optimization of "ExportAllCode2_3.csx" script (@VladiStep in #1239).
  • Room object names improvements (@VladiStep in #1246)[2].
  • Made the room instance layer objects resolving safer - adds a support for a "Pizza Tower D3 v3.1" mod and "Heroine Conquest" (@VladiStep in #1266, #1299).
  • Made the GMS debugger related things more distinguishable from the debug mode in some games; the GMS debugger file option is hidden by default (@VladiStep in #1330).
  • Improved the object reference fields clarity (@VladiStep in #1363).

Release notes.

External links

Advertising: