Skip to content

Instantly share code, notes, and snippets.

@trajing
Last active July 1, 2020 04:16
Show Gist options
  • Save trajing/fc538b7fcaaf19332ee7fe7256c996af to your computer and use it in GitHub Desktop.
Save trajing/fc538b7fcaaf19332ee7fe7256c996af to your computer and use it in GitHub Desktop.
LUCAH corruption zeroing script
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