Final Fantasy Dissidia Opera Omnia - Assets study

Extraction and unpacking of game archives and compression, encryption, obfuscation, decoding of unknown files
dukemagus
Posts: 2
Joined: Mon Aug 31, 2020 4:30 pm

Final Fantasy Dissidia Opera Omnia - Assets study

Post by dukemagus »

(i didn't wanted to call it datamining because i have some genuine questions about WHY some things are made in such a way, not just how to unpack them)
So... this game had a bit of a back and forth with asset ripping. there are many threads already that end up abandoned with little information added (and a fella offering 500 bucks for data extraction, hit me up if the bounty is still unclaimed).

That being said, a lot of progress has been made, but not thoroughly documented or centralized. I'll try to gather all relevant info in a single thread, (and giving due credit and a link to the sources, obviously).

If anyone has interest in studying this game or information about how to access its contents, post below and i'll add it to the first topic.

NOTE: i'll be checking the global version of the game. The structure and methods should be the same on the japanese version, but if it's already translated, no reason to add an extra task on top of it all.
NOTE: I'm no programmer, hacker, dataminer or anything of the sort. I don't know what i'm doing in detail, but if i followed the instructions and it worked, i can relay the same instructions forward.
Now that we're done with the intro, let's get started.
[center]---------------[/center]

1 - THE GAME

[spoiler]Dissidia Final Fantasy Opera Omnia (Also Known as DFFOO or Opera Omnia) is a free-to-play, gacha-based turn based rpg availiable on Android and iOS. It was developed by Team Ninja (part of Koei Tecmo that also makes the Dead or Alive games)
I couldn't find info about the engine used to make the game so far

For final fantasy fans, the game is intresting for having a treasure trove of art assets paying homage to the entire series, including:

Over a hundred characters made in a (arguably)charming low-poly 3d style
Animations and effects bringing to life signature moves of the characters in 3d.
Stylized art of the characters, equipments and items famous throughout the series
Music and remixes from games of the entire series
[/spoiler]

2 - DOWNLOADING THE FILES

This is a big mobile title and there's over 4gb of assets to download as of august 28 (when i last updated)
Here's the Android method to get the files:

1 - Boot up the game at least once

Image

2 - go through the tutorials and announcements until you're free to interact with the main screen, then tap the gear icon

Image

3 - Scroll down until you find the "Batch Download" option

Image

Image

4 - Wait until it download everything (it can take a while. Not only there's around 4gb of data, it's split in almost 20 thousand files and the game fetch them one by one. it may have downloaded the first 500 or so during the first run,but it's almost nothing)

Image Image

5 - After it downloaded everything, the files will be in your phone's internal memory (or SD card, it varies depending on the setup).
On android Phones the address you want is

[storage]\Android\Data\com.square_enix.android_googleplay.DFFOperaOmnian

Note that the game it will also make a folder with the same name on Android\obb This folder should be empty, though

Copy these files to your PC and let's gear up to read these files

3 - NECESSARY SOFTWARE

1 - QuickBMS: If you're in this forum you probably already have it. otherwise, download from http://aluigi.altervista.org/quickbms.htm
1a - the BMS Script for these files. Luckily Luigi keeps an updated file with bms scripts for hundreds of games. we'll only need one, but since it's a small download, might as well pick everything up http://aluigi.altervista.org/quickbms_scripts.php
Unpack it on the folder you want and copy the dissidia.bms file to the same folder where you unpacked QuickBMS

2 - Noesis: This is a software for viewing multiple type of files, and if it can read, it can export to a more commonly used format. download from http://richwhitehouse.com/index.php?content=inc_projects.php&showproject=91 Create a folder for it and unpack it there.
2a - The Noesis script for these files: download from https://github.com/Joschuka/fmt_g1m. download the files fmt_g1m.py and tool_merge.py and move them to [NOESIS FOLDER]\Plugins\Python

3 - NOTEPAD++ A notepad that doesn't screw up the file's encoding when you save your changes. https://notepad-plus-plus.org/downloads/v7.8.9/


(i'll continue later)
dukemagus
Posts: 2
Joined: Mon Aug 31, 2020 4:30 pm

Re: Final Fantasy Dissidia Opera Omnia - Assets study

Post by dukemagus »

Continuing. (I decided to split into more than one post to make it easier to read)

With all files and tools to start, here's the procedure to make these files readable

1 - .dz Extraction (quickBMS)
If you checked the folder with the game's assets, you'll find 100 folders (numbered from 00 to 99) and a menagerie of files in each folder. Many of these files will have a .dz extension appended to it ("something.glt.dz") these .dz files need to be decompressed and there are two methods to do that using quickBMS

The single file method
  1. Double click the quickBMS.exe
  2. select the dissidia.bms file i mentioned on the previous post
  3. Select the .dz file you want to extract
  4. Select the output folder
  5. Done!

The "batch" method

  1. Put the dissidia.bms file on the same folder as quickBMS 
  2. open a command prompt or powershell on the quickBMS folder (hold shift, click on a blank space on the folder and choose "open command prompt here" or "open powershell window here)
  3. now you'll need to give some commands to quickBMS via prompt. if you don't know what you're doing, to copy the structure below and replace the items between the brackets with the right addresses (don't keep the brackets)

    Code: Select all

    quickbms.exe -F "{}.dz" -D dissidia.bms [the full address of the folder where the 100 dissidia asset folders are] [the full address of the folder where the files should be extracted]

    Example: if i stored the files in C\DFFOOAssets\files and want to extract to C\DFFOOAssets\extracted it would look like

    Code: Select all

    quickbms.exe -F "{}.dz" -D dissidia.bms C:\DFFOOAssets\files C:\DFFOOAssets\extracted

  4. Wait while the program does the heavy lifting
  5. Done
Three important things to note, though:
- If powershell nags you about quickbms not being a cmdlet, add ".\" to the start of the line and it'll use the .exe on the folder

Code: Select all

.\quickbms.exe -F "{}.dz" -D dissidia.bms C:\DFFOOAssets\files C:\DFFOOAssets\extracted


- Make life easier for yourself and don't add spaces in any folder name you'll use on the task. spaces demand quotation marks and that makes everything much less readable

- The script will possibly fail at some point with some file. If it does, follow the steps below
1:copy the error message and save somewhere
2:take note of the folder and file name where it ocurred (ex: C:\DFFOOAssets\files\78\S033-Opl2lt.bin.dz
3:remove the file from the numbered folder and store somewhere else
Remove every folder prior to the folder where the file you couldn't extract was (ex: if it presented an error at folder 78, remove the folders 00 to 77).
repeat the same command you did before and QuickBMS will work on the remaining files
(While it is possible to start over with all the folders in the same place, the program will ask you what to do when finding a duplicate on the destination folder. if you give the wrong command, you'll process everything again or create copies of everything. better to remove this risk from the task.)


It's up to you if you want to store the processed folders it somewhere else or delete them: using the line above, quickbms will copy any file without the .dz extension to the destination folder without changing it.
It would also be kind if you uploaded the file that the script couldn't process and posted the error it generated, so i can show it to experienced dataminers.


2 - Noesis (for 3d models and 2d assets)

After getting rid of the .dz extension, most of the files are still in two formats that aren't commonly used: g1m and g1t. For these we'll use Noesis.

Follow the steps below:

  1. Open Noesis.exe
  2. navigate on the folder tree until you reach the folder where the extracted files are
  3. double click a .g1t or .g1m file to preview it
    Image
  4. If that's the file you want, right click the file name and select the "Export" option
  5. Configure the export settings and click on the "Export" button
  6. Done!
Some things to note:
- if you don't edit the python script that reads the g1m files, it'll ask you to open two more files for texture and skeleton. you can cancel these two selections and the 3d model will be displayed in t-pose with the skeleton stored within it.
- The game packs multiple maps/textures/images on a single .g1t file. when you export the file, mark the "no animations" checkbox and it'll extract all the images from the file
and that's it for now! i'll add more information and instructions as i learn them.

Credits and thanks to the following people for making this possible (pm me if i forgot anyone):

Luigi Auriemma - QuickBMS
Rich Whitehouse - Noesis
Joschuka (Dimy) - G1T/G1M Noesis plugins
SergioO on gamefaqs forums for making a good thread about it (no idea why there of all places)
You for checking out the thread