A Visual Studio Code extension for viewing and editing Star Wars Galaxies .stf (String Table File) files in plain text format.
- View Binary STF Files: Automatically converts binary
.stffiles 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=
- Section headers:
- 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
- Automatic: Simply click on any
.stffile in VS Code's file explorer - Command Palette: Press
Ctrl+Shift+P(orCmd+Shift+Pon Mac), type "Open SWG String File", and select a file
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
- Section Names: Each string entry starts with
[name]where name is the string identifier - Escape Sequences: Use
\\nfor newlines,\\tfor tabs,\\\\for backslashes - IDs and CRCs: Keep the
idandcrcvalues intact unless you know what you're doing - Comments: Lines starting with
#are comments and will be ignored when saving
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.
- Open VS Code
- Go to Extensions view (
Ctrl+Shift+XorCmd+Shift+Xon Mac) - Search for "SWG String File Editor"
- Click Install
- Download the
.vsixfile - In VS Code, press
Ctrl+Shift+Pand run "Extensions: Install from VSIX..." - Select the downloaded
.vsixfile
- Clone this repository
- Run
npm installin the extension directory - Run
npm run compile - Press
F5to launch the extension in a new VS Code window for testing
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
This extension was built by analyzing the official SWG source code from the LocalizedStringTableReaderWriter implementation in the client tools repository.
- Visual Studio Code version 1.85.0 or higher
- No additional dependencies required for using the extension
- 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)
This extension was created for the Star Wars Galaxies community. Contributions, bug reports, and feature requests are welcome!
This extension is provided as-is for use with Star Wars Galaxies projects.
- Built from the official SWG source code analysis
- Thanks to the SWG Emulator and preservation communities
For issues or questions:
- Check existing issues in the repository
- Create a new issue with details about your problem
- 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.