UndertaleModTool
UndertaleModTool copied to clipboard
Known 2.3 Compilation/Decompilation Errors
This is a list of errors I have thus far encountered when reviewing compilation for Deltarune Chapter 1&2.
Crashes:
- [ ] Assignment to variables which share names with scripts (gml_Object_obj_CHAPTER_SELECT_Create_0)
- [ ] Local function recognition (gml_Object_obj_darkfountain_Draw_0)
- [ ] Something with decompilation of a local assignment yields
var a +=(gml_Object_obj_queen_bulletcontroller_Step_0) - [x] 8bf886fa50b6d3843a177f7b885d0ba7e229e79f
buffer_get_surfacenow should accept fewer arguments (gml_Object_obj_shapepuzzle_Draw_0) - [ ] @@ functions (gml_Object_obj_tensionbar_Draw_0)
- [ ] Instance IDs with dot notation (several room start entries)
- [x] e5ada7453b035edccdedcbbc21bffd43ec217138 Scripts. While I have made some progress on assembling these (hackalicious branch), the offsets in references still need to be adjusted.
Non-matching:
- [ ]
setownercalls. Currently, I'm ignoring these, which really helps. - [ ] Weird decompilation of a
whileloop as awhileloop inside an identicalifstatement (gml_Object_DEVICE_CHOICE_ch1_Step_0) - [ ] Code duplication in decompilation of
breaks in loops. I think this has actually been around before 2.3; as I recall, Undertale narrowly avoids it using the profile system. (gml_Object_DEVICE_FAILURE_Step_0) There is a similar issue in someforloops, apparently without thebreakstatement; this may indicate an undecompiledcontinue? (gml_Object_lang_sprite_layer_hider_Create_0) - [ ] Array
++/--calls do not compile correctly. (gml_Object_DEVICE_MENU_Step_0) - [ ] Global array
++/--calls do not decompile correctly. (gml_Object_obj_battlecontroller_Step_0) - [ ] Several collision events are compiling with
bforbinstructions shooting just short of instructions they should come after, includingpopenvs,popzs, and evenbs (gml_Object_o_coaster_jama_Collision_o_coaster_hero) - [x] 5a6e45a1b1e785050048a22e2a87019a27675166
room_speedis being popped as a Self variable, not a Builtin? (gml_Object_o_boxingcontroller_Create_0) - [ ] Assigning other objects' alarms needs a
conv(to variable) instruction in 2.3. (gml_Object_o_boxingqueen_Step_0) - [x] 5a6e45a1b1e785050048a22e2a87019a27675166 Builtin arrays are incorrectly compiling as Self, including the -5/-1 bit that is still used in 2.3. (gml_Object_o_coaster_berdly_Step_0)
- [ ] Something is incorrect (maybe use of the bool type?) in compiling a complex
ifclause. (gml_Object_obj_alleyswitch_Step_0) - [ ]
instance_exists(self)should compile using@@This@@. Likewise withother. (gml_Object_obj_battle_cleanup_Alarm_0) - [ ] Some apparently useless
binstructions (going where the code was going anyway) are being dropped. (gml_Object_obj_battletester_Draw_64) This also seems to show up in profile-less Undertale. - [ ] Ternaries with
? 1 : 0are simplified in decompilation to use the condition directly. (gml_Object_obj_berdlyb2_enemy_Step_0) - [ ] Anonymous script offsets are still not corrected, but this appears to only be an issue for exact 1:1 saving; the game runs with only minor tweaks after CheckDecompiler.
- [ ] Anything with multiple functions becomes a mess.
- [ ]
returnstatements inifs do not compile (gml_GlobalScript_scr_drawpart_crop). - And more... Le sigh.
Some of these have seperate issues. Might wanna collect them here. The return statement in an if statement i.e. sounds like #900