Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #Version 1.0 by nissan for f95zone.to
- """
- HOWTO:
- 1) Download Jython at https://www.jython.org/download
- 2) Download latest TOA.jar and save it to some folder (e.g. `TOADirectory`)
- 3) copy extractor.py to `TOADirectory`
- 4) run extractor.py with `jython extractor.py`
- 5) move generated `profile.json` file to a folder `.toa-data`
- 6) start the game and enjoy fully unlocked gallery (to start the game from a command line run `java -jar TalesOfAndrogynyV0.3.03.4.jar` , replace the filename with corresponding .jar)
- """
- import glob
- import sys
- import json
- import string
- toa = glob.glob("*.jar")[0]
- sys.path.append(toa)
- import com.majalis.character.CharacterEnum
- import com.majalis.save.Achievement
- import com.majalis.asset.AssetEnum
- import com.majalis.asset.AnimationEnum
- chars = com.majalis.character.CharacterEnum.values()
- achievements = com.majalis.save.Achievement.values()
- cgseen = com.majalis.asset.AssetEnum.values()
- animations = com.majalis.asset.AnimationEnum.values()
- achievements_section = {"achievements": dict.fromkeys(map(str, achievements), 1)}
- char_section = {"enemyKnowledge": dict.fromkeys(map(lambda x: string.capwords(str(x), "_").replace("_", " "), chars), 1)}
- cgscreen_section = {"cgSeen": dict.fromkeys(map(str, cgseen), 1)}
- animatedscreen_section = {"animatedCgSeen": dict.fromkeys(map(str, animations), 1)}
- # I don't care to fix special cases that aren't present in the arrays
- char_section["enemyKnowledge"]["Goblin (Male)"] = char_section["enemyKnowledge"].pop("Goblin Male")
- char_section["enemyKnowledge"]["Beast Mistress"] = char_section["enemyKnowledge"].pop("Beastmistress")
- char_section["enemyKnowledge"].update({"Quetzal Goddess": 1})
- char_section["enemyKnowledge"].update({"Feral Wereslut": 1})
- char_section["enemyKnowledge"].update({"Puca": 1})
- char_section["enemyKnowledge"].update({"Arachne": 1})
- profile = {}
- profile.update(achievements_section)
- profile.update(char_section)
- profile.update(cgscreen_section)
- profile.update(animatedscreen_section)
- profilejson = json.dumps(profile, indent=4)
- with open("profile.json", "w") as f:
- f.write(profilejson)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement