Accurate full runtime versions, LTS 2022.0 mapping, (and real build numbers) - #2490
Open
doggywatty wants to merge 1 commit into
Open
doggywatty wants to merge 1 commit into
doggywatty wants to merge 1 commit into
Conversation
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
UTMT currently gets the GameMaker version from the data.win format, but GMS2+ games generally store
2.0.0.0there. This means we can usually only identify the format level (for example,2022.3or2022.9), rather than the exact runtime that was used to build the game.As a result, UTMT could report versions that don't actually exist, such as
2022.3.0.0, and could also misidentify LTS games. A good example is Pizza Tower, which uses the2022.0.1.30LTS runtime. The2022.0LTS format is effectively the same as the monthly2022.9format, so they can't be distinguished from data.win alone.This PR improves version detection by mapping known format versions to their actual GameMaker runtime builds, while also making version comparisons and display LTS-aware.
Changes:
UndertaleModLib/UndertaleChunks.cs(CheckFor2022_9And2023)2022.9detected from theTGINchunk is now treated as the2022.0LTS runtime and usesSetGMS2Version(2022, 0, 1, 30, true).2022.0LTS is based on the monthly2022.9release and includes its 9.1 fixes. Since the two formats are indistinguishable, this gives us the more useful and accurate version for games such as Pizza Tower.UndertaleModLib/UndertaleData.csKnown runtime mappings include:
2022.2 to 1.4912022.3 to 0.4972022.5 to 2.132022.8 to 0.502023.1 to 1.812023.2 to 0.872023.4 to 0.1132023.6 to 0.1392023.8 to 2.1522023.11 to 1.1602024.2 to 0.1632024.4 to 1.2022024.6 to 2.2082024.8 to 1.2182024.11 to 0.2262024.13 to 1.242There are also exact mappings for
2.0.6.96,2.3.2.423,2.3.7.474, and2024.14.4.268.Sources for these mappings include local
matching.runtimefiles, YoYo release notes/FAQ, gmclan runtime history, and community reports.IsVersionAtLeast()is now aware of the2022.0LTS mapping. For version comparisons, LTS2022.0.Xis treated as the equivalent2022.9.Xformat (with0.0through9.1covered by the LTS fixes). This is necessary so checks such asIsVersionAtLeast(2022, 9)continue to work correctly for LTS games.IsNonLTSVersionAtLeast()is unchanged, so LTS versions still correctly fail non-LTS checks.SetGMS2Version()now fills in known runtime builds for format-level detections usingLatestRuntimeForMinorandExactBuildForRelease. Since patches often don't introduce changes to the data.win format, the latest known runtime for a given format is used as the best available guess when the exact patch can't be determined.UndertaleModLib/Models/UndertaleGeneralInfo.csToString()now always displays the full four-part runtime version. For example,2022.0.1.30is shown instead of just2022.0, and2022.3.0.497instead of2022.3. LTS versions now use the modernGMprefix. Previously, theMinor < 3check caused LTS to incorrectly use the oldGMSprefix.TestForCommonGMSVersions()now uses the real runtime builds where they are known, such as2024.13.1.242,2023.2.0.87, and2022.8.0.50.Testing:
I tested the changes with two Pizza Tower builds:
GM 2022.0.1.30, with2022.0.1.30 (LTS2022_0).IsVersionAtLeast(2022, 9)toTrueIsVersionAtLeast(2022, 11)toFalseGM 2022.3.0.497(instead of the previousGM 2022.3.0.0).Caveats
2022.9and LTS2022.0are format-identical, so a monthly2022.9game will also be displayed as the LTS2022.0.1.30representative runtime.2023.8.1and2023.8.2), the exact patch cannot be determined. In those cases, the latest known runtime is shown as the best guess.2022.1,2022.6,2024.14.0/.1,2.2.1,2.3.0,2.3.1, and2.3.6. These may still be displayed with.0.0until their runtime builds can be confirmed.Notes
The version stored in data.win refers to the runtime, not the GameMaker IDE version. For example:
2022.3: IDE625, runtime4972023.1: IDE62, runtime812022.0LTS: IDE.31, runtime.30This PR reports versions using the
RuntimeVersionstruct, so the versions shown by UTMT represent the runtime rather than the IDE release.