Skip to content

Instantly share code, notes, and snippets.

@break-core
Created June 27, 2026 08:05
Show Gist options
  • Select an option

  • Save break-core/0b31d9eca8de0b88968104f79e51d710 to your computer and use it in GitHub Desktop.

Select an option

Save break-core/0b31d9eca8de0b88968104f79e51d710 to your computer and use it in GitHub Desktop.
What code changed exactly between Deltarune 0.0.241 and 0.0.242?

These are all of the code changes in the 0.0.242 patch for Deltarune. It also helps explain what exactly got changed and why.

Bug fix numbers are used to make things easier to comprehend:

  1. Fixed a crash towards the end of the game in an area with a yellow guy in the background
  2. Fixed a crash involving a small glove
  3. Fixed a crash when encountering a leaf enemy while leaving a room
  4. Opening a pink door at a precise location no longer makes the screen go black
  5. Magical glass was placed over a wall you're not supposed to go over
  6. Using Rudebuster in the final phase of a pink enemy no longer crashes the game
  7. Fixed a crash if you put Ralsei in your party before sleeping in bed to skip the intro
  8. Fixed a crash when Trashy Trio are defeated
  9. Fixed a memory leak which could crash the game if certain actions were repeated an excessive number of times

msgset_add.gml

  • Added a new function called msgset_clear which clears all instances of obj_balloon_queue when it's ran
function msgset_clear()
{
    with (obj_balloon_queue)
        instance_destroy();
}

This is specifically used for fix #8.

scr_plat_encounter.gml

  • Added some code to prevent doors from being interacted when the encounter cutscene in plat mode is running.
mc.doorcooldown = 99999999;

This was probably for fix #3

