Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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>:

PartValuesMeaning
<kind>dumpPrints to stdout only. Never writes a file: redirect stdout to keep the output
<kind>exportWrites files under a required -o/--output-directory
<source>pluginReads records from one .esm/.esp/.esl file, or from a whole load order
<source>archiveReads entries from one BSA archive, or from a whole load order’s
<domain>e.g. book, strings-tablesWhat 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

CommandPageWhat it shows
debug:dump:archive:filesarchive filesEntry listing, optional hex dump
debug:export:archive:filesarchive filesRaw entries extracted to disk
debug:dump:archive:strings-tablesstrings tablesDecoded string tables, filterable by id or text
debug:export:archive:strings-tablesstrings tablesOne decoded .txt per table
debug:dump:archive:terrain-lodterrain LODExpected LOD tiles and their archive
debug:export:archive:terrain-lodterrain LODLOD tiles extracted as .dds
debug:dump:plugin:bookbookMerged BOOK records with per-field provenance
debug:dump:plugin:vmadVMADPapyrus scripts attached to a plugin’s records
debug:dump:plugin:worldspacesworldspacesMerged WRLD records
debug:dump:plugin:interior-collision-shapescollision shapesHavok 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:

InvocationReads
<command> Data/Skyrim.esmThat plugin only
<command> "Data/Skyrim - Interface.bsa"That archive only
<command> Data --load-order seEvery plugin or archive of the vanilla Special Edition load order in Data
<command> Data --load-order aeThe 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.bsa for ccBGSSSE001-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 through IO/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. --verbose adds per-file detail. See Logging.
  • The archive:files and archive:strings-tables commands log a one-line archive summary (version/codec, flags, folder/file counts, entry match count) before acting, via Game/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.