Skip to content

Locating Weapons Assets

ZeroGravitas edited this page Aug 2, 2023 · 3 revisions

WARNING: THE RELEASE OF THE NEW VERSION OF THE .GR2 IMPORTER ADDON AND THE WAY ITS SWTOR MATERIALS WORK MAKES THE VERY LAST PART OF THIS GUIDE OBSOLETE. WE'LL UPDATE IT AS FAST AS POSSIBLE.


This is a guide on how to find the objects and materials for the game's weapons. This method depends on using the free Blender 3D app and our SWTOR importer add-on to find the name of the material (even if we may intend to use the weapons in some other app), and it seems to work most of the time.

We cover two cases:

  1. Weapons with no moving parts (not including saber blades as such parts).
  2. Weapons with moving parts.

Weapons with no moving parts.

Let's start by getting the in-game name of the weapon we are interested in, directly from SWTOR or from websites such as Swtorista.com. Let's say we want to get the Eternal Champion's Saberstaff:

Finding the mesh file

Now we'll search for that name in TORCommunity.com's database.

We can access the database in three ways:

  • By clicking directly in the Database tab label, which will show us a way to filter the type of data we want to find by categories.

  • By clicking the Search All Databases option, which will directly give us a search form to do just that.

  • By clicking the Items option, which will give us the search form narrowed down to the Items category. Weapons as 3D game objects are Items.

