EU4 interface mods · VS Code

Edit the .gui. Watch the window.

Etch draws the interface window under your cursor from the unsaved editor buffer, with the game's own textures, fonts and localisation.

  • Windows x64
  • VS Code 1.100+
  • EU4 1.37.5 (Steam)
  • No telemetry
Demo loop, 9 s, silent. In VS Code, etch_demo.gui is open beside Etch's preview of a game dialog. One keystroke widens the dialog's background and the frame redraws at once; the cursor moves to a button, the outline follows it, and a second keystroke moves the button into the new space. Two undos return the window to where it started.

Install in one line

Then open a .gui and run Etch: Open Preview. The full guide is in the extension README.

code --install-extension happy-dwarf-team.etch

Features

What the offline preview does

  1. Preview as you type

    The preview follows the unsaved editor buffer on every change, including the mod's .gfx and localisation files. Warm reload: median 6–7 ms, p95 8–14 ms (measured on the maintainer's machine, etch#39).

    Edit the .gui and the window redraws from the unsaved buffer; the widget at the cursor stays outlined.
  2. The window under the cursor

    The preview shows the top-level window that holds the cursor. Pin keeps it on one window while you edit other files.

    Pinned to the dialog while a .gfx file is edited: the preview keeps the window and shows the new button sprite.
  3. Widget outline and jump to source

    The Widget Outline lists the window's widgets. Click a widget in the preview to reveal its source; hover to see its path and rect.

    The Widget Outline lists the window's widgets; clicking one in the preview selects its source, hovering shows its path and rect.
  4. Diagnostics in Problems

    Missing sprites, fonts and textures, duplicate names and more appear in VS Code's Problems panel as you edit.

    A misspelled sprite name is reported in Problems while the rest of the window still draws.
  5. Any resolution

    The game's settings.txt, the monitor's, a corpus resolution from 1280×720 to 3440×1440 or any width × height. if_resolution blocks follow it.

    Pick the preview resolution: the game's settings, the monitor's, a corpus resolution or any width × height; if_resolution blocks follow it.
  6. Your playset, the game's own art

    Etch finds the game through Steam and draws with its textures, fonts and localisation. It ships none of them and sends nothing anywhere.

    The demo mod holds only text files; Etch draws its localised title, colours and icons with the game's own fonts and textures.

What 0.2.0 does not do yet

  • A layout preview: content the game's code fills in (lists, flags, values) is not shown.
  • Preview only: you edit in VS Code's own text editor, not in the preview.
  • Windows (x64), VS Code 1.100+, EU4 1.37.5 from Steam.

Roadmap

Preview now, 1.0.0 later

Etch is a preview release. The plan for 1.0.0 is the v1 specification; version numbers are indicative.

  1. M0 FoundationDone

    Public repository, CI, release-please, packaged VSIX.

  2. M1 Offline preview0.1.0Done

    Released on the Marketplace and Open VSX, marked preview. Everything on this page.

  3. M2 Precision corpus0.2.0Current

    Measured against the game, widget by widget, at six resolutions: vanilla and Proper 2K UI Enhanced.