# Python script to create a ZipCard # Author: randomfella0 # How to use: # save source to file called embed.py, put the character card and desired mod into the same folder, # call the character card card.png and mod mod.zipmod and run the script, ZipCard will be saved into zipcard.png # How does it work?: # 1. It is safe to write any sequence of bytes to the end of a character card. # 2. It is safe to write any sequence of bytes to the start of a zip(mod) file. # So we can safely write a zip(mod) to the end of a character card and the result will be both a valid zipmod and a valid character card. # Read the files card = open("card.png", "rb").read() mod = open("mod.zipmod", "rb").read() # Combine the files with open("zipcard.png", "wb") as f: f.write(card) f.write(mod)