Modkit — StarCraft II modding for VS CodeGameData XML, Galaxy script, SC2Layout UI, and localization — with real cross-mod resolution. Modkit reads your mods and the shipped game data, so hovers, completions and go-to-definition answer with the value the engine would actually use, inherited through Core/Liberty/Void. Around that sits the rest of the pipeline: a mod/archive browser, viewers for models, textures, audio, video, maps and replays, and a launcher that starts your map in the real game.
Requirements
FeaturesGameData XML
Galaxy scriptFull language server, bundled — completion, diagnostics, navigation and the natives/TriggerLibs of the dependencies your mod actually resolves. Modkit: Verify Galaxy Script type-checks the active file on demand (also on its editor and Explorer context menus). SC2LayoutSchema-backed completion, diagnostics, frame/property navigation and property-bind resolution.
Modkit: Preview SC2Layout renders the layout. Set LocalizationA spreadsheet-style, locale-by-locale editor for Mods and archivesThe Modkit container in the activity bar holds:
Archives open in place — Modkit: Explore Archive gives you a file tree with extract and
insert, for ViewersAvailable from an editor tab, the Explorer context menu, or by opening a file from the archive tree.
Icon authoring has its own commands on Running your mapModkit: Launch SC2Map starts the map through SC2Switcher; Modkit: Configure Map Launch
sets the install and default map. For repeatable runs add a
Getting startedPick the setup that matches how you work, paste the settings, and check the startup banner. Setup A — your own mods, local folders
Leave Setup B — the real game install (CASC)
Cache modes (
|
| Mode | What it does | Use when |
|---|---|---|
parsed (default) |
Caches parsed data (indexes, base-mod parses) per game build; raw files stream from CASC on demand. Small on disk, instant warm starts. | Almost always. |
on-demand |
Also keeps extracted files as you touch them (data/metadata cached, big binaries streamed so it can't balloon). | You repeatedly read the same assets. |
full |
Bulk-materializes files to disk. With modkit.casc.extractedPath set, reads an existing extraction instead of CASC. |
You have, or want, a full extraction on disk. |
none |
No caching — always cold-read. | Diagnosing cache issues; zero disk footprint. |
Cache lives at %LOCALAPPDATA%/modkit/casc-cache (override with modkit.casc.cachePath or the
MODKIT_CASC_CACHE env var). Modkit: CASC Cache Settings shows live cache size and a
full-extraction estimate, with Materialize / Clear / Open-folder actions — also available as
Modkit: Materialize SC2 Data, Modkit: Clear CASC Cache and Modkit: Open CASC Cache Folder.
modkit.json — pinning a multi-archive project
A workspace holding several archives is ambiguous: Modkit can't tell which one is the project,
so Galaxy dependency resolution stays limited until you pin one. When that happens it offers to
write a modkit.json for you; Modkit: Set Project Archive does the same on demand.
{
"archives": {
"root": "Mods/MyMod/Data-01.SC2Mod", // relative paths resolve against this file
"exclude": ["scratchpad/**"], // never scanned for archives
"respectGitignore": true // default; false if your built map is gitignored
}
}
Comments and trailing commas are allowed. Discovery skips gitignored directories by default, so a
build or scratch copy of your mod tree won't shadow the real one. Editing the file takes effect on
save — no reload. Run modkit schema (from the modkit CLI) to write the JSON schema locally if
your editor isn't VS Code.
A healthy startup
Open Output → Modkit. Activation logs one banner:
Modkit v2.1.0 activating
workspace roots: C:\dev\my-mod
sources (2): mods:C:/dev/my-mod/Mods (workspace); casc:C:/Program Files (x86)/StarCraft II (global)
CASC install: C:\Program Files (x86)\StarCraft II
cache: C:\Users\you\AppData\Local\modkit\casc-cache (mode: parsed, extraction backend: auto)
log file: C:\Users\you\AppData\Roaming\Code\User\globalStorage\...\logs\modkit.log
init timings: casc-cache=3ms, panels=11ms, mod-tree=24ms, activate-return=31ms
Check that sources (N) lists what you expect — a source you set but don't see was dropped as
invalid or by a disabled tombstone. Then that CASC install is a real path rather than
(none detected) if you want base-game data, and that cache points where you think it does,
in the mode you set.
No banner in a plain project is correct. Modkit doesn't activate without SC2 content. It
starts on the first .galaxy / .SC2Layout file, any file inside an .SC2Mod/.SC2Map folder,
an archive browsed from the VFS, or the Modkit sidebar.
Localization workflow
Open a LocalizedData/*.txt file (e.g. enUS.SC2Data/LocalizedData/GameStrings.txt) and run
Modkit: Open Strings Table for a locale-by-locale editor — with the syntax highlighting,
completion and validation the raw .txt editor has. Inside the table, the tree button switches
between flat columns and a namespace tree; Modkit: Open Strings as Text goes back to the raw
file.
Comparison baseline (the ⇄ button / "Review" filter)
The table tracks a source locale — the mod's primary authoring language — against every other locale. Source strings keep changing during development, and translators need to know which already-translated strings are now stale.
Click ⇄ to pick what to diff the current source text against: a git commit, a saved cache file, or a browsed file. Rows whose source text changed since that baseline get a review badge and appear under the Review filter, so a translator jumps straight to what needs re-translating.
A baseline needs a snapshot of the source strings from some earlier point. Save source strings
cache (next to the Review filter) freezes the current source text as that snapshot, written to
.modkit/strings-cache/<mod>/<locale>.SC2Data/LocalizedData/<file>.txt under the workspace root.
Typical use: finish a batch of enUS edits, save the cache, hand off — translators then pick that
cache (or a git commit) as the baseline to see what changed since they last translated.
Modkit: Extract Changed Strings (since git ref)… produces the same delta as a file.
Worth it only when you need "what changed since X": for a small mod with infrequent source edits
it's overhead. Comparing against a git commit shells out to git show — fast, but needs the
workspace to be a git repo with that commit available locally.
Machine translation
The table can fill a target locale's empty cells from the source locale. You pick the provider per
run; only Google Translate works with no configuration. The AI providers (openai, anthropic,
gemini, codex, openai-compatible) need modkit.translate.aiApiKey and
modkit.translate.aiModel, and take an optional modkit.translate.aiPrompt /
aiContext / aiContextFile so translations match your mod's tone and glossary. Results land in
the table unsaved — review before writing.
Settings
Everything is under Settings → Modkit. The ones worth knowing:
"modkit.locale": "enus", // locale used to resolve strings
"modkit.enable": true, // master switch
"modkit.maxGraphHops": 1, // relation-graph depth
"modkit.cascAsFallbackBase": true, // fall back to CASC for unresolved base mods
"modkit.autoDetectInstall": true, // pick up an installed SC2 without a casc source
"modkit.disabledMods": [], // mods never loaded
"modkit.treeview.visible": false, // show the SC2Layout DescTree views
"modkit.log.level": "warning" // error | warning | info | debug | trace
Individual features can be switched off with modkit.modules.* — completion, diagnostics,
hover, codeLens, navigation, galaxy, layouts, strings, dds, modelInspect,
mapView, archiveView, zip. Useful for isolating a misbehaving surface without disabling the
whole extension.
Troubleshooting
"It can't find my dependency"
Run Modkit: Explain mod resolution with a file of the affected mod open. It re-runs resolution with tracing forced on and prints, per dependency, every source it probed — in order, with hit/miss and timing:
Explain mod resolution: file:C:/dev/my-mod/Mods/MyMod.SC2Mod
Liberty.SC2Mod
miss mods0 (miss) (2ms)
HIT casc1 -> casc1:mods/liberty.sc2mod (14ms)
MyDep.SC2Mod
miss mods0 (miss) (1ms)
miss casc1 (miss) (9ms)
UNRESOLVED: MyDep.SC2Mod
That tells you directly whether the name is wrong or the source is missing.
Turning up the logs
{
"modkit.log.level": "debug",
"modkit.log.categories": { "vfs.resolve": "trace" } // just the resolver, at trace
}
Effective immediately, no reload. Categories are the modkit·… path on each log line (casc,
vfs.resolve, mod.load, lsp.<lang>, viewer.<kind>, webview.<name>).
A rotating debug-level log is always written to disk regardless of the visible level — that file is what to attach to a bug report. Modkit: Open Log File / Modkit: Open Logs Folder.
Filing a bug
Modkit: Export Diagnostics writes a .zip with the debug log, versions, effective merged
config, detected install, loaded mods and load order, and the last resolver trace. It offers to
redact your home directory — take that option when sharing publicly.
Errors surface as "<scope> failed: <message>" with an [Open Logs] button; the log line
carries the full stack, a stable error code and structured context. Shipped builds include source
maps, so stacks point at TypeScript files.
Credits
Modkit builds on work by others:
- WhiteoutLib by Fernando Sahmkow (BSD-3-Clause) — the native CASC extraction backend, and the format structure work behind several of the archive and model readers.
- m3studio by Solstice245 — the
structures.xml-driven approach the M3 model parser descends from.