In practice, we could use the Search All Databases option as the fastest route and go through the results, opening them in new pages and checking them (because oftentimes we'll find several entries for a same game element: some refer to the 3D object, others to its values in the calculation of combat results, or to where it can be adquired, etc.). Given that we know that it's an "Item", by using the Items option we'll get a search result that will be more to the point, so, we go for that.

In the resulting form we launch a search by "Champion's Saberstaff". If that would fail to find anything, we'd try "Champion Saberstaff" without the "'s", instead (sometimes there are grammatical inconsistencies in the in-game names).

There we are. We click on the entry and get the record on the item. The part that interests us is in the DETAILED DATA tab, though.

We click on it… and a lot of gibberish appears 😄 . Fear not: what we need is very easy to find.

We need to locate the mesh file associated to this weapon. For that, we only need to search this page for text ending with .gr2 (that is, the extension of SWTOR's 3D object file format). Use your web browser in-page search function, typically by typing CTRL-F or CMD-F

…And there we have it (there might be more than one entry but most of times it refers to the same file).

Now we can find the mesh file in our EasyMYP or Slicers GUI-extracted assets folder. The entry is telling us where it is inside the extraction's resources folder: \art\dynamic\weapon\model\dualsaber_high35_a02_v02.gr2(don't mind the double backslashes shown in the webpage, they are a peculiarity of the JSON format), but we can go faster by simply copypasting the filename into Windows' File Explorer's instant search field (or macOS's Finder's own, for that matter).

Finding saber blade objects

SWTOR seems to use both a pointy cylinder object as a saber blade's white-hot core and a series of intersecting "cards" with the glowy halo texture pasted on. Both those objects and related textures are stored in resources\art\fx's subfolders. The overall look can be produced with just the cylinder objects and some glare effect (Eevee's own or through the Compositor's nodes).

There are a few blade objects in there. For example:

  • resources\art\fx\geometry\lightsaber\fx_test_sabercore_01.gr2 and
  • resources\art\fx\geometry\lightsaber\fx_test_saberglow_01.gr2 (slightly thicker than its sabercore counterpart).

Or:

  • resources\art\fx\geometry\all\fx_saber_blade_01.gr2 (slightly larger than the previous ones).

These are generally the most easy to handle, as they only need a 90º rotation to fit a saber hilt (and maybe a little bit of repositioning to be fully centered). Most others are set at 45º for some reason, which isn't that terrible a bother anyway. One can find them by searching for "saber gr2" in the fx folder. Some examples are:

  • resources\art\fx\geometry\all_characters\malgus_saber_glow.gr2 (shorter but thicker and less pointy).
  • resources\art\fx\geometry\mtx\revan_saber_glow.gr2 (long and semi-pointy).
  • resources\art\fx\geometry\all_characters\satele_saber_glow.gr2 (a full length double-bladed one).

Etc.

Finding the material description files

But we need to know its associated material description file (.mat extension), too. There is a simple trick to that, but it requires that we first import the object into Blender.

It happens that most non-Player Character objects have the name of the associated .mat file (or files, plural) somewhere inside the object's .gr2 file. We could try finding it with a Hex Editor (not fun!), but instead we are taking advantage of the .gr2 import/export add-on's ability to find that name and automatically assign it to the object's default Blender material (the one we usually discard in order to apply the add-on's SWTOR material templates.

We can find the material name by either twirling the arrow besides the item in the Outliner…

…or by looking at it in the Shader View.

We copy the name and search for it (all .mat files are stored in resources\art\shaders, but there are just so many in there that it's still faster to use instant search again:

And there it is! Opening the .mat file with any text editor (Windows' Notepad app, for example) we can read all the things we need to texture our object: type of material template to use ("Creature" in this case, as pointed out in <Derived>Creature</Derived>), texture files (need a .dds extension added when searching for them), etc.

Check if it uses more than one material:

We need to check if the weapon object we are handling uses more than a single material, though, because it seems not to be that unusual for them to use several at once. For example, this blaster here, the Gambler's Luck Blaster Pistol, re-uses some generic materials for the grip, as we can see by checking the Outliner information or the Shader Editor's Slots menu next to the Materials one.

Weapons with moving parts.

If your weapon has moving parts such as retractable blades, rotating barrels, etc., SWTOR handles those parts through its special effects system, which actually helps us locate them.

Let's say we are assembling a Beryar's MK-3 Dual-Electroblade. When we wield that weapon, its blades extend with a short animation.

We go through the same steps we did in the previous example. We get from TORCommunity.com's database the mesh's pathname, which is \art\dynamic\weapon\model\dualsaber_eblade_mtx17_a01_v01.gr2.

We find the object and import it into Blender, to discover that the weapon lacks the actual blades!

Don't panic. Check again TORCommunity's data. You'll find an special effects entry (fxspec extension) immediately after one of the mesh data lines:

That pathname is relative to the folder where BioWare stores SWTOR's special effects scripts (that handle things like these simple animations, particle systems, calls to animated shaders for things like muzzle fire, blaster shots, etc). The full path relative to our extracted assets would be resources\art\fx\fxspec\mtx\ec_dualsaber_high35_a02_v02.fxspec. As usual, we'll be faster simply doing a desktop search for it.

There it is:

So, we open it in Notepad or any other text editor:

And we search for any mention of any mesh file, that is, filenames with a ".gr2" extension. We search for that extension…

…And we find just that: two mentions of the same object's filepath (because both of this weapon's blades have the same shape and, so, refer to the same object): resources\art\dynamic\weapon\electroblade\___model\electroblade_blade03_mtx17_a01_v01.gr2.

We locate the file, either by following the path or doing a simple desktop search, and import it into Blender. Checking for the part's material we see that it shares the main weapon's one, so we will be able to apply it there, too.

(Typically, the moving part won't be correctly positioned relative to the weapon's main object and we will have to take care of that. Interestingly, TORCommunity.com's data shows the rotations and translations necessary to set one of the blades in its stowed state, but, given that Blender's coordinate system differs in axes' order and orientation, it's probably faster to do it by hand)

We assign the template material, load the texture files that it mentions, and voilá, we are done!

On BioWare's naming practices.

One thing that would seem kind of evident is the relationship between the names of the assets:

  • Object's name: dualsaber_high35_a02_v02.gr2
  • Material's name: saber_high35_a01_v02.mat
  • Texture files' names: saber_high35_a01_v02_d, _n, _s…

So, we might assume that everything must follow that logic. It often works and can be a timesaver.

But there are exceptions: BioWare recycles models in rather clever ways. For example, there are lightsabers whose hilts are made of rifle parts. Take the Imperial E-1 Enforcer Lightsaber:

  • Object's name: saber_mtx22_a01_v01.gr2 (so far so good).
  • Material's name: mtx_blaster_mtx22_a01_v01.mat (uh oh!).
  • Texture files' names: saber_high35_a01_v02_d, _n, _s… (argh!)

BioWare took a part of the rifle and saved it as a separate object, but they kept the UV mapping and the rifle's material assignation, which is a smart use of resources but makes our lives this bit difficult 😅. It's simply something we have to keep an eye on.

Table of Contents


INTRODUCTION

IMPORTING SWTOR MODELS INTO BLENDER: A BRIEF OVERVIEW.
Check this intro first. Afterwards, you can jump directly to the guides on extracting PCs, NPCs and others.


TOOLS

No need to read this section right now: each extracting/assembling guide explains its required tools anyway.

Applications and Blender Add-on tools:

Online Tools:

Deprecated Tools:

  • EasyMYP (Windows app).
  • Noesis (Windows app).

THE COMPLETE GUIDE TO AUTO-EXTRACTING AND ASSEMBLING PLAYER CHARACTERS AND NPCs:

READ THE BROAD STROKES FIRST: YOU'LL SEE IT'S EASIER THAN YOU THINK!


ASSEMBLING GAME LOCATIONS AUTOMATICALLY:


LOCATING AND ASSEMBLING ASSETS MANUALLY:


OTHER GUIDES (WIP):


MODDING (to do)

Modding isn't working at the moment due to SWTOR's change to a 64bit codebase. It's going to take a while 🙁.


DATAMINING (to do)

  • Overview.
  • Tools.

SWTOR TECHNICAL INFORMATION:


OTHER RESOURCES:

Clone this wiki locally