bg3le: a Script Extender for native Linux Baldur's Gate 3
Support
If bg3le is useful to you and you'd like to support its development:

Baldur's Gate 3 has a native Linux build, but the Script Extender only supports the Windows one, so Linux players have had to run the game under Proton to use Script Extender mods. bg3le attaches to the native Linux game directly and implements the Script Extender's Lua API on it. Your Script Extender mods run on the Linux build, with no Proton or Wine.
bg3le is built on Norbyte's BG3 Script Extender. Its game-structure definitions and Lua framework are reused, not rewritten, and bg3le would not exist without them. Thank you, Norbyte.
What it does
- Runs Script Extender mods: mods load straight from their .pak files, with the same mod environment, bootstraps and require as the Windows extender. Mod Configuration Menu works, menu and all.
- The full Lua API: every function the Script Extender registers is present, in both the server and client contexts, checked against the extender's own declarations. It covers Osiris, entities and components, stats, static data, templates, localization, levels and pathfinding, Ext.IO, Ext.Net, Ext.Audio, the IMGUI overlay and Ext.UI.
- Saves are compatible: mod data (PersistentVars) is saved in the Windows extender's format, so a save moves between the two.
- Achievements with mods active, as the Windows extender allows.
- Survives game updates: nothing is pinned to a memory address. bg3le finds everything it hooks in whatever build is running, and checks it before using it. If a patch breaks something, only that feature turns off, with a warning in the console, rather than the game crashing.
- Fixes for the native build itself: much faster level loads and less stutter. On the author's machine, level loads went from over a minute to about a second.
- A Lua console: the bundled bg3lua client connects to the running game for live Lua, like the Windows extender's debugger.
Requirements
- Baldur's Gate 3's native Linux build, from Steam. Not the Windows version under Proton.
- Steam installed normally. Flatpak Steam isn't supported yet, because its sandbox can't see bg3le's files.
- python3, for the installer.
bg3le is built against Steam's own runtime, so it loads on any Linux system the game runs on. You don't need to install any other libraries.
Installation
- Download and unpack the archive anywhere.
- In a terminal, in the unpacked folder, run:
./install.py
- Launch the game from Steam as usual.
The installer copies bg3le into ~/.local/share/bg3le and adds its launch wrapper to the game's Steam launch options, keeping anything you already had there. Steam must be closed for that change, so if it's running, the installer asks before stopping it. Your original Steam settings are backed up beside the originals.
./install.py --dry-run
shows what would change without changing anything.
- Update: run the new version's install.py.
- Uninstall:
./install.py --uninstall
removes the launch option and everything bg3le installed.
Installing mods
Mods go where the Linux game expects them: Baldur's Gate 3/Mods, with the load order in PlayerProfiles/Public/modsettings.lsx. Use the in-game mod manager or your usual tools to set the order.
Differences from the Windows extender
There are two, both deliberate:
- A require after a mod has finished loading still works; the Windows extender raises an error.
- Ext.Enums entries are labels rather than EnumValue objects.
Troubleshooting
- bg3le doesn't seem to load: check ~/.local/share/bg3le/launch.log. It records whether the launch wrapper found the game.
- Every mod suddenly disabled after a crash: the game disables all mods when it finds a crash marker from the last run. bg3le removes that marker at startup, as the Windows extender does, but a crash before bg3le loads can still trigger it.
- The console and the log at /tmp/bg3le.log.<pid> show a WARNING line for anything a game update broke.
**Source and license
Source: github.com/lenonk/bg3le
bg3le's own code is MIT. It includes Norbyte' is MIT with the Commons Clause, so bg3le as distributed may not be sold. The licenses of every bundled library are in the archive's licenses folder.
Credits**
- Norbyte and the BG3 Script Extender contributors, whose work this is built on.
- Igor Tarasyuk, for the achievements
来源与文件
前往 N 网打开所选文件。安装与下载要求以原作者及平台说明为准。
<!-- aoe-mods-source:nexusmods:baldursgate3:25431 -->