Game Studio / Tools / Archive packaging
SWG TRE Packager
Build TRE 0005 or 0004 archives from a folder or selected files, with path preservation, compression controls, and structural validation.
Visual Studio Code extension
Install, use, and troubleshoot SWG TRE Packager.
Use this guide to install version 1.0.3, learn its commands and settings, and follow the main workflows.
Installation
Recommended
Visual Studio Marketplace
- Open the extension's Marketplace page.
- Choose Install and allow Visual Studio Code to open.
- Confirm the publisher is Wasted Potential Studios LLC and the extension ID matches the value on this page.
- Reload Visual Studio Code if prompted.
Manual install
Manual VSIX
- Download the version 1.0.3 VSIX from WPS.
- In VS Code, run Extensions: Install from VSIX... from the Command Palette.
- Select
wps-swg-tre-packager-1.0.3.vsix. - Reload Visual Studio Code if prompted.
code --install-extension wps-swg-tre-packager-1.0.3.vsix SHA-256D784930D9ED1E0D7C9671259E75370DA960A4CC7C84D9C43AB2775E8EE0149B8
Build a TRE archive
- Open the asset workspace in VS Code and confirm the folder hierarchy matches the paths expected by the game client.
- Right-click one folder and choose SWG: Package Folder to TRE, or multi-select files and choose SWG: Package Selected Files to TRE.
- Wait while the extension builds and parses the archive for a structural check.
- Complete the destination picker and save the .tre where you intend to keep it.
- Test the resulting archive in the intended development environment before distributing it.
Note: Complete the destination picker. Cancelling it during a multi-file build can leave the generated archive in a temporary location.
Commands
| Command | Where | What it does |
|---|---|---|
SWG: Package Folder to TREswg-tre-packager.packageFolder | Folder Explorer context menu | Recursively collects the selected folder's files and builds a TRE archive. |
SWG: Package Selected Files to TREswg-tre-packager.packageSelection | Multi-file Explorer context menu | Packages selected files using paths relative to their common parent. |
Settings
Open VS Code Settings and search for the extension name or paste a setting key into the search box.
| Setting | Type / default | Purpose |
|---|---|---|
swg-tre-packager.defaultVersion | String: 0005 or 0004 Default: 0005 | Chooses the TRE structure; 0005 includes MD5 blocks. |
swg-tre-packager.compressFiles | Boolean Default: true | Uses zlib per file when compression reduces the size enough to be worthwhile. |
swg-tre-packager.compressToc | Boolean Default: true | Compresses the Table of Contents block when beneficial. |
swg-tre-packager.compressNames | Boolean Default: true | Compresses the filename block when beneficial. |
swg-tre-packager.outputDirectoryNot used in 1.0.3 | String Default: Empty | Declared in Settings, but version 1.0.3 uses its destination picker instead. |
swg-tre-packager.showNotifications | Boolean Default: true | Shows completion and failure notifications. |
Archive behavior
- A folder build recursively includes files beneath the selected folder.
- A file-selection build preserves paths relative to the files' common parent.
- TRE 0005 is the default and includes MD5 blocks for file integrity metadata.
- Relative paths are normalized and used to calculate SWG-style CRC32 values.
- File, TOC, and name blocks use zlib only when compression is beneficial.
- After construction, the extension parses the archive to catch structural build errors before the destination step.
Selection rules
| Selection | Behavior |
|---|---|
| One folder | Recursively packages its files with folder-relative paths |
| One or more files | Packages files relative to their common parent |
| Files plus a directory | Rejected; use the folder command instead |
| Files on multiple drives | Rejected because no common filesystem root can be preserved |
Troubleshooting
- If packaging is rejected, remove directories from a multi-file selection or ensure all selected files are on one drive.
- If expected assets are missing, check the selected root and relative paths before rebuilding.
- The outputDirectory setting is not applied by version 1.0.3; use the destination picker.
- A structural validation pass confirms archive readability, not that every asset path or game dependency is correct. Test the package in the target environment.
Privacy & license
This extension does not send extension data or telemetry to WPS.
SWG TRE Packager version 1.0.3 is distributed under the MIT License. Keep backups when converting or generating files.
Get one tool or the complete suite
Use Marketplace for updates, download version 1.0.3 as a VSIX, or get the bundle with all six tools.