Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>SWG String File EditorNew to Visual Studio Code? Get it now.
SWG String File Editor

SWG String File Editor

Wasted Potential Studios LLC

|
4 installs
| (1) | Free
View and edit Star Wars Galaxies .stf (String Table File) files in plain text format
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

SWG String File Editor

A Visual Studio Code extension for viewing and editing Star Wars Galaxies .stf (String Table File) files in plain text format.

Features

  • View Binary STF Files: Automatically converts binary .stf files to human-readable text format
  • Edit in Plain Text: Edit localized strings in a convenient text format with syntax:
    • Section headers: [string_name]
    • Properties: id=, crc=, text=
  • Save Back to Binary: Automatically converts your edits back to the binary STF format when you save
  • Preserve File Structure: Maintains all IDs, CRCs, and string mappings from the original file

Usage

Opening STF Files

  1. Automatic: Simply click on any .stf file in VS Code's file explorer
  2. Command Palette: Press Ctrl+Shift+P (or Cmd+Shift+P on Mac), type "Open SWG String File", and select a file

Editing Format

The extension converts binary STF files to this text format:

# Star Wars Galaxies String Table File
# Next Unique ID: 123

[string_name_001]
id=0
crc=1234567
text=This is the localized text content

[another_string]
id=1
crc=7654321
text=Another piece of text with\\nnewlines supported

Editing Tips

  • Section Names: Each string entry starts with [name] where name is the string identifier
  • Escape Sequences: Use \\n for newlines, \\t for tabs, \\\\ for backslashes
  • IDs and CRCs: Keep the id and crc values intact unless you know what you're doing
  • Comments: Lines starting with # are comments and will be ignored when saving

Saving Changes

Simply use Ctrl+S (or Cmd+S on Mac) or File > Save. The extension will automatically convert your text edits back to the binary STF format.

Installation

From VS Code Marketplace

  1. Open VS Code
  2. Go to Extensions view (Ctrl+Shift+X or Cmd+Shift+X on Mac)
  3. Search for "SWG String File Editor"
  4. Click Install

From VSIX

  1. Download the .vsix file
  2. In VS Code, press Ctrl+Shift+P and run "Extensions: Install from VSIX..."
  3. Select the downloaded .vsix file

From Source

  1. Clone this repository
  2. Run npm install in the extension directory
  3. Run npm run compile
  4. Press F5 to launch the extension in a new VS Code window for testing

Technical Details

STF File Format

The extension understands the Star Wars Galaxies String Table File format, which consists of:

  • Magic Number: 0xDEADBEEF (4 bytes)
  • Version: Currently supports versions 0 and 1 (1 byte)
  • Next Unique ID: Used for generating new string IDs (4 bytes)
  • String Entries: Each entry contains:
    • ID (4 bytes)
    • Source CRC (4 bytes)
    • Text length (4 bytes)
    • Unicode text (UTF-16LE, variable length)
  • Name Map: Maps string IDs to their identifier names

Based on Official Source Code

This extension was built by analyzing the official SWG source code from the LocalizedStringTableReaderWriter implementation in the client tools repository.

Requirements

  • Visual Studio Code version 1.85.0 or higher
  • No additional dependencies required for using the extension

Known Limitations

  • Large STF files (>10,000 strings) may take a moment to load
  • Binary file structure must be valid; corrupted files cannot be opened
  • Version 2+ STF files are not yet supported (if they exist)

Contributing

This extension was created for the Star Wars Galaxies community. Contributions, bug reports, and feature requests are welcome!

License

This extension is provided as-is for use with Star Wars Galaxies projects.

Acknowledgments

  • Built from the official SWG source code analysis
  • Thanks to the SWG Emulator and preservation communities

Support

For issues or questions:

  1. Check existing issues in the repository
  2. Create a new issue with details about your problem
  3. Include the STF file (if possible) that's causing issues

Note: This extension is designed specifically for Star Wars Galaxies .stf files. It may not work with other file formats that use the .stf extension.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft