Skip to content

Accurate full runtime versions, LTS 2022.0 mapping, (and real build numbers) - #2490

Open
doggywatty wants to merge 1 commit into
UnderminersTeam:masterfrom
doggywatty:master
Open

doggywatty wants to merge 1 commit into
UnderminersTeam:masterfrom
doggywatty:master

Conversation

@doggywatty

Copy link
Copy Markdown

Description

UTMT currently gets the GameMaker version from the data.win format, but GMS2+ games generally store 2.0.0.0 there. This means we can usually only identify the format level (for example, 2022.3 or 2022.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 the 2022.0.1.30 LTS runtime. The 2022.0 LTS format is effectively the same as the monthly 2022.9 format, 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.9 detected from the TGIN chunk is now treated as the 2022.0 LTS runtime and uses SetGMS2Version(2022, 0, 1, 30, true).
    • The LTS runtime is used as the representative version because 2022.0 LTS is based on the monthly 2022.9 release 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.cs
    Known runtime mappings include:
    2022.2 to 1.491
    2022.3 to 0.497
    2022.5 to 2.13
    2022.8 to 0.50
    2023.1 to 1.81
    2023.2 to 0.87
    2023.4 to 0.113
    2023.6 to 0.139
    2023.8 to 2.152
    2023.11 to 1.160
    2024.2 to 0.163
    2024.4 to 1.202
    2024.6 to 2.208
    2024.8 to 1.218
    2024.11 to 0.226
    2024.13 to 1.242

    There are also exact mappings for 2.0.6.96, 2.3.2.423, 2.3.7.474, and 2024.14.4.268.
    Sources for these mappings include local matching.runtime files, YoYo release notes/FAQ, gmclan runtime history, and community reports.

    • IsVersionAtLeast() is now aware of the 2022.0 LTS mapping. For version comparisons, LTS 2022.0.X is treated as the equivalent 2022.9.X format (with 0.0 through 9.1 covered by the LTS fixes). This is necessary so checks such as IsVersionAtLeast(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 using LatestRuntimeForMinor and ExactBuildForRelease. 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.cs

    • ToString() now always displays the full four-part runtime version. For example, 2022.0.1.30 is shown instead of just 2022.0, and 2022.3.0.497 instead of 2022.3. LTS versions now use the modern GM prefix. Previously, the Minor < 3 check caused LTS to incorrectly use the old GMS prefix.
    • TestForCommonGMSVersions() now uses the real runtime builds where they are known, such as 2024.13.1.242, 2023.2.0.87, and 2022.8.0.50.

Testing:
I tested the changes with two Pizza Tower builds:

  • Pizza Tower: detected as GM 2022.0.1.30, with 2022.0.1.30 (LTS2022_0).
    • IsVersionAtLeast(2022, 9) to True
    • IsVersionAtLeast(2022, 11) to False
  • PT_Eggplantv15_3: detected as GM 2022.3.0.497 (instead of the previous GM 2022.3.0.0).

Caveats

  • Monthly 2022.9 and LTS 2022.0 are format-identical, so a monthly 2022.9 game will also be displayed as the LTS 2022.0.1.30 representative runtime.
  • When multiple patches share the same data.win format (for example, 2023.8.1 and 2023.8.2), the exact patch cannot be determined. In those cases, the latest known runtime is shown as the best guess.
  • Some runtime mappings are still unknown and remain TODOs: 2022.1, 2022.6, 2024.14.0/.1, 2.2.1, 2.3.0, 2.3.1, and 2.3.6. These may still be displayed with .0.0 until 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: IDE 625, runtime 497
  • 2023.1: IDE 62, runtime 81
  • 2022.0 LTS: IDE .31, runtime .30

This PR reports versions using the RuntimeVersion struct, so the versions shown by UTMT represent the runtime rather than the IDE release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant