UndertaleModTool icon indicating copy to clipboard operation
UndertaleModTool copied to clipboard

UA: Add rough check for CodeLocals' removal from FUNC in 2024.8

Open Dobby233Liu opened this issue 1 year ago • 5 comments
trafficstars

Description

As @colinator27 noted around the time of GM 2024.8(00) Beta's release, this GM version removes the CodeLocals list from the FUNC chunk. This PR adds logic to detect this, and makes builtin scripts aware of this.

Might fix #1928.

For contributors: feel free to continue this yourself if it's stuck in limbo or something.

Caveats

  • HEAVILY UNTESTED, the disassembler didn't get touched a lot. I only checked whether (de)serialization works as expected.
  • Variable names are no longer highlighted in the code editor.

Notes

Data.CodeLocals is now null if the bytecode version doesn't support it, it must be created manually if needed.

Dobby233Liu avatar Oct 04 '24 14:10 Dobby233Liu

Doesn't look too wrong so bug catching can take place. No clue what to do with the disassembler's message

Dobby233Liu avatar Oct 04 '24 14:10 Dobby233Liu

~~Amazing UX GitHub, I'm trying again. Might fix #1928.~~ Incomprehensible

Dobby233Liu avatar Oct 04 '24 14:10 Dobby233Liu

I am unable to use the search function when using this artifact fyi, but it does load 2024.8 data for reading and some editing. It seems to have a chance to somehow corrupt gml scripts, from time to time when I make a modification and leave a script, I'll try to come back to it and get that giant wall of greentext.

JeodC avatar Oct 06 '24 18:10 JeodC

Can confirm that it does fix https://github.com/UnderminersTeam/UndertaleModTool/issues/1928

LukeWarnut avatar Oct 08 '24 13:10 LukeWarnut

NewTextureRepacker.zip

I modified the NewTextureRepacker script to be a form instead of a messagebox. This is useful since it contains user configurable items that the user may wish to change on a per-game basis. The reuse extracted items checkbox does not work atm. Feel free to implement it and adjust.

image

JeodC avatar Nov 27 '24 14:11 JeodC

FYI I am using this build and as of 2024.11 there is a SHDR error on data.win load as seen in #1996. Does not occur with every game. If a data.win does load, it has about a minute of misaligned readings to wade through.

JeodC avatar Dec 28 '24 00:12 JeodC

Okay, while there's all sorts of weirdness brought by this, like the mildly inconvenient code editor UI situation (probably got to rely on Colin's work here anyway as I have no idea how all that stuff works). Signs lead me to believe this is fair enough for initial implementation, and basically I'm done with it at this point (focus has moved on to #2013), so it's probably the right time (finally) to open this up for review so things can get moving faster.

Dobby233Liu avatar Jan 20 '25 17:01 Dobby233Liu