User:JoetjeF/Game Data Extraction

Note that most data and information below is based on Android and that the scripts I use run on Linux. Perhaps it will work on Windows using Cygwin, but that has not been tested.

Important Files used by TOS
TOS stores most of it's information in the following files (for Android 5):
 * /storage/emulated/0/Android/data/com.madhead.tos.en/files/bundles/51ef0d6f8cbcb77979fae770bb5d7907.unity3d - this file caontains the so called LOCALE file with all English and Chinese in-game text. You'll need root access to copy this file.
 * /data/data/com.madhead.tos.en/shared_prefs/com.madhead.tos.en.v2.playerprefs.xml - this file contains all the player data and quite a bit of the game data like Monsters and it's characteristics, the current/last stage info, skill definitions, etc.

Tools

 * 1) Bash (or Cygwin) - I use Bash Linux
 * 2) Python 3 - for URL decoding XML file
 * 3) xml_grep - to extract information from XML file
 * 4) Unity Studio - to extract images from the .unity3d files
 * 5) PVRTexTool - to display/convert above images

Game Locale
The 51ef0d6f8cbcb77979fae770bb5d7907.unity3d file contains locale.csv.txt which is a specially formatted CSV file containing most of the Chinese and English text.

Game Information
As mentioned before, all game data is stored in the com.madhead.tos.en.v2.playerprefs.xml file. It's an XML file with its contents URL encoded, to make it (more) useable you'll need to decode it first. There are a couple of online decoders like, or you can use Python to decode the file: python3 -c 'import sys, urllib.parse; print(urllib.parse.unquote(sys.stdin.read))' com.madhead.tos.en.v2.playerprefs.xml.txt

The contents of the XML file is divided in sub sections (attributes), who's value describes the type of content it contains. A list of all sub sections can be generated using grep -oP '(?<=name=").*?(?=["])' com.madhead.tos.en.v2.playerprefs.xml | sort

Some notibale sub sections are:
 * MH_CACHE_API_DATA_MONSTER_JSON - monsters
 * MH_CACHE_API_DATA_MONSTER_SKINS_JSON - specs for alt skins
 * MH_CACHE_API_DATA_REFINESKILL_JSON - amelioration
 * MH_CACHE_API_DATA_SKILL_JSON - active skill details
 * MH_CACHE_API_DATA_COMBINE_SKILL_JSON - combine skills (norse+odin etc)
 * MH_CACHE_API_DATA_TEAM_SKILL_JSON - team skills
 * MH_CACHE_API_DATA_DRAGON_LIST_JSON - dragonary crafts
 * MH_CACHE_API_DATA_STAGE_JSON - main stage name
 * MH_CACHE_API_DATA_FLOOR_JSON - individual battle name
 * MH_CACHE_RUNTIME_DATA_CURRENT_FLOOR_WAVES - team current floor
 * MH_CACHE_RUNTIME_DATA_CURRENT_FLOOR_ENTER_DATA - current battle details