Skip to content

Instantly share code, notes, and snippets.

@JohnnyonFlame
Last active August 9, 2022 21:55
Show Gist options
  • Save JohnnyonFlame/fdd79303423392c5911cf44eed9e17cb to your computer and use it in GitHub Desktop.
Save JohnnyonFlame/fdd79303423392c5911cf44eed9e17cb to your computer and use it in GitHub Desktop.
Console snippet to check which runner version a gamemaker studio game might be exported to using UTMT.
using System.Reflection;
FieldInfo ver = null;
foreach (var t in typeof(UndertaleData).GetFields())
{
if (t.Name.StartsWith("GM") && (t.FieldType == typeof(bool)) && (bool)t.GetValue(Data))
{
ver = t;
}
}
if (ver != null)
return $"Likely: {ver.Name}";
return $"No guessed version, maybe GMS{Data.GeneralInfo.Major}.{Data.GeneralInfo.Minor}.{Data.GeneralInfo.Release}.{Data.GeneralInfo.Build}";
@JohnnyonFlame
Copy link
Author

image
image

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