Last active
July 1, 2020 04:16
-
-
Save trajing/fc538b7fcaaf19332ee7fe7256c996af to your computer and use it in GitHub Desktop.
LUCAH corruption zeroing script
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
import os, pathlib, shutil | |
print("this doesn't work") | |
exit() | |
save_file_dir = pathlib.Path(os.environ['APPDATA']).parent \ | |
/ 'LocalLow' / 'melessthanthree' / 'Lucah_ Born of a Dream' | |
save_file_location = save_file_dir / 'savedGames.gd' | |
backup_file_location = save_file_dir / 'savedGames.gd.bak' | |
shutil.copy(save_file_location, backup_file_location) | |
print("is your save file in the default position?") | |
print(f"(that's \"{save_file_location}\")") | |
while True: | |
answer = input("[YES/NO] >>> ") | |
if answer.casefold() == 'yes'.casefold(): | |
break | |
elif answer.casefold() == 'no'.casefold(): | |
print("please enter the path to your save file (no quotation marks)") | |
save_file_location = pathlib.Path(input("path >>> ")) | |
break | |
else: | |
print("please input YES or NO.") | |
with save_file_location.open('r+b') as f: | |
f.seek(0x278) | |
f.write(bytes([0] * 8)) | |
print("done! double check to see if it worked") | |
input("") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment