Created
November 17, 2020 00:56
-
-
Save foone/7d0b1e466793fa8b3bf42a536ba3f255 to your computer and use it in GitHub Desktop.
A script to patch score values to Acronia 0.4
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 array,os,struct | |
game_bin=array.array('B') | |
with open('ACRONIA.EXE','rb') as f: | |
f.seek(0,os.SEEK_END) | |
size=f.tell() | |
f.seek(0,os.SEEK_SET) | |
game_bin.fromfile(f,size) | |
OFFSETS=[ | |
0x3aa3b, | |
0x3aa75, | |
0x3ab27, | |
0x3ab61, | |
0x3c5c3, | |
0x3c602, | |
0x3c8bb, | |
0x3c8f8, | |
] | |
for offset in OFFSETS: | |
game_bin[offset:offset+4]=array.array('B',struct.pack('<L',100000)) | |
with open('ACRONIA-PATCHED.EXE','wb') as f: | |
game_bin.tofile(f) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment