Tutorial - Viewing Metin2 Resources

Disclaimer - The purpose of this tutorial is for informational use only. It exists to satisfy curiosity, and not to assist in the development of hacking tools. It must be noted, such tools will be created regardless of the existence of this guide, and the processes explained here are already widely known and understood in such circles.

model
This will allow you to view many things from Metin2 - Icons, wallpapers, music, scripts, and the game models themselves. However, these files contained in the client are encrypted and stored in various "packs". Thus, you will need various tools and resources to do this. Here is a list:

Granny Viewer - This is used for displaying the models in Metin2 (3D objects like monsters, weapons and so on).

Daemon Tools Lite - This is for mounting a disc image as a virtual drive, you will need it to view textures (make sure to untick the optional spamware in the installer!)

Irfanview - A versatile image viewer - with this you can view the various TGA (targa) images and DDS (DirectDraw Surface / texture) images. After installation, you will also need the plugins pack to view all the formats.

Folder 2 ISO - This will allow you to turn a directory tree into an ISO image. Imagine burning a virtual CD from a set of files, but instead of going to a blank CD, it goes into a single .iso file. This is what this tool will do.

Notepad++ - If you are interested in viewing textual content built into your client (such as game scripts, information and so on) then it is highly recommended to use a text editor that supports syntax hilighting. Especially when viewing the many python scripts from Metin2's client.

Metin2 File Extractor - You will have to find this tool yourself, as since it is a method of breaking encryption of copyrighted content, it is in a legal gray area status in regards to the DMCA laws. It isn't hard to find.

A Metin2 Client! - You will need a metin2 client to view the resources of. The Metin2 Korea client is recommended, as it is the most up to date and will contain the newest resources. Download it from this page. Click either of the green buttons if you are on Windows XP, or the Vista/Windows 7 button if you use those operating systems.



Part 1 - Extracting Your Client
You will notice that by far the largest folder in an installation of Metin2 is the "pack" folder. Inside this folder are many files in pairs with identical names. Each pair has an .eix and .epk file. As you can probably guess, the larger .epk files are the archives that contain the information and resources. We advise that you backup these files. Copy the contents of the "pack" folder to another location, and make this new location your working folder. Once you have done this, place the .exe of the Metin2 File Extractor in the same location as the .eix and .epk pack files.

What you will need to do now is run the extractor for each pack file via the command line. This would take a very long time (and you might not know how to do this), but fear not! You can do this easily with a simple batch file. Download this file (right click and save it!) and place it in the same location as Metin2FileExtractor.exe and your .eik and .epk files.

NOTE: the .bat file offered here is based on the KR client. If you are extracting a different client, the "locale" files will have a different country code. For example, locale_ca, locale_de, locale_pl and so on. You will have to edit the .bat file (any text editor will do) to change this part if you are not extracting Metin2 KR.

You should now have something like this:


Now, simply run the .bat file and it will get to work. For each file that it will extract, you must press a key to continue. Don't worry if some errors are displayed - just keep continuing until it has finished and the window closes.


You'll now notice that your folder has gotten considerably larger. The extractor will output log information for each file it extracted. The output of the extraction is all placed into the new output folder. Enter this new output folder and you'll see something like this:


Part 2 - Viewing Simple Resources

Filetypes
Firstly, a list of the different types of files you'll find in an extracted Metin2 client's resources:

.py - Python script files. These control various aspects of the behaviour of the client. Things like how windows are displayed, how input is interpreted, how the interface is shown and reacts to goings on, how the client communicates and so on. Open with: Notepad++

.tga - Targa image files. The TGA format is similar to PNG, and supports transparency. The most obvious use of TGA files are the icons. Open with: Irfanview

.dds - DirectDraw Surfaces. These are the textures used throughout Metin2. Open with: Irfanview

.gr2 - Granny 2 Files - These are the 3D models. They can also store animations Open with: Granny Viewer

(No extension) - Almost always various text files. Open with: Notepad++
.bmp - Standard image files, rare. Open with: Irfanview

.jpg - Standard images. Open with: Irfanview

.mp3 - A few of the game audio sounds are embedded in the client, rather than in the BGM folder.

.txt - Usually non-useful information

.wav - The game sound effects (characters noises, monster cries and so on)

There are many other files with various bits of miscellaneous information. If you are curious, try opening them with Notepad++.

Icons
These may simply be found in \output\icon. There are various subfolders containing different icons used throughout the game. You will most likely want the \item icons, which as of this writing, using a KR client, number in at 807.

Sounds
Again simple, these are located in \output\sound and are ordered by folders. "pc" refers to "Player Character". PC2 refers to the new genders that were added later on in Metin2's lifetime. Female suras and warriors, and male mages and assassins. PC alone has the opposite genders.

Maps
This refers to the top-down views of the maps that you view through your minimap. There is not a single location for these, though there are many in the root output folder, named "\output\metin2_map_x". You may also find many in "\output\season1" and "\output\season2". The mini map files are made up of DDS textures arranged over a grid, made up of 256x256 textures. They are numbered according to their position on this grid, with two 3 digit coordinates.

For example, the map for "c1", meaning DenderaDendera's first town, is 4x256 wide, and 5x256 tall. Thus we know that the "\output\metin2_map_c1\003001\minimap.dds" texture refers to the 4th column, 2nd row down part of this grid, and we can assemble a large map of DenderaDendera's first town based on going through these textures and placing them at the appropriate coordinates. We count from Zero(0), not from 1. Here you can see an example of a large map assembled from minimap textures with this method.

Part 3 - Viewing Models

The texture problem
There is an issue when viewing Metin2 .gr2 models with granny viewer, where the textures do not show. Here is an example, when viewing the "\output\ymir work\monster\gupae\gupae.gr2" model:


This happens because the texture files are explicitly referenced. The texture file is located at "\output\ymir work\monster\gupae\gupae.dds", but the model references "D:\Ymir Work\monster\gupae.dds".

This is where now we must simulate a mounted D:\ drive that contains these files. This is easier than it sounds. Open Folder2Iso, and select the "\output\ymir work\" folder as your source folder. Also choose where you wish to save your resulting .iso file.


Now simply generate your ISO. Once you have done this, you can simply mount the ISO with Daemon tools, and it will appear as a virtual drive to your computer. The chances are that the D:\ drive name is already taken by your actual DVD or CD drive, in which case you can simply change the existing drive letter and assign your Daemon tools virtual drive to use D:\. This is a fairly simple process, though it varies by which version of windows you run. Use google to help you change this. Once you have done this and mounted the image you just generated, you should now have a virtual D:\ drive containing the ymir work contents:


You should now find that upon opening the Metin2 .gr2 models from any location, all the textures will resolve to real paths and be loaded fine!


Animations
Along with the .gr2 models themselves, you will almost always find extra .gr2 files, that when opened directly with Granny Viewer, appear empty. These files are animations. Loading animations is a simple process. First, open the model itself in Granny Viewer. Then, simply drag and drop the animation files into Granny Viewer. In the animations tab, you will see a list of all the animations you have loaded, along with a little preview. Click one to apply it to the loaded model.


It's worth noting that you are not restircted to the animations only for that model. For example, we can make our friend Goo-Pae here do the female shaman "dance 4" dance!


Depending on the model and the animation you make it do, you will get varying results of realism. Have fun exploring Metin2's resources! :)


Bookmark and Share


Did you know?Did you know: That 1 hour EXP rings give much more EXP boost than the 20% claimed in the description? (US)
2008-2012 | Contact Us | Submit News | Privacy Powered by Apache + nginx + Sphinx + Dropbox + ServInt VPS Hosting