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

GameObjectCopy.csx corrupts data.win. #1248

Closed Romualdo666 closed 1 year ago

Romualdo666 commented 1 year ago

Describe the bug

Basically, using GameObjectCopy.csx on the newest umt bleeding edge build, corrupts your data.win file. Not even an error message is shown, and the script works correctly, but a lot of gml instances get corrupted and the decompiler can't load them. I've just done this with Deltarune though. importing undertale objects into deltarune basically. But it used to work before, so I am pretty sure is something that came along with the functions thing and stuff.

Reproducing steps

  1. Execute GameObjectCopy.csx
  2. Import any object.
  3. Many instances of code get corrupted.

Setup Details

  1. Latest undertale mod tool bleeding edge.
  2. Deltarune
  3. Windows 11
VladiStep commented 1 year ago

I found the cause of it - the errors started to appear after this PR - Clean up version flags. The decompiler thinks that the code of Undertale is GMS 2.3.

VladiStep commented 1 year ago

Actually, not exactly like that - after the decompilation of Undertale code, GMS2_3 decompiler variable becomes false, so when you return to Deltarune, it treats the code as it's GMS 1.