Skip to content

Editor Features

Joël Deffner edited this page Aug 11, 2026 · 2 revisions

Editor Features

A guided tour of what the toolkit does while you edit. This is not an exhaustive reference (the project is in beta and behavior is still moving), it is meant to show you what is there and when it helps.

Everything here works across your mod, any read-only parent mods, and the vanilla game files, and it is derived from the game's own data so it tracks your patch. Command names below are shown as they appear in the palette; the categories are Paradox, Paradox Tiger and Paradox Localization.

At the cursor

Completion that knows the grammar and the scope. Key positions offer verbs (engine triggers / effects / scope targets plus your own scripted effects and triggers, filtered by whether you are in a trigger, an effect, or a script-value math block). Value positions offer nouns: has_trait = lists traits, trigger_event = lists events, on_actions = { } lists on_actions, loc-valued keys list your mod's loc keys, and prefixes like scope:, var:, culture:, faith:, title: complete their referents. Items valid in the current scope (character vs title vs province, inferred from the block chain) rank first by real-corpus frequency; other-scope items are annotated but never hidden, so you are never blocked by a wrong guess.

Hover docs, merged. Hover a token to see documentation drawn from your script_docs dumps (authoritative, your exact patch) and, on CK3, the bundled wiki lists (so it works before you dump anything), the scopes it supports, the current scope chain at the cursor, and the resolved localization text for a loc key. Hover a .dds path and the texture renders inline (see DDS and Images).

In a huge multi-mod workspace, a word with many same-kind definitions renders as one grouped card ("33 sites") instead of a stack of identical cards, and on an assignment key the key's own structural meaning ranks first.

Navigation. Go-to-definition (F12), find-all-references (Shift+F12), fuzzy workspace symbols (Ctrl+T) across your mod, parent mods and vanilla, and safe rename (F2), which updates a mod-defined name across both script and localization at once (it only renames names your mod owns, never vanilla).

Scripted triggers and effects declared inline in an event file are indexed too, at any nesting depth, so definition, hover and references work on them even while the vanilla index is still building.

Signature help for $PARAM$s. When you call a scripted effect or trigger, signature help shows its parameters, and completing the call inserts its parameter block ready to fill (paramless ones offer a yes|no choice).

Inline localization. Loc text shows as inlay hints next to keys, a quick-fix lets you edit a key's text in place (writing BOM-correct yml, and routing vanilla-key overrides to localization/replace/), and you can jump between script and loc in both directions (Ctrl+Alt+T and Ctrl+Alt+J). When editing a translation, a reference-language overlay shows the source text.