obj_bullet_super_nubert2_Step_0.gml

  • Super Nubert's mercy is now capped at 99% instead of 100%
                 if (collision_rectangle(_box[0], _box[1], _box[2], _box[3], id, true, false))
                 {
                     other.nubert_hooped = true;
-                    scr_mercyadd(obj_trashy_trio.myself, 5);
+                    scr_mercyadd(obj_trashy_trio.myself, min(5, 99 - global.mercymod[obj_trashy_trio.myself]));

-                    if (global.mercymod[obj_trashy_trio.myself] >= 100)
+                    if (global.mercymod[obj_trashy_trio.myself] >= 99)
                     {
                         with (obj_trashy_trio)
                             do_postturn = true;

This was for fix #8

obj_ch5_LW21_arrive_Create_0.gml

  • Now, if the plot is less than 200, the party is now set to only include Kris in this object as a safety measure.
     global.interact = 1;
     con = 0;
+    scr_setparty(1, 0, 0);

     if (scr_debug() && !i_ex(obj_dw_transition))
         _manual_kris_set = true;

This is for fix #7

obj_dw_fcastle_dangerous_platforming_Step_0.gml

  • Adds a new invisible wall in a place which is not supposed to be possible to get to.
     if (global.flag[1454] < 40)
     {
+        var gm = scr_genmarker("no_early_jump");
+
+        with (gm)
+        {
+            var block = instance_create(x, y, obj_plat_block);
+
+            with (block)
+            {
+                image_yscale = 6;
+                visible = 0;
+            }
+        }
+
         remove_evidence();

This is for fix #5

obj_dw_fcastle_top_pinkdoor_Step_0.gml

  • Clamps the speed at which the party walks in a specific cutscene to prevent it from becoming 0 when a specific marker is reached
     var krdist = point_distance(kr_actor.x, kr_actor.y, krmarker[0], krmarker[1]) / 8;
     var radist = point_distance(ra_actor.x, ra_actor.y, ramarker[0], ramarker[1]) / 8;
     var sudist = point_distance(su_actor.x, su_actor.y, sumarker[0], sumarker[1]) / 8;
+    krdist = max(krdist, 1);
+    radist = max(radist, 1);
+    sudist = max(sudist, 1);
     c_sel(kr);
     c_walkdirect(krmarker[0], krmarker[1], krdist);
     c_sel(su);
...
     var krdist = point_distance(kr_actor.x, kr_actor.y, krmarker[0], krmarker[1]) / 8;
     var radist = point_distance(ra_actor.x, ra_actor.y, ramarker[0], ramarker[1]) / 8;
     var sudist = point_distance(su_actor.x, su_actor.y, sumarker[0], sumarker[1]) / 8;
+    krdist = max(krdist, 1);
+    radist = max(radist, 1);
+    sudist = max(sudist, 1);
     c_sel(kr);
     c_walkdirect(krmarker[0], krmarker[1], krdist);
     c_sel(su);

These changes are specifically applied when cutscenecon is either 1 or 5. It was done specifically for fix #4

obj_dw_fcastle_yellowblue_Step_0.gml

  • Yellow's gun will now only spawn if the instance ground actually exists properly in the yellow and blue fight
-            if (ground != other.last_ground && ground.sprite_width < 200)
+            if (instance_exists(ground))
             {
-                var xx = camerax() + 320 + (480 * gunside);
-
-                with (instance_create(xx, obj_plat_player.ground.y + 20, obj_dw_fcastle_yellowblue_gun))
+                if (ground != other.last_ground && ground.sprite_width < 200)
                 {
-                    scr_darksize();
-                    image_xscale = -2 * gunside;
-                    depth = 50000;
+                    var xx = camerax() + 320 + (480 * gunside);
+
+                    with (instance_create(xx, obj_plat_player.ground.y + 20, obj_dw_fcastle_yellowblue_gun))
+                    {
+                        scr_darksize();
+                        image_xscale = -2 * gunside;
+                        depth = 50000;
+                    }
+
+                    other.next_gun_side *= -1;
                 }
-
-                other.next_gun_side *= -1;
             }

This is for fix #1

obj_dw_garden_intro_Create_0.gml

  • Added a new debug button where pressing P sets global.tempflag[90] to 0.001. If it is detected as being set to that, the flag will be reset and the plot is reset to 199.
+if (scr_debug())
+{
+    if (keyboard_check(ord("P")))
+        global.tempflag[90] = 0.001;
+
+    if (global.tempflag[90] == 0.001)
+    {
+        global.tempflag[90] = 0;
+        global.plot = 199;
+    }
+}

This doesn't really fix any bugs, it was probably some testing feature left in.

obj_flowery_towery_CleanUp_0.gml

  • Added a small fix which prevents a memory leak related to not cleaning up surfaces within tower_surface
-if (surface_exists(tower_surface[0]))
+for (var i = 0; i < array_length(tower_surface); i++)
 {
-    for (var i = 0; i < layers; i++)
+    if (surface_exists(tower_surface[i]))
         surface_free(tower_surface[i]);
 }

This is specifically for fix #9

obj_initializer2_Create_0.gml

  • versionno is now v0.0.242, previous was v0.0.241. Though, you probably already knew that.
 global.savedata_async_load = false;
 global.savedata_error = false;
 global.savedata_debuginfo = "";
-global.versionno = "v0.0.241";
+global.versionno = "v0.0.242";

 if (scr_is_switch_os())
-    global.versionno = "v0.0.241";
+    global.versionno = "v0.0.242";
 else if (os_type == os_ps4 || os_type == os_ps5)
-    global.versionno = "v0.0.241";
+    global.versionno = "v0.0.242";

 global.pause_plat = false;
 global.game_won = false;

This is not a bugfix obviously lmao

obj_pink_enemy_Step_0.gml

  • Added some additional code for cleaning up additional actsimul party slots
         global.actsimul[myself][1] = 0;
         global.actsimulsus[myself][0] = 0;
         global.actsimulral[myself][0] = 0;
+        global.actsimul[myself][2] = 0;
+        global.actsimulsus[myself][1] = 0;
+        global.actsimulral[myself][1] = 0;
  • phaseturns is now clamped to 2 in the final dating phase (?)
             if (datecount == 3)
             {
+                if (phaseturns > 2)
+                    phaseturns = 2;
  • Remove some old fallback (?) dialog code that could be triggered if the datecount was 3
-        else if (datecount == 3)
-        {
-            msgset(0, pink_battle_dialogue61);
-            ballooncon = 0;
-            balloonend = 1;
-            _who_is_talking = "ghost";
-        }
  • Changed the following check to be < 3 rather than != 3
-        if (datecount == 3 && phaseturns != 3)
+        if (datecount == 3 && phaseturns < 3)
             rtimer = 12;
  • Changed completion handling to occur with a slightly different check
         if ((rtimer == 12 && doki < dokimax) || (doki >= dokimax && rtimer == 15))
         {
-            if (doki >= dokimax || (datecount == 3 && phaseturns == 3))
+            if (doki >= dokimax || (datecount == 3 && phaseturns >= 3))
  • Fix a misspelled variable name to correctly note that it's for Susie instead of Ralsei
-            var _r_actstring = stringsetloc("* Susie flirted!", "obj_pink_enemy_slash_Step_0_gml_757_0");
+            var _s_actstring = stringsetloc("* Susie flirted!", "obj_pink_enemy_slash_Step_0_gml_757_0");

             if (simultotal == 1)
             {
-                msgset(0, _r_actstring + "/%");
+                msgset(0, _s_actstring + "/%");
                 scr_battletext_default();
                 actconsus = 20;
             }
             else
             {
-                msgset(0, _r_actstring);
+                msgset(0, _s_actstring);
                 scr_simultext("susie");
...
         }
         else
         {
-            var _r_actstring = stringsetloc("* Susie flirted hard!", "obj_pink_enemy_slash_Step_0_gml_778_0");
+            var _s_actstring = stringsetloc("* Susie flirted hard!", "obj_pink_enemy_slash_Step_0_gml_778_0");

             if (simultotal == 1)
             {
-                msgset(0, _r_actstring + "/%");
+                msgset(0, _s_actstring + "/%");
                 scr_battletext_default();
                 actconsus = 20;
             }
             else
             {
-                msgset(0, _r_actstring);
+                msgset(0, _s_actstring);
                 scr_simultext("susie");

                 if (simulordersus == 0)

All of this code (except for stylistic stuff obv) is intended for fix #6

obj_plat_enm_smallglove_Create_0.gml

  • Added a check that ensures that the player exists before trying to calculate it's hit angle
         timer = 0;
-        hit_angle = point_direction(obj_plat_player.x, obj_plat_player.y, x, y);
+
+        if (instance_exists(obj_plat_player))
+            hit_angle = point_direction(obj_plat_player.x, obj_plat_player.y, x, y);

Intended for fix #2

obj_purplecontrols_Step_0.gml

  • Added something which checks that surface_effect does not exist before creating it
         if (made == 0)
         {
-            surface_effect = surface_create(300, 300);
+            if (!surface_exists(surface_effect))
+                surface_effect = surface_create(300, 300);
+
             pattern_list = ds_list_create();
             rotate_speed = 12;
             pattern_phase = -2;

This is intended for fix #9

obj_trashy_broom_Step_0.gml

  • Clamp mercy and winning mercy amount to 99 instead of 100%
                         damage++;
                         damagemessage = "+" + string(damage) + "%";
-                        global.mercymod[obj_trashy_trio.myself] = scr_approach(global.mercymod[obj_trashy_trio.myself], 100, 1);
+                        global.mercymod[obj_trashy_trio.myself] = scr_approach(global.mercymod[obj_trashy_trio.myself], 99, 1);
                     }
                 }

-                if (global.mercymod[obj_trashy_trio.myself] >= 100)
+                if (global.mercymod[obj_trashy_trio.myself] >= 99)
                 {
                     with (obj_trashy_trio)
                         do_postturn = true;

This is for fix #8

obj_trashy_hoop_Create_0.gml

  • Clamp mercy and winning mercy to 99 instead of 100%
             damagemessage = "+" + string(damage) + "%";
             var _pitch = 1.4;
             snd_play_x(snd_mercyadd, 0.8, _pitch);
-            global.mercymod[obj_trashy_trio.myself] = scr_approach(global.mercymod[obj_trashy_trio.myself], 100, arg0);
+            global.mercymod[obj_trashy_trio.myself] = scr_approach(global.mercymod[obj_trashy_trio.myself], 99, arg0);
         }
     }

-    if (global.mercymod[obj_trashy_trio.myself] >= 100)
+    if (global.mercymod[obj_trashy_trio.myself] >= 99)
     {
         with (obj_trashy_trio)
             do_postturn = true;

This is for fix #8

obj_trashy_trio_CleanUp_0.gml

  • Calls msgset_clear for additional cleanup
 with (obj_bullet_trash_small)
     instance_destroy();
+
+msgset_clear();

This is for fix #8

obj_trashy_trio_Create_0.gml

  • Adds a new clean_func which when called, frees my_surface if it was not already freed.
             d3d_set_fog(false, c_black, 0, 0);
         }
     };
+
+    clean_func = function()
+    {
+        if (surface_exists(my_surface))
+            surface_free(my_surface);
+    };
 }

 with (trashy_marker)

This was most likely for fix #9 but since it also applies to the Trashy Trio it kind of falls in with #8 too

obj_trashy_trio_Step_0.gml

  • Adds a new debug only key that, when pressing Control, it gives 98 mercy. Also adds some other code (?)
+if (scr_debug())
+{
+    if (keyboard_check_pressed(vk_control))
+    {
+        with (scr_mercyadd(myself, 98))
+        {
+            x += 40;
+            y -= 20;
+            ystart = x;
+            ystart = y;
+        }
+    }
+}
+
 if (global.monster[myself] == 1)
 {
     if (global.mnfight == 2 && global.turntimer <= -15 && global.mercymod[myself] >= 99 && fight_type != "over")
...
                     instance_destroy();
             }

+            global.flag[36] = 0;
             scr_wincombat();
         });
         cantalk = true;

This doesn't really fix any bugs (AFAIK) but it probably helped the devs test fixing the bug.

room_dw_fcastle_dangerous_platforming_204_PreCreate.gml

  • Sets extflag of the object to "no_early_jump", which helps with the other invisible wall code shown before.
extflag = "no_early_jump";

This fixes #5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment