Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys
- import os
- import binascii
- print("VCConvert by Collector Togami. Enter your save file as a parameter\n I am not responsible for damages to your files, do not use this with non save files, etc etc. You know the drill.")
- file=open(sys.argv[1], 'rb+')
- filesize=os.path.getsize(file.name)
- # Defining the VC file size and and actually relevant save size
- VCSize=32784
- RegularSize=32768
- file.read(RegularSize)
- directory=os.walk(file)
- # Is this a VC sized save file?
- # Yes it is. We'll truncate.
- if filesize == VCSize:
- file.truncate()
- file.close()
- os.rename(os.path.basename(file.name), "converted.sav")
- #No, it isn't. We'll add a 16 byte string, whose contents do not matter.
- else:
- file.close()
- file=open(sys.argv[1],'a')
- file.write("Hex agony b here")
- file.close()
- os.rename(os.path.basename(file.name), "sav.dat")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement