Debug commands
The debug:* commands are inspection tools, not production exports. Use them to look inside a BSA
or a plugin, check the load-order merge, or survey the interior collision data before trusting
what export:books or the map commands produce.
Naming
Every debug command is named debug:<kind>:<source>:<domain>:
| Part | Values | Meaning |
|---|---|---|
<kind> | dump | Prints to stdout only. Never writes a file: redirect stdout to keep the output |
<kind> | export | Writes files under a required -o/--output-directory |
<source> | plugin | Reads records from one .esm/.esp/.esl file, or from a whole load order |
<source> | archive | Reads entries from one BSA archive, or from a whole load order’s |
<domain> | e.g. book, strings-tables | What is inspected. A domain can have both a dump and an export |
BookAtlas.Exporter --help prints this scheme, and <command> --help each command’s options and
examples.
Commands
| Command | Page | What it shows |
|---|---|---|
debug:dump:archive:files | archive files | Entry listing, optional hex dump |
debug:export:archive:files | archive files | Raw entries extracted to disk |
debug:dump:archive:strings-tables | strings tables | Decoded string tables, filterable by id or text |
debug:export:archive:strings-tables | strings tables | One decoded .txt per table |
debug:dump:archive:terrain-lod | terrain LOD | Expected LOD tiles and their archive |
debug:export:archive:terrain-lod | terrain LOD | LOD tiles extracted as .dds |
debug:dump:plugin:book | book | Merged BOOK records with per-field provenance |
debug:dump:plugin:vmad | VMAD | Papyrus scripts attached to a plugin’s records |
debug:dump:plugin:worldspaces | worldspaces | Merged WRLD records |
debug:dump:plugin:interior-collision-shapes | collision shapes | Havok shape histogram of placed interior objects |
All are registered in BookAtlas.Exporter/Commands/ExporterCli.cs and live in
BookAtlas.Exporter/Commands/Debug/.
One file or a load order
Every plugin and archive command except the terrain LOD ones reads either one file or a whole
load order. The --load-order option picks the mode:
| Invocation | Reads |
|---|---|
<command> Data/Skyrim.esm | That plugin only |
<command> "Data/Skyrim - Interface.bsa" | That archive only |
<command> Data --load-order se | Every plugin or archive of the vanilla Special Edition load order in Data |
<command> Data --load-order ae | The same, plus the Anniversary Edition Creation Club plugins and archives |
<command> Data --load-order custom --load-order-plugins <list> | The plugins you list, see Custom load order |
The debug:*:archive:files and debug:*:archive:strings-tables commands list archive entries
only, never loose files. The terrain LOD commands
resolve each tile as the game does, a loose tile first.
With --load-order, the argument must be the Data directory. Without it, the argument must be
a file. Any other pairing is a parse error. --load-order has no default on these commands: its
presence is what switches to the load order. The terrain LOD commands always read a load order:
they take <data-directory>, and their --load-order defaults to se.
Every command reads the same archives for a load order: its
archive file system, the vanilla archives then
the archives of each non-vanilla plugin. archive:strings-tables picks the string tables out of
it. The voices archive depends on the install language, so each shipped
Skyrim - Voices_<lang>0.bsa is listed and only the installed ones are found.
The archives are merged the way they are for export:books: a path present in several archives
resolves to the last one, and the earlier entries are counted as
shadowed in the summary line. With a load order, the listings add an archive column after the
size and compression.
A plugin read on its own is not merged with its masters:
- Its string tables and meshes come from the vanilla archives, plus the archives named after the
plugin when they exist (
ccBGSSSE001-Fish.bsaforccBGSSSE001-Fish.esm), since the engine loads those archives with the plugin. - FormIds still resolve to their owning plugin through the plugin’s master table, so an override
shows under its master’s
GlobalFormId. It shows only the fields this plugin sets. - A reference to a record the plugin doesn’t contain (for example a book’s MenuArt STAT in
Skyrim.esm) stays unresolved. Read the load order to see it resolved.
Shared behavior
- Every command opens game files via
Game/Bsa/GameFileStreams.OpenRead. Exports write throughIO/DestinationPathResolver, which rejects any archive-derived path that would escape the output directory. - A file or directory argument that doesn’t exist is a parse error, reported before anything is read.
- A plugin listed in the load order but absent from the data directory is skipped with a
[WARN]. Only finding none of them is an[ERROR]. A load order’s missing archives are expected (see above) and only listed at--verbose. Finding none is a[WARN]for the plugin commands, which still print what doesn’t need an archive, and an[ERROR]for the archive commands. - A filter option that matches nothing (
--worldspace,--cell) is an[ERROR]when the command can’t show anything without it, a[WARN]otherwise. - Output goes to stdout; progress, warnings and errors go to stderr.
--verboseadds per-file detail. See Logging. - The
archive:filesandarchive:strings-tablescommands log a one-line archive summary (version/codec, flags, folder/file counts, entry match count) before acting, viaGame/Bsa/BsaHeaderSummary.cs. With--load-order, that line moves to--verbose, one per archive, and a single[INFO]line gives the archives found, the matching entries, and the shadowed ones. The terrain LOD commands log their own summary instead (landscape cell count -> tile count -> expected file count), since they resolve tiles rather than list entries.