UnderminersTeam / UndertaleModTool

The most complete tool for modding, decompiling and unpacking Undertale (and other GameMaker games!)
GNU General Public License v3.0
1.14k stars 217 forks source link

Decompiler detects some scripts arguments that use sounds and sprites as real numbers. #1143

Closed Romualdo666 closed 7 months ago

Romualdo666 commented 1 year ago

Describe the bug

Basically the following scripts detect their arguments related to sounds and sprites as real number, therefore, on code you see them as numbers instead of their assets names. Some of the most important affected scripts are: c_sprite, c_soundplay, c_soundplay_x, c_visible, c_specialsprite, c_jump_sprite, c_instance-

Reproducing steps

open any code, utilize some of the scripts mentioned before, and for example, c_sprite(spr_krisd) will be displayed as c_sprite(661).

Setup Details

Latest Undertale mod tool bleeding edge version. Windows 11. Deltarune chapter 1 & 2 version 1.10

BenjaminUrquhart commented 1 year ago

This is because internally, they are numbers. The decompiler uses context clues and manual corrections to determine whether those numbers should be interpreted as something else. In this case, I don't think corrections have been added for the cutscene scripts yet.

Jacky720 commented 1 year ago

Have the listed scripts been fixed? It seems like c_sprite has, at least.

Jacky720 commented 7 months ago

c_specialsprite uses a custom index, not a resolvable asset value, and I don't see any c_instance functions. Of the remaining functions, only c_visible doesn't currently resolve (and a 0 or 1 doesn't exactly seem like top priority, but it should be easy to add).