A TRE Tour : A brief guide to the directories in SWG

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Mar 16, 2014
Dark Rebellion RP
This was a random idea that I came up with after listening to Hovi and MrScott talk about guide making on Discord, that might be of help to anyone who is trying to get a rough idea of what everything does in SWG's files. Knowing this information casually can help you discover new ways to mod and experiment with the game.

The following are directories found on the top level of the TRE files of SWG, most notably the one found in the MTG TRE Files (though there's no real difference.) I don't know everything there is to know, so some directories may not have a satisfactory description.

This directory contains a lot of information, mostly defining information related to item slots (i.e. which bone on a skeleton is the "right hand.") and so on. This directory will most likely be visited by anyone who is trying to do something fascinating with slots, inventory item locations, and what not. A common usage of the files within is to change the slots of jackets to allow chest plates to be worn underneath coats and cloaks, etc.

Despite the name, this folder doesn't contain any animations, but instead more definition files. Most likely they contain more mapping to match certain animation strings to animation file frames.

One of the most complex of directories in the game, this contains everything related to the visual appearance of files in the game. This has many subdirectories, so I will cover them in this guide. The top level directory contains APT, SAT, LSB, and PRT files. APT and SAT files are names that redirect the game to point to a specific LOD file or MSH file, depending on the type. APT is usually used for every static, non animated mesh, while SAT is used for animated meshes that have skeletons. LSB refers to the detailed information on lightsaber blades, and PRT is a particle effect file. There are also Swoosh and Sprite files, but I personally don't know much about them.

This is where most if not all of the animations of the game are located, as ANS files.

This directory contains Animation State Hierarchy files. I don't know much about this, but I know it defines which animations take priority over other animations.

Most of the files within are FLR (or Floor) collision files, which are paired with an object to determine the collision of an object. This is what defines what is collidable, what can be walked on, etc. Every object that has collision more advanced than a simple shape uses a FLR file. Every interior cell uses a POB file to determine the collision of walls, ramps, etc.

Component files take a bunch of meshes and combine them into one mesh. These were most common for some of the older meshes in the game, or very large structures like Theed Palace. I don't know much about using CMP files, but they can be a pain due to their complexity.

Logical Animation Tables are stored within, which matches each animation up to a string/name that can be read and used by the game or server to play a specific animation.

LOD, or "Level of Detail" is a file that defines the various level of detail models for a particular appearance. Meshes tend to have a suffix to their filename ranging typically from "l0" to "l4" which defines which level of detail that mesh is for. In game, different levels of detail are used at different distances, which is done to keep the visuals of the game as consistent as possible without losing performance. A model far away will be lower in detail than one up close. It is noteworthy that SWG doesn't need to use LOD files whatsoever, and these files can be skipped when making new meshes; but it might be recommended if you're having performance issues with the game. It was more important to have LOD back in 2003, but for more advanced models, LOD is still recommended.

I have no idea. Masking tends to refer to hiding certain things behind something else. While I wouldn't write these files off, it is noteworthy that some directories in SWG can be vestigial from earlier versions of the engine. I have not yet seen a use or requirement for contents within the Mask folder.

Every mesh/model in the game. MSH refers to static meshes. MGN refers to meshes that have a skeleton and animate. LMG is akin to the LOD file, but used for skeletal meshes (MGN).

Every skeleton in the game. Skeletons are a series of connected bones which uses an animation file to make a weighted mesh move. An example is the player character. Every vanilla playable species uses the same skeleton, so that a Wookiee, Bothan, Zabrak and Rodian can all perform the same animations while not looking quite like one another.

I have not done too much with sprites, but I know sprites are 2D images that can be rendered in a 3D space. On a glance, it looks like Sprite files are typically used for lighting effects and grass.

I have not done much with Server Side Appearances, but I do know there is something to do with appearance files on the server. I know that the server does not necessarily need the full TRE files a client needs, and this may play into that. Someone smarter could likely tell you how and why.

I've never used this directory, but based on the file contained it might contain rules on how the camera works, based on how far it can zoom, move, etc.

The files contained within this directory define the strings used for moods, but also the distance at which certain chat types propagate. I.e. yelling can be heard from further away than speaking, or whispering. It can also define which chat types are locked behind a skill, like "sing."

This directory handles Client Data Files, or CDFs. CDF files can hook certain meshes or effects to appearance files, such as the landing struts on the transport shuttle, or a light effect on a lamp. This is also used for the blades on a windmill and defining how they move. Anything that isn't part of the root mesh of a model is usually applied here. CDFs can also be used to define the appearance of an NPC, such as their customization and what they wear.

A client effect, or .CEF file, creates special effects within the game. Typically by mixing a particle effect, with sound and other FX to create something that can be played in the world. Client Effects are commonly used for special abilities, camera shaking, or playing music or sound effects on command.

This defines details about cockpits for ships in Jump to Lightspeed.

Home of the Combat Manager, which is typically used to assign animations to certain effects or abilities, as well as other combat related elements the client needs. I have not personally done too much with the Combat Manager as of writing this, so I cannot say much more.

This folder contains information and definitions about the character creation process, including clothing for professions, and what professions are available at creation. It is noteworthy that it would not appear the starting_locations.iff is used for starting locations in the game. Instead, it appears the game uses the datatable in "datatables/creation/starting_locations.iff" instead.

Home of the Asset Customization Manager, which rules over the customization data of the entire game, telling which appearance files can be colored with which variables and palette.

An endless list of excel-like datatables which define many, many, many things. I recommend scrolling through these files to get a sense of what is used where, but datatables can cover a very large array of things. If something is being connected to something else, it is likely being defined in here.

Effect files are related to shaders. Effect files define the data that is sent to a shader script in order to make things appear. Effect files are referenced by the SHT files, and Effect files then refer to the files within pixel_program and vertex_program.

I have never been in here. I assume this is data that defines what footprints are used when constructing houses, but don't quote me on this.

Typically this refers to things like controller vibration or other effects that give an effect to being hit or something happening to you. I've never found a use for anything inside. It might be JTL specific.

These files contain the definitions for keybindings and keybinds connected to commands. You could create your own keybinds to certain new commands in here, as well as create your own presets for keymapping inside here.

ILF files within here determine the static contents within buildings. You might notice every Tatooine Starport has the same interior design of objects; this is because they all use the same ILF file as defined in their Object file. These are a little bit like Snapshots, except they're purely for interiors.

The most notable files within the Misc folder is the "object_template_crc_string_table.iff" file, (which determines the CRC values of objects and is required for the client to sync objects up with the server) and the "planet_crc_string_table.iff" which calculates the CRC of planet zone names. Whenever you add a new object, you will need to add the entry to the object_template_crc_string_table file for it to work.

This folder contains music files which are saved in the MP3 format.

Borrie BoBaka

Local Bothan
Staff member
Super Moderator
Mar 16, 2014
Dark Rebellion RP
This folder contains every single object file for the client. It has many subdirectories primarily to categorize and organize the sheer amount of objects found inside here. Object files define an object's type, appearance, name, etc. It is the highest level of an object in the game.

Here are the palette files for the game, which defines which colors are in a palette for customization purposes. I do believe there is a hard limit at 255 entries within a palette.

Inside here are the pixel shader files, which determine the script uses for pixel shaders, one of the major components of shader coding.

No idea in the world what goes on in here.

As it says on the tin, this is where the files used for Entertainer and Musician songs are found. The sample subdirectory contains the actual 'wav' files, whereas the sound subdirectory contains the SND files which tells the game how to handle and manage the wav file.

XML files are contained in here that have quest details and information, but I am not entirely sure how much of this is used in today's Core3 SWGEmu. I have never done any quest modding personally.

Sample refers to the raw sound effect files, typically in WAV format, that the game uses. These files are then given definitions elsewhere in the client; the sound folder with SND files, which gives them rules to obey or groups them together.

This contains SHT files which in turn connects different DDS textures together to form a "Material" that an be used by MSH and MGN files. Meshes typically refer to the SHT file, as it defines how a texture should appear in the game.

This folder contains functions that are included and used in the process of shader programming.

The snapshot folder contains WS, or "World Snapshot' files which determine what kind of objects appear on a planet that weren't placed there by a player, like buildings, props, infrastructure, and what not. The city of Theed's details, for example, are defined here in the world snapshot. Using Utinni and The Jawa Toolset made by Timbab, you too can edit and design environments and save them as a snapshot file.

SND Files are not directly a sound file, but instead is an IFF file that determines what sound files are played, and how they are played, when called by an effect to play. This also defines random sounds you might hear that might not ever be the same twice, or what ambient sounds you might hear in a city, such as the lone call of a Squall in Restuss every so often on a random timer. For a sound to be played properly in SWG, it needs to be defined in a SND file first. Then the SND file is what is played, similar to the relationship of a texture file and a SHT file.

Every one of SWG's vanilla strings and messages are handled through a STF file which pairs a generic tag to a string. This is done to make localization of the game much easier. All string related files are found within this folder. English localization is found in the folder called "en."

This folder contains various data for planet terrains. TRN files are the details required to make terrain of a planet look the way they look. A planet is first and foremost defined by the existence of a TRN file in this folder, whereas other details like environment, sky, and lighting is handled elsewhere. However, in this folder you will find the TGA files of "ColorRamps" which determine coloring of a planet. The ColorRamps in the colorramp folder are typically used to determine the color of light on the planet, and the environment folder has definitions for objects in the sky, such as the sun, moons, and stars.

Self explanatory. All the textures in the game are found here, with the DDS texture format, which can be opened using Nvidia's DDS Texture Tools, either standalone or as a Photoshop Plugin. It is generally recommended to save DDS files for SWG as a DXT2 or DXT3 format to prevent potential issues. Textures cannot be used raw, and need to be defined inside a SHT file within the Shader folder to be assigned to a mesh. Other formats, despite the existence of TGA files elsewhere in the client, do not appear to be supported by the game.

This folder contains files that allow for textures and shaders to be swapped out on an existing mesh to allow for things like customizable facial hair, tattoos and eyebrows on certain species. This area has been mostly unexplored territory by most servers to date, but allow for an advanced form of customization.

This contains every file for the User Interface, which uses a third party system, defining its UI elements in an XML-like readable file.

This folder contains vertex shader code, which is the first stop in generating shaders for the game. This is generally not important to you unless you're wanting to make your own shaders.

I think this folder might only be in the MTG files, as it relates to NGE and expansion cinematics, such as landing on Mustafar, or the demo reels for different professions from that era. I do not believe the Pre-CU client has any way of actually playing these videos.

Formatted in the same way as Player_Music, this folder contains sounds and samples of different vocalizations within the game.
Top Bottom