Last active
December 30, 2020 08:59
-
-
Save JoelLarson/555a4e76b937858375fe1a9c0787da80 to your computer and use it in GitHub Desktop.
Poweshell Script for patching in VSync for The Coin Game
This file contains 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
## Selected mode | |
$SelectedMode="Potato" | |
## Do not edit below here | |
$GamePath = "C:\Program Files (x86)\Steam\steamapps\common\TheCoinGame\TheCoinGame_Data\globalgamemanagers" | |
$PatchableSettings=@{ | |
"Potato" = 180392; | |
"Old Laptop" = 180524; | |
"Moms Desktop" = 180656; | |
"Old Gaming Rig" = 180792; | |
"Rocket Appliance" = 180928; | |
"Super Computer" = 181064; | |
"Super VSync" = 181196; | |
} | |
if ($PatchableSettings.ContainsKey($SelectedMode)) { | |
$Bytes = [System.IO.File]::ReadAllBytes($GamePath) | |
[System.IO.File]::WriteAllBytes($GamePath + ".original", $Bytes) | |
$Offset = $PatchableSettings[$SelectedMode] | |
# Patch the byte offset to turn vSyncCount to 1 | |
$Bytes[$Offset] = 0x01 | |
[System.IO.File]::WriteAllBytes($GamePath, $Bytes) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment