Garry's Mod

Garry's Mod

63 Bewertungen
Extracting Your Character From SWTOR
Von Morganicism
This guide will cover everything you need to know to pull your character, kicking and screaming, out of your SWTOR game files.
This is an advanced tutorial that will cover the extraction and conversion of SWTOR 3D model and texture files.
2
   
Preis verleihen
Favorisieren
Favorisiert
Entfernen
Required Applications and Files
Required Applications
  • EasyMYP[forum.xentax.com]
  • Blender SWTOR Importer[github.com] or Noesis[www.richwhitehouse.com]
  • An image editing application (I will be using Photoshop, but you could use GIMP[www.gimp.org] as well)

Required Files
You need a hash file for EasyMYP. A hash file contains all of the SWTOR files that have been decoded. If you plan to extract newer game content, you will require a newer hash file.
There are a few available for download on this forum[forum.xentax.com]. The newest hash files are not always shared publicly, so obtaining a recent one can be difficult. To replace a hash file, navigate to where you stored your executable for EasyMYP. Then, open the "Hash" folder, and place your your hash file in there as "hashes_filename.txt".

The plugin for Noesis can be installed by placing "Swtor.py" under "Noesis\plugins\python".
Extracting an Archive
Open EasyMYP. On the top bar select "Archive" then "Open Archive". EasyMYP can open SWTOR archive files, which have the ".tor" extention. These archives are located at "C:\Program Files (x86)\Electronic Arts\BioWare\Star Wars - The Old Republic\Assets".

These archives contain every asset that SWTOR uses, so it can be a lot to sift through. The file types that are important to us are:
  • .gr2 (3D model or skeleton)
  • .dds (texture)

You'll only need to open archives that have "swtor_main_art_dynamic..." at the start of the file name.
Before you are ready to extract an archive, you need to specify a folder for your files to be saved in. To do this, select "Options" on the top bar, then "Preferences". Click the "Set" button to choose a a location for your extracted files. Once you've done that, you can right-click an opened archive, then select "Extract" to extract the contents of your archive.
Locating Your Character in a Mess of Files
Your going to need some help finding the armour pieces and custimations for your character. They're not named like you might expect, so I'll explain the naming scheme that BioWare used with SWTOR.

Models
There is not a single model for each armor piece in SWTOR, that would be way too many! Instead each piece of armour is a combination of an "archrtype" model, and a number of additional models that attatch to the archetype. (There's a good reason that armour sets look really similar to eachother in SWTOR)

I'm going to use a bounty hunter armour piece as examples. Here are two models that make up a single armour piece:

These are located at "resources\art\dynamic\chest\model" within an archive.
chest_tight_bfa_archetype.gr2
chest_tight_bfa_heavy_bh_a09_backpack.gr2


Starting with the first file, the first word is "chest", so it's a chest piece. Then we can see that it's a tight-fitting variant because it has the word "tight". The three letters "bfa" are a way of sorting the models. "b" stands for... something. I'm not sure about that one, could be skeleton type. But I am sure of the other two letters. "f" is for female, so we know this model is a femal armour piece. "a" is the body type, the size/shape of the character. We know that it's an archetype because it says "archetype".

Moving on to the second file. There are a few important differences in the file name of the second file. We know this is an armour addition because "archetype" is not in the file name. After "bfa" it says "heavy", so we know the armour is meant to be heavy. Then, "bh" stands for bounty hunter. Armour pieces are sorted by class. Then we have "a09". Each armour piece has a code like this, like "mtx02" for example (Also if your armour if from the cartel market, it might have "mtx" in the name, as mtx likely stands for microtransaction). "backpack" is next, which tells us what kind of armour addition this is.

Example
Now that we have a better understanding of what the file names mean, let's try to track down an armor piece.

For this example, we'll find the helmet for Centurion Force-Master's Headgear.
We can find important information about these armour pieces on https://swtor.jedipedia.net. If we search for and click on Centurion Force-Master's Headgear on the site, we'll see a section that shows appearance information. We're interested in the "ModelId", as well as "Attachments". We're gong to only look at the top half of this information because the lower half is for Jedi, and we want the Sith headgear.


Now that we have those numbers, we can find out the names of the corresponding files. If we open up "resources\art\dynamic\face", we'll see an index.xml file. Open it up with a text editor.
Press Ctrl+F to bring up the "Find" window, and search for the Modeld (for this example, that was 1142842).


Conveniently, this will show us the exact file path and name for each model that makes up the headgear, as well as the materials associated with them.

Textures
Here's some example textures:
  • chest_baggy_bmn_med_ge_mtx41c01_m_n.dds
  • chest_baggy_bmn_med_ge_mtx41c01_u_d.dds
  • chest_baggy_bmn_med_ge_mtx41c01_u_h.dds
  • chest_baggy_bmn_med_ge_mtx41c01_u_m.dds
  • chest_baggy_bmn_med_ge_mtx41c01_u_s.dds

The most important part of these file names are the letters on the very end of each file. "n" is a normal map, "d" is diffuse (the base texture), "h" is hue (height?), "m" is metallic (how metal-looking it is), and "s" is specular (how shiny it is).

The textures that end with "d" and "n" are the most useful to us, because they are files that can easily be used by a Garry's Mod model. Though, the metallic and specular maps could also be useful to you.

Note: The diffuse texture may not be the same color as it is in-game. This is fine. You will have to recolor the texture later to match the color scheme you want. I don't know how to use in-game colour schemes on these models.
Converting Your Files Into Something Usable
Right now, the ".gr2" and ".dds" files that we have are pretty useless to us. We need to change their file types.

If you downloaded and installed the SWTOR importer for Blender, then there should be an option in Blender under File -> Import -> gr2. As of writing this, some features of the importer are experimental, like importing materials or skeletons. You may try these features out to save you some time.

If you downloaded Noesis, it can convert the "gr2" files. While Noesis is open, simply select "File" -> "Open" to preview a model. Alternatively, you can drag and drop the model files into Noesis. Then select "File" -> "Export" to export as an "obj". Make sure you check the "Flip UV's" checkbox, or your textures will not display correctly on your exported model.

The "dds" textures are pretty easy as well, you can simply open them in GIMP or Photoshop, then save them as another more common file type. The normal map texture (the one ending in "_n") will need some modification in your image editor before it works.

The normal map is green, this is not the standard colour for a normal map. Luckily, we can fix that. We need to shuffle the image colour channels around.

These same steps should work whether you use GIMP or Photoshop. Open your normal map in either Photoshop or GIMP. Copy what is in the alpha channel, and paste it into the red channel. Change the colour of the blue channel to full white. Now you're normal map is ready to use!



Congratulations
You did it. You had to learn the file structure of SWTOR to do it, and you're practically a qualified BioWare employee at this point, but you did it.



This tutorial does not cover how to prepare these models and textures for Garry's Mod. That is beyond the scope of this guide. There are many other guides that will cover that subject online and on Steam.

Contributors:
https://steamcommunity.com/id/Blackflogger for using the Model ID to find file names.
https://steamcommunity.com/id/garmofgnipahellir for creating and sharing their Blender SWTOR Importer.
279 Kommentare
Valrod 26. Aug. 2022 um 5:02 
Thank you :steamthumbsup:
Zerox 13. Nov. 2020 um 8:38 
Anyone have any idea where the model and texture for the beam portion of the lightsabers are located? I have the handle I want, I just need the beam for it still. I found some bems called fx_test_saberglow_01.gr2 and fx_test_sabercore_01.gr2 in resources\art\fx\geometry\lightsaber but I'm not convinced they are the beams I am looking for.
Acacius aka Azenet 20. Okt. 2020 um 15:03 
Hello man i have a problem with Easymyp extraction. I extract only dds no gr2
Zephyr 31. Juli 2020 um 10:27 
I'm confused about this XD

Could someone lend me some help?
Blackflogger 24. Juli 2020 um 13:40 
You will not get rid of the brown part, you can gloss it over in Photoshop. The eye textures of all characters are here

art\dynamic\player_character\face_customization\eye
Cheesypeesy 24. Juli 2020 um 9:54 
Hey I have a problem with the face textures for the humans, there is this brown area near the eyes that i don't know how to get rid of. I also cannot find the eye texture as I just found its normal map. https://gyazo.com/b8c4bb3598a7a8971ba95f3e47e4d1eb
Morganicism  [Autor] 24. Juli 2020 um 4:48 
Oh wow, that spelling mistake has been there a long time now. Thank you for pointing it out!
Garm 24. Juli 2020 um 0:57 
Also I noticed the title says "Extacting", I'm guessing it should be "Extracting"? ;)
Garm 24. Juli 2020 um 0:54 
Morganicism  [Autor] 18. Juli 2020 um 3:59 
I haven't tested it too much yet, but I'll say it is incredibly useful so far. The only option I saw on github was to download the code, so I had to zip the io_import_swtor folder in order to install it. And for the experimental bone import, the vertex group names were mismatched. I'll add a spot for it on the guide soon, it should save people some time. :viridian: