Skip to content

A Visual Studio Code extension that streamlines the development of game support extensions for Vortex.

License

Notifications You must be signed in to change notification settings

Der-Floh/Vortex-Extension-Helper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

25 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Vortex Extension Helper

A Visual Studio Code extension that streamlines the development of game support extensions for Vortex.

This is a community-created VSCode extension and is not an official product of Nexus Mods.

Extension demo intellisense short

Table of Contents

Features

๐Ÿš€ Quick Project Scaffolding

  • New Game Extension Wizard: Create a basic game support extension structure with a single command
  • Language Support: Choose between JavaScript or TypeScript projects
  • Automatic Setup: Generates all required files including info.json, package.json, index.js/ts, configuration files, and placeholder game artwork

๐Ÿ’ก Intelligent Code Completion

  • Vortex API Snippets: Access pre-built code snippets for common Vortex API patterns
  • Context-Aware: Snippets include game registration, mod installers, mod manager integration, and tool definitions
  • Language-Specific: Tailored completions for both JavaScript and TypeScript projects

โœ… Workspace Validation

  • File Structure Checks: Automatically validates that all required files are present
  • JSON Validation: Ensures info.json and package.json contain required fields
  • Live Diagnostics: Real-time validation as you edit files

๐Ÿ“ฆ Dependency Management

  • Vortex API Installation: One-click setup of the Vortex API and related libraries
  • Categorized Dependencies: Easy access to required, common, additional, and unofficial Vortex libraries
  • NPM Scripts: Pre-configured scripts for building, packaging, and dependency management

Demo

Create Extension

Extension demo create extension


Intellisense

Extension demo intellisense


Workspace Checks

Extension demo intellisense

Installation

Install from within Visual Studio Code (Recommended)

  1. Open Visual Studio Code
  2. Go to the Extensions view (Ctrl+Shift+X / Cmd+Shift+X)
  3. Search for Vortex Extension Helper
  4. Click Install
  5. Reload VS Code if prompted

Install from other Sources

You can also install the extension directly from the Visual Studio Code Marketplace:

After installation, reload VS Code and access the extension via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) by searching for commands starting with Vortex:.

Commands

Access these commands via the Command Palette (Ctrl+Shift+P / Cmd+Shift+P):

  • Vortex: New Game Support Extension - Create a new game extension project
  • Vortex: Setup Vortex API in Workspace - Install Vortex API dependencies
  • Vortex: Scaffold Game Extension in Workspace - Add missing required files to an existing project
  • Vortex: Run Workspace Checks - Validate your workspace structure and required files
  • Vortex: Open Extension Documentation - Opens the Nexus Mods Documentation on how to create Extensions

Getting Started

  1. Create a New Extension:

    • Open the Command Palette
    • Run Vortex: New Game Support Extension
    • Choose a location for your project
    • Select JavaScript or TypeScript
    • Select your Game
  2. Complete the Setup:

    • The extension will automatically scaffold all required files
    • Dependencies will be installed automatically
    • Your workspace will be ready to start coding
  3. Start Developing:

    • Edit info.json with your game details
    • Implement game support in index.js or index.ts
    • Use code snippets (prefix with t) for common patterns
    • Run workspace checks to validate your setup

Code Snippets

The extension provides numerous code snippets accessible by typing t followed by the snippet name:

  • tregisterGame - Register a new game with Vortex
  • tregisterInstaller - Create a mod installer
  • tfindGameSteam - Find game installation via Steam/GOG
  • tprepareForModdingSimple - Simple mod folder setup
  • tprepareForModdingModManager - Setup with mod manager integration
  • ttestSupportedContent - Test if mod is supported
  • tinstallContent - Install mod files
  • tmoddingTools - Define modding tools
  • And more...

Project Structure

A scaffolded extension includes:

your-game-extension/
โ”œโ”€โ”€ .vscode
   โ”œโ”€โ”€ settings.json
   โ””โ”€โ”€ tasks.json
โ”œโ”€โ”€ info.json              # Extension metadata
โ”œโ”€โ”€ package.json           # NPM dependencies and scripts
โ”œโ”€โ”€ gameart.jpg            # Game icon (replace with actual artwork)
โ”œโ”€โ”€ index.js / index.ts    # Main extension code
โ”œโ”€โ”€ jsconfig.json / tsconfig.json  # Language configuration
โ””โ”€โ”€ dist/                  # Build output (TypeScript only)

Requirements

  • Visual Studio Code
  • Node.js and NPM installed
  • Git (for installing Vortex API dependencies)

Vortex API Libraries

The extension provides easy access to official Vortex libraries:

Required:

Common:

Additional: Game-specific libraries for formats like BA2, BSA, ESP, and more

Build from Source

If you want to build and run the extension yourself:

  1. Clone the repository

    git clone https://github.com/Der-Floh/Vortex-Extension-Helper
    cd Vortex-Extension-Helper
  2. Install dependencies

    npm install
  3. Build & Run in VS Code

    • Open the project folder in Visual Studio Code
    • To build: press Ctrl+Shift+B to run the default build task
    • To debug the extension:
      1. Press F5
      2. This launches a new Extension Development Host window with the extension loaded
  4. Package the Extension (vsce)

    To create a .vsix package using vsce:

    npm run package

    This will generate a VSIX file that you can install locally via:

    • VS Code: Extensions view โ†’ ... menu โ†’ Install from VSIX...

Known Issues

  • The extension requires an active internet connection to install Vortex API dependencies from Git repositories
  • Some advanced Vortex API features may require manual type definitions

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

Resources


Enjoy creating game support extensions for Vortex! ๐ŸŽฎ