Guillem Serra | Portfolio

{ video game programmer }

VgScript

Unreal EngineToolsPluginC++
May 2025

Branching dialogue in plain text, played as gameplay in Unreal Engine. A plugin on Fab, with IDE extensions for writers.

VgScript lets writers and designers define dialogue, decisions, conditions and actions in plain-text .vgs scripts, and plays them as gameplay in Unreal Engine. Talks become subtitles, decisions become choices, conditions read the game's state, and actions run Blueprint or C++ code.

The Unreal Engine plugin is available on Fab, and the full documentation is on vgscript.com.

Unreal Engine Plugin

  • Script-driven narrative: talks, decisions, condition groups, facts and named actions, chained one after another (->) or started in parallel (&).
  • Your own presentation: talk lines, decisions and custom actions are Blueprint or C++ classes, so subtitles and choices use the game's own UI.
  • Import from the editor: the import tool runs the vgs engine to renumber and reconcile the scripts, then fills a scenes data asset and one subtitle DataTable per language.
  • Localization: a CSV round trip for translators and runtime language switching, with a culture fallback chain.
  • Voice-over: recordings are imported and linked to each line by its text.
  • A showcase level: a short two-scene story that uses every feature, also public as vgscript-example.

IDE Extensions

The free VgScript extensions bring the language to JetBrains IDEs, on the JetBrains Marketplace, and to VS Code, on the Visual Studio Marketplace, with more IDEs to follow as people ask for them. They color each kind of entry, check the script as you type across every scene, and add go to definition, find references, completion and rename. Travel / Find Loose Ends walks every branch and reports dead ends, broken links and endless loops before anyone plays.

How It Is Built

  • One engine for every editor. The vgs command-line tool is written in Rust. It parses the scripts, renumbers entries and writes the .vgs.meta sidecars that Unreal imports. It also runs as a language server, which the JetBrains (Kotlin) and VS Code (TypeScript) extensions both start, so they underline exactly the same problems.
  • Stable IDs. Reconciling keeps each entry's ID across edits and renumbering by matching anchors, codes and content. Jumps between scenes are stored as those IDs, so renumbering a scene never breaks them.
  • A lean runtime. The runtime module depends only on core engine modules. An actions subsystem plays the flow, schedules talks (priority, resume, parallel speakers) and remembers what has played, while facts live in a game instance subsystem.
  • Localization keyed by text. Subtitle rows are named by a hash of each line's text, so identical lines share one translation and renumbering never loses one. The scenes asset registers its runtime-loaded tables as cook dependencies, so packaged builds include them.
  • Tested. Automation tests cover the flow, talks, built-in actions and the command-line integration.

Who Is It For?

  • Indie developers creating narrative-driven experiences.
  • Writers and designers who prefer working with text-based scripts.
  • Unreal Engine users who want a custom, extensible dialogue system without relying on heavy Blueprint graphs.