Datamining

From Dragalia Lost Wiki
Jump to: navigation, search

Obtaining the Assets[edit | edit source]

Android[edit | edit source]

The assets are located in the following folder and require a rooted Android phone to view the contents:

/data/data/com.nintendo.zaga/files/assets

Note that Dragalia Lost will block access to the game if it detects root, so root your phone at your own risk.

iOS[edit | edit source]

The assets are located in:

Payload/zaga.app/Data/Raw/PreinResource/AssetBundle

Extracting the Assets[edit | edit source]

The assets can be extracted using any Unity asset extractor, such as AssetStudio.

AssetStudio[edit | edit source]

  1. Go to File > Load Folder
  2. Select the folder where the asset are located.
  3. Wait for AssetStudio to finish loading the files.
  4. Go to Asset List tab.
  5. Select the assets you would like to export (or skip to next step if you would like to extract everything).
    1. It is recommended to go to Filter Type, and select the asset types you would like to extract. The types the Wiki usually extracts are:
      1. Texture2D - Character images, icons, backgrounds, model textures, etc. Basically any and all images in the game.
      2. Mesh - 3D models and objects
      3. MonoBehavior - Text and data including story script transitions, character data, etc. As well as a lot of unreadable junk data.
      4. Sprite - Similar to Texture2D, but sometimes has icons cut out (vs. Texture2D putting all the icons into one UI file which need to be cut out).
  6. Go to Export > All assets / Selected assets / Filtered assets to export and save the assets.

Asset Type Details[edit | edit source]

Texture2D[edit | edit source]

Texture2D images are often split into separate images, and in order to get them into their proper formats as seen in-game, other tools are needed to combine these images such as Python, Imagemagick, or Matlab. Chu2038 also created a script to process these assets and label them with a category.

YCbCr[edit | edit source]

Several of the image files in the Texture2D folder are files split into their YCbCr channels. The following include code snippets on how to convert these split YCbCr images into one properly colored image.

For example, Karl's character image is split into the following files:

  • 110008_01_r04_Y.png
  • 110008_01_r04_Cb.png
  • 110008_01_r04_Cr.png
Python[edit | edit source]
  • Requires Python Pillow (Python Imaging Library)
from PIL import Image

base_file_name = "110008_01_r04"
(z,z,z,y) = Image.open(base_file_name + "_Y.png").convert('RGBA').split()
u = Image.open(base_file_name + "_Cb.png").convert('L').resize((1024,1024), Image.LANCZOS)
v = Image.open(base_file_name + "_Cr.png").convert('L').resize((1024,1024), Image.LANCZOS)

merged = Image.merge("YCbCr", (y,u,v)).convert('RGB')
merged.save("file save location here")
ImageMagick[edit | edit source]
magick convert 110008_01_r04_Y.png -colorspace YCbCr -separate ysplit.png

magick convert ysplit-3.png 110008_01_r04_Cb.png 110008_01_r04_Cr.png -set colorspace YCbCr -combine -colorspace sRGB combined.png
Matlab[edit | edit source]
  • Note that Matlab requires a paid license to use outside of the 30-day free trial.
image1 = imread('110008_01_r04_Y.png');
image2 = imread('110008_01_r04_Cb.png');
image3 = imread('110008_01_r04_Cr.png');
image2 = imresize(image2, 2);
image3 = imresize(image3, 2);
y = image1(:,:,1);
b = image2(:,:,2);
r = image3(:,:,3);
B = cat(3,y,b,r);
B1 = ycbcr2rgb(B);
imshow(B1);

Alpha[edit | edit source]

Many of the Texture2D images are not transparent, but have their alpha files separated into another file. These files can be identified if they have an _alphaA8, _A, _alpha, or _Alpha at the end of the file name. Similar to YCbCr, you will need separate tools to combine the original image and the alpha image.

Additionally, note that there are two different ways for the alpha file to be combined depending on the alpha image.

