Skip to content

A simple command-line drag-and-drop utility that allows for the creation and extraction of .lod (LODSettings) files for supported Bethesda games.

License

Notifications You must be signed in to change notification settings

UnknownExplorer13/Bethesda-LOD-File-Generator

Repository files navigation

Bethesda LOD File Generator

Take in the sights of your world!

About

A simple command-line drag-and-drop utility that allows for the creation and extraction of .lod (LODSettings) files for supported Bethesda games.

The creation of .lod files is the main reason I made this program, however it also supports extracting data from existing ones. This is only useful if you want a readable version of the data stored within the file to see what settings are used, or if you want to make sure your .lod files were properly generated.

DISCLAIMER: This is not an official tool nor is it endorsed by Bethesda.

Game Support

Bethesda games developed after the release of Skyrim use .lod files to help generate LOD meshes for worldspaces.

Game Creation Extraction
Skyrim LE Supported Supported
Skyrim SE Supported Supported
Fallout 4 Supported Supported
Fallout 76 Not Supported Supported
Starfield Not Supported Supported

NOTES

Technically the creation of .lod files for Fallout 76 is supported but there's no point adding support for the full size value of 512 as users are not allowed to create proper mods for the game.

Starfield extraction support was completed on 2024-07-14. For creation support I need to find out how the size value stored in the files are gathered/calculated before I start working on it.

LODSettings File Structure

The file structure for those that are interested in how the data is stored within the .lod files. Use a program like HxD if you want to look at the files yourself.

Skyrim/Fallout 4

Initial info gathered from UESP. Further info gathered by me during the creation of this program.

struct lodsetting
{
    signed short west;    // 00 - The westernmost cell of the worldspace
    signed short south;   // 02 - The southernmost cell of the worldspace
    signed int size;      // 04 - A power of 2 less than or equal to 256
                          //      (How many cells in the North/East direction to generate LOD for)
    signed int lowLOD;    // 08 - Lowest LOD level (4, 8, 16, 32; Default: 4)
    signed int highLOD;   // 0C - Highest LOD level (4, 8, 16, 32; Default: 32)
};

Example - DLC01SoulCairn.lod

CC FF CD FF 00 01 00 00 04 00 00 00 20 00 00 00
West South Size Lowest LOD Highest LOD
Bytes CC FF CD FF 00 01 00 00 04 00 00 00 20 00 00 00
Value -52 -51 256 4 32

Fallout 76

Same format as a Skyrim/Fallout 4 .lod file but can support size values up to 512.

struct lodsetting
{
    signed short west;    // 00 - The westernmost cell of the worldspace
    signed short south;   // 02 - The southernmost cell of the worldspace
    signed int size;      // 04 - A power of 2 less than or equal to 512
                          //      (How many cells in the North/East direction to generate LOD for)
    signed int lowLOD;    // 08 - Lowest LOD level (4, 8, 16, 32; Default: 4)
    signed int highLOD;   // 0C - Highest LOD level (4, 8, 16, 32; Default: 32)
};

Example - Appalachia.lod

42 FF 23 FF 00 02 00 00 04 00 00 00 20 00 00 00
West South Size Lowest LOD Highest LOD
Bytes 42 FF 23 FF 00 02 00 00 04 00 00 00 20 00 00 00
Value -190 -221 512 4 32

Starfield

A slightly updated format compared to older Creation Engine .lod files.

I'm still gathering info on how exactly these files are structured.

struct lodsetting
{
    signed int objBoundMinX;  // 00 - The worldspace object bounds' Min X value
    signed int objBoundMinY;  // 04 - The worldspace object bounds' Min Y value
    signed int size;          // 08 - Using Math.Abs(a - b) using the two largest values from Min/Max
                              //      gives about the right results but there are inconsistencies in
                              //      in some .lod files that makes me doubt this is 100% correct
    signed int unk1;          // 0C - Engine might ignore these values? 00000000
    signed int unk2;          // 10 - Engine might ignore these values? 00000000
};

Example - NewAtlantis.lod

DD FF FF FF C5 FF FF FF 88 00 00 00 00 00 00 00 00 00 00 00
objBound Min X objBound Min Y Size unk1 unk2
Bytes DD FF FF FF C5 FF FF FF 88 00 00 00 00 00 00 00 00 00 00 00
Value -35 -59 136 0 0

About

A simple command-line drag-and-drop utility that allows for the creation and extraction of .lod (LODSettings) files for supported Bethesda games.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages