If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Undertale Yellow/Debugging Tools

From The Cutting Room Floor
Jump to navigation Jump to search

This is a sub-page of Undertale Yellow.

Hmmm...
To do:
  • Slightly broken old debug functions: obj_debug_(overworld/battle)(_old); global.debug_toggle, global.debug_menu (battle)
  • obj_debug_main_menu (obj_transition_white_debug relevant) which is pretty much dummied out
  • obj_dbgencounter, clearly from the legacy engine
  • obj_verlet_integration global.debug_render_path

Just like the base game, Undertale Yellow contains debugging tools. However, unlike the prior, which has most of them locked behind a simple switch, Yellow‍ '​s appear much more scattered around, without any trace of code to put all of them together; there is even a kind of tool that is completely broken without code changes. This article currently aims to document all that's usable out of the box.

(Source: Original TCRF research)
Download.png Download .xdelta patch for enabling all debug features (apply on data.win)
File: UTYellow_v1.1_Debug_Mode_xdelta_patch.zip (755 KB) (info)
Current version: v1.1
(Source: Original TCRF research)

Debug Main Menu

UTYellow rm mainmenu debug.png

Available in rm_mainmenu_debug, thus you can enter it through save editing. You can also edit obj_intro_generator to send you to the room right away, which is probably how it works in "debug builds". (Tip: Delete splash.png to make startup faster.)

  • CONTINUE - Loads the latest save file.
  • RESET OPTIONS
    • ROUTE - PACIFIST/NEUTRAL/GENO. Only global.route will be set according to this, except for GENO (will be set to NEUTRAL) for some reason.
    • BONUS ITEMS - If 1, the game will start with Wild Revolver and Fancy Holster already equipped on Clover.
    • FOLLOWER - Can be Ceroba, Martlet, or none.
    • ROOM - Every room in the game is selectable. Their raw names are presented.
  • RESET - Starts a new game, with configurations made according to the options above. Clover will spawn at (320, 240) and face upwards.
  • INSTANT CEROBA - Starts the 3rd phase of Ceroba's Pacifist route fight.
  • INSTANT FLOWEY - Starts Flowey's Neutral route fight.
    • Pressing Z starts the 1st phase of the fight, skipping the intro.
      • Decibat, Dalv, Starlo, Guardener, Axis, and Ceroba will be marked as killed.
    • Pressing X starts the 2nd phase of the fight, with the intro.
  • INSTANT MARTLET - Starts the 1st phase of Martlet's Genocide route final boss fight.

Boss Debugger Objects

Selecting INSTANT CEROBA/MARTLET will also spawn in respectively obj_ceroba_debugger or obj_martlet_debugger (which shares code). This causes a few things to happen:

  • The player's inventory will be filled with Homemade Cookies.
  • global.turns_passed will be set to 0 every frame.
  • global.attack_cycle will be drawn at the up-left corner of the screen.
  • Ceroba only
    • The battle will skip forward to the 3rd phase.
    • global.player_armor_defense will be set to 11 every frame.

The following hotkeys will be available:

  • PgUp/PgDown: In/decreases global.attack_cycle by 1.
  • Ceroba only
    • Numpad 0: Changes Ceroba's sprite to spr_ceroba_p2_idle_reveal.
    • Numpad 1: Changes Ceroba's sprite to spr_ceroba_p2_sign.
    • Numpad 2: Changes Ceroba's sprite to spr_ceroba_p2_1.

In-Game Debug Tools

scr_debugmode appears to contain debug functionality. However, this script is never called in the released versions of the game. To use these functionalities, put scr_debugmode() at the start of gml_Object_obj_pl_Step_0.

Hmmm...
To do:
Does this make sense?

The following hotkeys are provided by the script:

  • ⇧ Shift+F5: Saves the game.
  • ⇧ Shift+F6: Loads the game.
  • ⇧ Shift+F2: Toggles noclip.
  • ⇧ Shift+E: Spawns in obj_debugger.
  • ⇧ Shift+F1: Opens a now-removed Google Docs spreadsheet relevant to development (though world-viewable), originally known as UTY PROGRAMMING TO-DO (SPASCO) or Spasco's To-Do.

It also appears to track the GOLD SPENT, TOTAL GOLD, and TIMES HIT stats for the unused summary screens.

obj_debugger

UTYellow obj debugger.png

obj_debugger displays a menu at the up-left corner of the screen, along with FPS/ROOM to the right of it. FPS (along with ROOM) will turn red when it's below 30, the target framerate of the game.

  • Press LMB anywhere on the map to warp the player to it. The sound snd_monster_damage_death is played as a confirmation.
  • Press RMB to display the name of the object under your mouse cursor. The game will crash if nothing is being hovered over.
  • Press W (up)/A (left)/S (down)/D (right) to navigate the menu.
  • Press E to confirm a selection, and Q to exit a (sub)menu (cancel).
  • Press M hides the menu and shows the current play time at the up-right corner of the screen.

ROOMS