Python[edit | edit source]

Method 1:

from PIL import Image

base_file_name = "100029_02_r05.png"
alpha_file_name = "100029_02_r05_alphaA8.png"

(r,g,b,z) = Image.open(base_file_name).convert('RGBA').split()
(z,z,z,a) = Image.open(alpha_file_name).resize((w,h), Image.LANCZOS).split()

merged = Image.merge("RGBA", (r,g,b,a))
merged.save("file save location here")

Method 2:

from PIL import Image

base_file_name = "101401_IMG_03_base_01.png"
alpha_file_name = "101401_IMG_03_base_01_alpha.png"

(r,g,b,z) = Image.open(base_file_name).convert('RGBA').split()
a = Image.open(alpha_file_name).resize((w,h), Image.LANCZOS).convert('L')

merged = Image.merge("RGBA", (r,g,b,a))
merged.save("file save location here")

Model Textures[edit | edit source]

File(s) Description
cXXXXXX_XX.png (e.g. c100001_01.png) Character / Humanoid Enemy Model Textures
dXXXXXX_XX.png (e.g. d200001_01.png) Dragon Model Textures
eXXXXXXX.png (e.g. e0010101.png) Enemy Model Textures
rXXXXXXX_XX.png (e.g. r0010101_01.png) Raid Boss Textures
wXXXXXX_XX.png (e.g. w301001_01.png) Weapon Model Textures

Mesh[edit | edit source]

The following is table to help identify some of the mesh models more easily. For the texture files for the models, see the Model Textures section under Texture2D.

File(s) Description
cXXXXXX_XX.obj (e.g. c100001_01.obj) Character Models
mBody Enemy / Dragon / Character Models
mBodyAll Humanoid Character Models (e.g. Human Enemies like Imperial Soldiers, Other Zethia's model, etc.)
mAxe, mBow, mDagger, etc. Weapon Models

MonoBehavior[edit | edit source]

Due to the sheer amount of MonoBehavior files, the following is a short list of MonoBehavior files of note.

File(s) Description
AbilityData Data on Abilities
ActionCondition Data on Conditions
AmuletData / Amulet___ Data on Wyrmprints
AmuletLevel Wyrmprint EXP Data. See Wyrmprint EXP Table
AmuletRarity Amulet level limits depending on rarity
CampaignData Data on Special Campaigns
CharaData / Chara___ Data on Adventurers
CharaLevel Adventurer EXP Data. See Adventurer EXP Table
DefaultGraphicSetting Data on Graphics Settings
DragonData / Dragon___ Data on Dragons
DragonLevel Dragon EXP Data. See Dragon EXP Table
DragonRarity Dragon level limits depending on rarity
DragonReliabilityLevel Dragon Bond EXP Data. See Dragon Bond EXP Table
EmblemData Data on Epithets
EnemyData / Enemy___ Data on Enemies
EventData / Event___ Data on Events
ExAbilityData Data on Co-abilities
Fort___ Data on Facilities
Gimmick___ Quest Traps (e.g. Poison Puddles in a quest)
LoginBonusData / LoginBonusReward Data on Login Bonus
MaterialData Data on Materials
MaterialShopDaily / MaterialShopMonthly / MaterialShopWeekly / ___Shop Data on Shop
Mission___Data Data on Endeavors
PlayerAction / PlayerActionHitAttribute Detailed information on Skills
QuestData / Quest___ Data on Quests
RaidEvent___ Data on Raid Events
RareEnemyGroup Data on Rare Enemies
SkillData Data on Skills
SummonData / Summon___ Data on Summon Showcases
TextLabel Maps IDs to readable text.
UserLevel Player Level EXP Data. See Player EXP Table
WeaponData / Weapon___ Data on Weapons
WeaponLevel Weapon EXP Data. See Weapon EXP Table
WeaponRarity Weapon level limits depending on rarity