SWG Mobile Template Viewer [Tool]

Many great and useful tools have been developed by the Star Wars Galaxies community to help in recreating a game that many enjoy playing over 15 years later. These tools have been used to help develop Sentinels Republic and every SWG Emu server into a thriving community with a strong player base.

Today I’d like contribute back with Sentinels Republic’s first in house tool, a web application for viewing Mobile templates and appearances.

While I’ve added to other projects, such as improving upon the Electron based RoC launcher developed by dpwhittaker with SR’s Launcher, this is something built from the ground up and aimed at solving a problem that currently has no simple solution.


SWG Mobile Template Viewer - Electron Application
SWG Mobile Template Viewer – Electron Application


Why a Separate Viewer?
Synter’s IFF Editor: Viewing a mobile

There are tools out there, such as Synter’s IFF Editor which allows developers and modders to browse and view game asset files for SWG in 3D, textures in 2D or their hexadecimal values for editing. But mobile template appearances all come back as naked. The results are what looks like early lewd SFM images and are of no help when trying to populate to pick out mobile templates in Star Wars Galaxies for new npcs using existing templates/uniforms.

The previous process was to spawn each npc into the world on a running game server and comparing their appearances manually. A process that was very time consuming and inefficient.

I am not aware of any way to get these uniforms to load outside of the game, so instead I set out on a process of writing some scripts to screenshot all templates and organize them into an application.


SWG Mobile Template Viewer

The tool itself is the end result of 9 python scripts and 6 hours of automation to generated 4250 screenshots. The scripts in question gathered every template appearance from the mobile lua files, obtained the unique templates and generated them into a list, created mobiles from each of these appearances, which were then loaded into a core3 server. I will be sharing these scripts at a later time, the need some clarification and clean up before they are made public.

Then a python script slowly, but automatically, took screenshots of every mobile. The screenshots then had thumbnail images generated from each file and the screenshots were all loaded into a folder to be displayed in the application.


Web Version

The application itself comes in two version, one is a simple web variant, which can be viewed here. Built with just jQuery, the purpose is to make a lightweight website version that can be used by anyone. Public Repository.

The website variant is fully formatted for mobile if for some strange reason you feel like viewing mobile templates on the go.

Originally, I planned on stopping there, but decided to develop it into a full desktop application for two reasons.

When accessing the web version, you must wait for each template image to load, I could preload the images ahead of scrolling, but that leads into my second reason, bandwidth and requests. Each template has two images associated with it, a thumbnail and a 1070 x 1070px full sized variant. While all of the thumbnails combined only reaches 30mb, the full sized images can be over 200mb. This is a lot of bandwidth and images requests if multiple users are using the web version at the same time.

My initial solution was just to have user’s download the git repo and open the index.html file in their web browsers, but I didn’t like how unintuitive that felt.


Moving to the Desktop

The desktop application, developed in Electron, weighs in at a hefty 400mb. 200mb is application data (full chromium browser and dependencies, Electron sucks for this) plus 200mb of images.

The return is that there is no loading time for the images and the application is snappier in general. The desktop application has all the same features and view sizes of the web variant, plus a few extra tweaks to make it a little more manageable on the desktop.

Visit the Public Repository, or download Version 1.0.0 here. 200mb download, 400mb after install.

Full information on bugs and how to install can be found on the release here.


Using the Application
Viewing a full sized template

There are two view options, Grid and List, default is grid. Clicking on a template will show the image full screen, if you wish to obtain a copy of the template’s name, select the text in the header. (Future version will include directories, copy button, etc.) Also planned are all creatures and just NGE/CU creatures or others which accidentally slipped in.


Sorting works as follows:

  • Ep3/Som/Npe are folders in the mobiles directory
  • Dressed is all templates which start with the “dressed” prefix.
  • Templates which meet these requirements are sorted by the first letter of the template excluding the prefix/folder.
  • While there are 4250 unique templates, because of the sorting option there are “duplicates.”
    • ex: dressed_yavin_negam appears under both “dressed” and “y”

Naked NPCs contain invalid appearances, this is something broken on the end of the MTG tre files. Same with templates that have the image “Invalid Object” or “Default Appearance.”

There are a few templates with images inside of the mobile or of the terrain. These will be fixed in a future version. Also, the public repo on the desktop version links to the web version, this is a bug.


Get Started: Desktop


Get Started: Web



Try the MTG Forum Thread, or contact Tyclo (Sphazz#2734) on Discord


Posted by Tyclo / Sphazz

Leave a Reply

Your email address will not be published. Required fields are marked *