Displays a list of rooms by their internal names, with undefined at the end of the list for some reason. Warp to the room you selected by pressing Confirm. Pressing Left/Right changes the selection by 5 rooms.

BATTLES

  • LVL UP: Levels Clover up, changing their stats accordingly.
  • LVL RESET: Sets Clover's LV to 1.
Hmmm...
To do:
List available selections in a Notes page
  • CHOOSE BATTLE / BOSS BATTLE: Select Left/Right then start with Confirm.

CHEATS

All options that have values require confirmation to be applied.

  • GAME SPEED: This can range from 0.5x to 6x. Left/Right changes this by 0.5; a maximum of 4x can be reached by pressing Right, and a maximum of 6x can be reached by pressing Left.
  • 9999 HP: Locks Clover's current HP and max HP to 9999.
  • NO COL: Would have toggled noclip but is nonfunctional, as the menu sets the wrong variable for this.
  • GET G: Gives Clover a specified number of GOLD, in the range of 0-9999. Note that Left/Right only changes the value by 1, and can't be repeated. A sound is played upon confirmation.
  • EASY ITEMS: Adds the Golden Scarf and Super Ammo to the inventory; both items are unused.
  • ROUTE SELECT: Possible values are "neutral"/"pacifist"/"M U R D E R" (Genocide). A sound is played upon confirmation.
  • KANAKO TIME: Sets the player's sprite to Kanako. This feature is not seen anywhere else in the game. Note that if a palette was applied on Clover, Kanako may appear completely red.
  • SUPER DEBUG: Spawns in obj_debug_skipper.

RESTART GAME

Restarts the game.

EXECUTE GML

Opens a dialog box for you to input GML code, then executes it through GMLive. The result will be outputted to the debug log. Due to the lack of GMLive's actual code in the final game, this always fails and causes the game to crash.

Removed/Unavailable Functionalities

  • It seems that this menu allowed you to record a GIF of the game at some point, but the actual functionality is missing.
  • When no_encounters is set to true, any random or scripted encounters are removed.
  • Setting sixty_fps to true increases the game's target framerate by 15; it warps back to 30 when it has already reached 180. However, the existence of GAME SPEED makes this useless.

SUPER DEBUG

Also known as obj_debug_skipper, it can be spawned through the obj_debugger menu. It exhibits the following behaviors:

  • It sets the game's target framerate to 150, unless when a puzzle exists, you're playing Mew Mew Love Blaster, or Tab ↹ is being held.
  • It automatically skips dialogue when the game window is focused.
  • It forces the animation speed of any animating objects to 1, and prevents their animations from looping.
  • It keeps the player's HP from draining.
  • In non-boss battles, it automatically marks all enemies as sparable. You can also make a boss sparable by pressing S.
  • It automatically targets the Toy Gun and Wild Revolver perfectly.

Dev Console

A console exists as the object obj_dev_console, however, there's no code to spawn it. In order to spawn it in, you can:

  • Edit your save to have your follower set to obj_dev_console (I mean it);
  • Or insert the following piece of code after line 27 of scr_debugmode, which will allow you to toggle the console by pressing ⇧ Shift+D:
if (keyboard_check_pressed(ord("D")) && keyboard_check(vk_shift))
{
    if (!instance_exists(obj_dev_console))
        instance_create(0, 0, obj_dev_console)
    else
        instance_destroy(obj_dev_console)
}

Its controls are as follows:

  • Click LMB to select an object instance.
    • Its name will show up as the first line of the console, and the first entry in its variable list will also be selected and show up as the second line.
  • Press PgUp/PgDown to change the variable selected to the next/previous one in the list.
  • Click RMB to deselect the last instance selected.

A very small set of commands are available. With an instance selected (even though only 1/4 of the commands are relevant to it), input your command with your keyboard, then press Home to execute it.

  • varset [value]: Changes the value of the selected variable. If the original value of the variable is a number, your input will be converted to a number; otherwise, it will stay as a string.
    • At least that is how it is supposed to function; the console actually tries to set the value of the variable to your entire command, instead of just the value you specified.
  • roomset [name]: Changes the current room to the one specified; takes the internal name.
  • mute: Mutes the game.
  • unmute: Unmutes the game.

Leftover Debug Features

Flowey Battle Phase 1

Phase 1 of Flowey's neutral fight checks for some keys, probably for debugging purposes. This still exists as of v1.1.0.

  • O: Set Flowey's current original attack to the next available one; this applies immediately.
  • P: Ends Flowey's turn immediately. This doesn't necessarily end his attack properly, and so may result in a game crash.
Hmmm...
To do:
UTY speedrun community technically found this first, get proper credit

Miscellaneous

Script scr_report_bug, when run, opens a prompt to ask whether the player would like to report a bug, and if so, opens another prompt to let the player input a description of the bug. It then invokes the browser to submit the description to a Google form, which either is private or no longer exists. It would've probably been called when a hotkey is pressed, for playtesters to report bugs quickly.

Object obj_battle_debugger exists, but it only contains empty Create and Step events, and no code references it.