Mod descriptor support. The launcher descriptor gets its own highlighting, hover docs and completion for every key, with a ready-to-fill example value (for example supported_version offers your installed game version, and tags = { } offers the launcher's category list). A mod folder missing its descriptor gets an error with a one-click Paradox: Create descriptor.mod fix.

Outline, folding and sticky scroll

Every multi-line {} block is an outline entry, at any depth, so breadcrumbs and sticky scroll follow the whole chain instead of stopping two levels down. Deep inside an event you get the real path:

Breadcrumbs and sticky scroll following the full block chain inside a character interaction

Blocks that are data rather than structure emit nothing (one holding only bare values like traits = { brave shy }, and one that opens and closes on a single line). A block's name shows as its detail.

This works in every language the toolkit handles:

  • script files: the full nested block chain.
  • .gui files: the nested widget tree, with types / template / blockoverride declarations labeled as such, widgets carrying their name = "..." as the detail, and type x = base showing its base.
  • localization .yml files: the l_<language>: body and comment banners fold.
  • descriptor.mod, outer .mod files and the bundled _*.info format docs get folding and an outline (and nothing else: no diagnostics, no completion).

Diagnostics: the silent-failure class

The engine's default failure mode is silent: a wrong encoding, a folder typo, or one unbalanced brace makes the game ignore your file with no error at all. The toolkit's own structural diagnostics catch exactly that class, instantly and with certainty:

  • unbalanced braces (which make the game ignore the rest of the file),
  • missing UTF-8 BOM on a loc file,
  • an l_english: header that does not match the _l_english.yml filename,
  • tabs in loc files,
  • folder traps like common/on_actions (on CK3 it is singular, on_action) or localisation/ (it is localization/),
  • references to mod-namespace events that do not exist,
  • schema-required loc keys that are missing.

Descriptors get their own checks. Anything deeper than structure is tiger's job, by design. Every code, its severity and its in-game consequence is listed in Configuration.

tiger integration

tiger is the deep validator. The toolkit auto-downloads it (at your request), and runs ck3-tiger or vic3-tiger depending on the active game. EU5 has no tiger build, so the toolkit says so instead of pretending.

  • Run it from the tiger item in the status bar, with Ctrl+Alt+V, or via Paradox Tiger: Run Validation. Set px.tigerRunOn to save to run it on every save (debounced). It is manual by default.
  • Reports land as native VS Code Problems, carrying both severity and confidence, with every report location mapped into the editor.
  • Dependency mods reach tiger. Your px.parentMods and the other mods of a multi-mod workspace are declared to tiger as load_mod entries, so a submod's references into its parents resolve instead of coming back "unknown". This is automatic when the mod has no tiger conf of its own; when it does, that conf stays in charge (regenerate it, or add load_mod blocks yourself). Paradox Tiger: Generate ck3-tiger.conf writes the blocks into the conf it creates.
  • Adopting tiger on an existing mod with hundreds of warnings? Paradox Tiger: Create Baseline snapshots today's reports and shows only new ones from then on. Toggle New-Problems-Only Filter turns the filter on and off, and it tells you honestly when there is no baseline yet instead of pretending problems are filtered.
  • Paradox Tiger: Find Unused Definitions is a one-shot scan for content nothing references.

Simulate an event

Paradox: Simulate Event (command palette, right-click in a script file, the "Simulate" CodeLens above every event declaration, or from a selected node in the event graph) opens a static walkthrough of an event: its blocks laid out in firing order (trigger, immediate, every option, after), the title, description and option names resolved through your localization, and each block printed back as readable script.

Simulate Event walking an event beside its source

Every onward trigger_event or on_action reference is a step-into link, so you can walk a whole chain with a breadcrumb trail and a Back control without opening ten files. Clicking a block heading or any line jumps to it in the editor. Middle-mouse drag pans.

Nothing is simulated that the files do not say: a reference to an event that is not indexed is labeled unresolvable rather than guessed at, and a block longer than 60 lines says how many lines it hid. It reads each game's own event vocabulary, so a Victoria 3 event shows its flavor line and walks its cancellation_trigger in place.

Workflow commands

  • Paradox: New Content (event, decision, …) scaffolds events, decisions, interactions and on_action hooks that are correct by construction: right folder, BOM'd loc stubs, namespace declared, and on_action hooks written as appends (never overwriting a vanilla on_action).
  • Paradox: Launch Game (debug mode) starts the game, and Paradox: Toggle error.log Watcher streams script errors from the running game into the editor as squiggles as they happen, including the multi-line Script system error! blocks (the Error: line becomes the message, the location line supplies file and line). Paradox: Clear Game Problems (error.log) clears them when you are done.
  • Translation: scaffold a whole language with Paradox Localization: Add Language (scaffold files), then work through it with the coverage-driven Translate Missing Keys (one by one) loop. To translate someone else's mod, New Translation Mod (see Multi Mod and Translation).
  • Paradox: Show Dependencies of Definition at Cursor lists what references a definition and what it references.
  • Paradox: Open Format Docs (.info) for This File opens Paradox's own folder schema doc for whatever you are editing, side by side (CK3 only, the other games ship no .info docs).

Editing opinion modifiers with the vanilla _opinions.info format doc open beside it

  • Paradox: Open Vanilla Examples, from inside an .info doc, lists the vanilla files in the same folder so you can jump from the schema straight into working examples.

Snippets, formatter, and inline suppression

Snippets cover the common blocks, and a deliberately conservative formatter handles indentation only (it will not reflow your script). To silence a specific diagnostic on one line, drop a # px:ignore <code> comment on it (or # px:ignore-next-line <code> above it); a bare # px:ignore silences the whole line, and a trailing -- reason documents why. This works for both the toolkit's structural checks and tiger's reports. Full details and the code list are in Configuration.

GUI and data-binding

.gui files get completion (properties ranked by real vanilla usage per widget type, using = templates), hover with usage stats, brace diagnostics, folding, a full widget outline, and go-to-definition through using splices and base-type chains. Bracketed data-binding expressions ([Character.GetFather...]) complete and chain through return types in both .gui and localization files.

For the structural view see the GUI Widget Tree in Sidebar Views; for working on a .gui file visually see GUI Editor.

When something goes wrong

  • The Paradox Modding Toolkit output channel is the log. An unhandled server error writes a FATAL line with its stack there before the process goes down, a failed index build logs the phase that failed, and every server start, stop and restart is logged with the restart decision. A dead server no longer looks like "only syntax highlighting works" with no explanation.
  • px.trace.perf turns on a millisecond timeline for every request, rescan and indexing phase, so a slow save can be reported as numbers instead of a feeling.
  • px.trace.server traces the LSP conversation itself.

Clone this wiki locally