Baldur's Gate 3 Osiris for VS CodeA BG3-focused fork of Sebastian Lenz's Divinity Engine Script Support, under the original MIT license. Check and compile Osiris with OsiCheck and extracted game sources, or use the optional native Toolkit backend. Features
RequirementsEditing works in desktop VS Code 1.85 or newer. Checks and builds require Windows x64 and Python 3.10+. The OsiCheck backend requires an external copy of the supplied OsiCheck distribution, .NET 8 or newer, the BG3 game files, and extracted dependency story sources. Those sources must include Retail game packages alone are insufficient. This backend uses the extracted sources already present in a modding setup; it does not reconstruct them from compiled stories. A missing-input error explains this requirement before an output can be produced. The Toolkit can provide these inputs, but it does not need to run or remain installed for subsequent OsiCheck checks/builds if the extracted inputs are retained. Obtaining a complete, compatible source set directly from a retail installation is not implemented. The Toolkit backend additionally requires .NET 10, an installed BG3 Toolkit, and a prepared baseline from a successful Toolkit build. The compiler host currently supports the inspected
A different DLL is rejected. Supporting another Toolkit build requires checking the compiler ABI and serializer before adding its identity. The game DLL is read from your installation and is never included in this extension. OsiCheck: check and build without the Toolkit
Compiler Backend defaults to OsiCheck compilation is experimental until its output has been validated in gameplay. It has passed isolated builds with only the new project's goal sources plus extracted game dependencies, binary readback, enum and global IFF checks, and invalid-source failure checks. Keep the native backend available when comparing compiler behavior. Dependency Mods lists module folder names in load order; the project is loaded last. Its default includes the standard game, Honour and HonourX modules. Add custom dependencies here when required by your project. The four exact vanilla unused-database exemptions supplied with OsiCheck are visible in output and the JSON report. They are applied before compilation so the compiler can generate a story, and are disabled for a database mentioned by the project's own sources. Other unused-database errors still fail the build. Set OsiCheck Known Vanilla Issues to an empty list to disable the exemptions. OsiCheck reads installed package files and copied source inputs in an isolated worker. It snapshots the project's goals, detects changes during compilation, rejects activation cycles, and verifies the saved story's rule count, global IFF links and enum table count before exposing the result. It does not silently substitute Optional native Toolkit build
Builds are staged in VS Code's extension storage. They do not install a story into the game, reload an editor session, or package a mod. Install the output through your normal mod workflow after reviewing the successful build. A failed build produces no usable Leave BG3 Osiris: Project Path empty for automatic discovery. An explicit value can point to the module or a folder inside it and overrides discovery; clear any stale value when switching modules. Build commands ask which module to use when several are available. The language service shares API symbols between modules in a multi-module workspace; use separate windows for modules with incompatible headers or conflicting custom symbols. Goal What the native compiler doesThe backend preserves dependency goal blocks, order and activation relationships from a successful Toolkit build. It merges current mod-owned goal files, validates parent references and cycles, and runs the native compiler in a separate worker process. This provides native symbol resolution, type inference and BG3 enum support. Diagnostics are mapped to edited goal files where the compiler's source location is available. Baseline hashes are checked before every build. Edits made before preparation are detected rather than silently replaced with old source. Compiler failures and process crashes leave the module's working story untouched. After a Toolkit/game update, dependency changes, or changes requiring new generated object definitions, generate definitions and build in the Toolkit again, then run Prepare Project again. The previous baseline is archived beside the new one. A changed compiler still requires ABI verification before it is supported. This first version does not regenerate engine definitions itself. Preparation captures the last successful Toolkit build even when an open goal is empty or unfinished. Such drafts are marked for recompilation and must be completed before Build Story can succeed. Failed preparation leaves the previous completed baseline usable. Build errors identify any source file missing its goal sections. The inspected native compiler retains The native compiler may refuse output even when it reports only warnings, such as an unchecked database. Those builds are reported as failed; fix the warnings before using the output. Live diagnostics check syntax. Check Story and compiler builds check types and dependency resolution. Runtime gameplay behavior still needs testing in the game or Toolkit. Command-line build
Build storage contains local game-derived data. Keep it out of source control and distributable mod packages. No game assets, story headers, dependency story snapshots or compiled game stories are shipped in the VSIX. Development
Building both workers from source requires the .NET 10 SDK and .NET 8 reference pack. OsiCheck's binaries are resolved at runtime from the configured installation, and are not needed to build our worker. The packaged extension needs only the appropriate runtime. Run standalone integration tests against the supplied OsiCheck and installed game:
These tests create a source-only project with no project header, Run native integration tests against a module with a successful Toolkit build:
Tests copy module inputs into temporary local storage. They compare the output with the Toolkit binary excluding its timestamp, compile a new BG3 enum goal, reject an invalid procedure and check its diagnostic location, and verify edits made before preparation are retained. A separate native probe checks that The Marketplace publisher is Attribution and scopeThe original extension's license, grammars, snippets and syntax parser are retained. The parser used by the new service is isolated in This BG3 version focuses on Osiris editing, checking and compilation. The old API Explorer webview, semantic rename, DOS2 debugger and automatic runtime reload are not advertised as BG3 features. API links open the official BG3 modding documentation. |