Underanalyzer compiler integration#2056
Merged
colinator27 merged 25 commits intounderanalyzerfrom Mar 19, 2025
Merged
Conversation
Mostly missing code append operations at the moment, but replace operations are functional
Removed a LOT of legacy code with this pass, and upgraded many built-in scripts
|
Download the artifacts for this pull request here: GUI:
CLI: |
This was referenced Mar 9, 2025
Closed
Closed
Closed
Bugs fixed include handling -0 rotation, and properly handling nonexistent instance IDs on layers. GameSpecificResolver has also been made thread-safe with its definition loading.
Also implements MurmurHash in the library (with tests)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Integrates the new compiler from Underanalyzer into UndertaleModTool. In doing so, new code compiling and importing APIs have been added to the library, and a lot of related legacy or dead code has been removed. The new compiler should support everything the old one supported, plus proper support for additional GMLv2 (GameMaker 2.3+) language features that have been missing for years. This allows many more game scripts in recent games to be easily modded.
Update: This PR has been extended with a bunch of bugfixes resulting from initial testing, as well as major refactors of code dealing with the file format, mainly in an effort to reduce memory usage and improve performance slightly. This has been tested on a variety of games using the new local game test added in this PR, made possible by the library now being mostly thread-safe for saving/loading.
Caveats
CheckDecompiler.csx, which will recompile every script in a game, measuring accuracy of (de)compilation. Usually, as long as the code decompiles to the same source code after compilation, it'll work fine.ImportCode.csxmay function a bit differently, and they can no longer automatically create collision events on objects if they don't exist (which previously could require prompting the user). In general, all code importing scripts will now create objects automatically, without user input. (Also, the CLI can now create scripts/objects/etc., and will now prompt you for collision events, specifically.) Looking for any feedback on this change, and whether any of the old behavior needs restoring.Notes
This should get some good testing before being merged into the main
underanalyzerbranch, before that branch itself eventually gets merged into the main tool.