Skip to content

Latest commit

 

History

History
134 lines (93 loc) · 3.18 KB

File metadata and controls

134 lines (93 loc) · 3.18 KB

Quick Start Guide - SWG STF Editor Extension

Installation (For Testing)

Method 1: Run from Source (Easiest for Development)

  1. Open VS Code
  2. Navigate to the extension folder: c:\Users\Joseph Ridder\Documents\SWG-Source\swg-stf-editor-extension
  3. Press F5 - This will open a new VS Code window with the extension loaded
  4. In the new window, open any .stf file from your SWG files

Method 2: Install as VSIX Package

# Navigate to the extension directory
cd "c:\Users\Joseph Ridder\Documents\SWG-Source\swg-stf-editor-extension"

# Install the packaging tool (if not already installed)
npm install -g @vscode/vsce

# Package the extension
vsce package

# Install the extension
code --install-extension swg-stf-editor-1.0.0.vsix

Using the Extension

Opening STF Files

Option 1: Direct File Open

  • Right-click any .stf file in VS Code Explorer
  • Select "Open With..." > "SWG String File Editor"

Option 2: Command Palette

  • Press Ctrl+Shift+P (Windows/Linux) or Cmd+Shift+P (Mac)
  • Type "Open SWG String File"
  • Select your .stf file

Editing

The extension converts binary STF files to this editable format:

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

[welcome_message]
id=0
crc=123456
text=Welcome to Star Wars Galaxies!

[goodbye_message]
id=1
crc=789012
text=May the Force be with you!

Edit the text fields and press Ctrl+S to save. The extension automatically converts your changes back to binary format.

Testing with Sample Files

Try opening STF files from your SWG installation:

  • client-assets-master\string\en\*.stf
  • data\sku.0\sys.shared\built\game\string\en\*.stf

Example STF Files to Test

Look for these common STF files in your SWG source:

  • creature_names.stf - Creature names
  • cmd_n.stf - Command names
  • ui.stf - User interface strings
  • spam.stf - System messages
  • conversation/*.stf - NPC dialogue

Common Tasks

Adding a New String

[my_new_string]
id=999
crc=0
text=This is my new localized text

Editing Existing Text

Just modify the text= line and save.

Using Escape Sequences

  • Newline: \\n
  • Tab: \\t
  • Backslash: \\\\

Example:

text=Line 1\\nLine 2\\nLine 3

Troubleshooting

Extension Doesn't Activate

  • Ensure the file has .stf extension
  • Try reloading the window: Ctrl+Shift+P > "Developer: Reload Window"

File Won't Open

  • Check that the file is a valid SWG STF file
  • Look at the Output panel: View > Output > "SWG STF Editor"

Changes Not Saving

  • Make sure the file is not read-only
  • Check file permissions
  • Verify the text format is correct (proper [section] headers and key=value pairs)

Next Steps

  • Publish to Marketplace: Follow instructions in BUILD.md
  • Customize: Edit source files in src/ directory
  • Report Issues: Create issues in your repository

Getting Help

  • Check README.md for detailed documentation
  • Review BUILD.md for development information
  • Look at the source code in src/ directory for implementation details

Happy Editing! 🌟

This extension was built by analyzing the official SWG source code to ensure 100% compatibility with the original file format.