# DovahKin (DovaSins-Skyrim) **Unreal Engine 5 plays Skyrim Special Edition straight from your own game files.**

Status: Very Early Beta Engine: Unreal Engine 5.9 OS: Windows 10 / 11 64-bit Licence: GPL-3.0 + UE5 Exception Game Files: Bring Your Own Copy

[What Works](#what-works-vs-not-ready-yet) · [How to Try It](#how-to-try-it) · [Controls](#controls) · [Troubleshooting](#troubleshooting) · [Developer Details](#developer-and-technical-details) · [How It Was Made](#how-it-was-made) · [Licence & Credits](#licence-and-credits)
> [!WARNING] > **State: very early beta — unoptimised, heavy on your PC, and even heavier with Blueprints.** Right now this is mostly a walking simulator through your own Skyrim files (Helgen `MQ101` test ground), with rough/partial menus, scripts, and AI. There is **no optimization yet**: with UE5 Lumen hardware ray tracing, it is very heavy on CPU, GPU, RAM, and VRAM (lower-spec PCs will struggle). > **Even heavier with Blueprints:** DovahKin converts and runs Skyrim scripts as Unreal **Blueprints by default** (which builds thousands of script Blueprints on first run and adds extra runtime overhead). To skip Blueprint generation and run the lighter C++ script VM instead, set `DK_MAKE=0` and `DK_SCRIPTS=vm` before running `Edit.bat play`. > **Tested on:** AMD Ryzen 7 9800X3D · AMD Radeon RX 7900 XTX (24 GB) · 64 GB RAM. See [How it was made](#how-it-was-made) for accessibility notes, AI limitations, and why New Vegas is currently the main focus. > [!IMPORTANT] > **No game content is in this repo, and none is shipped.** DovahKin is a game reader. It opens your own copy of Skyrim Special Edition (archives, plugins, models, skeletons, scripts, menus) while the game runs in Unreal, and builds the world from them — the Skyrim engine is not running, so you need your own installed copy of the game. Also see our active sister repo: **[DovaSins-NewVegas](https://github.com/DovaSinS/DovaSins-NewVegas)**. --- ## What Works vs. Not Ready Yet *Summarized from project notes with AI — expect gaps and rough edges.* | Area | Working / Experimental | Not Ready Yet / Rough | |---|---|---| | **Live asset & record reading** | Reads `.bsa` archives, `.esm`/`.esp` plugins, `.nif` models, `.hkx` skeletons/animations, `.pex` Papyrus scripts, and `.swf` menus directly from your Skyrim `Data` folder | Many script natives, edge cases, and mod features remain incomplete | | **World & rendering** | Streams exterior and interior cells with Lumen hardware ray tracing, landscape, lighting, sky, water, and crossed-plane tree LODs | Visual glitches and unfinished world details; optional AMD FSR / AMDNR add-ons (`Mods\UE5Settings\`) are not bundled and must be installed yourself | | **Gameplay & AI** | The Helgen intro (`MQ101`), quests, AI package schedules, basic combat/knockdown, and HUD/menus | All rough and partial; mostly suitable for exploring/testing rather than a full playthrough | --- ## How to Try It ### 1. What you need | Tool | What for | Where | |---|---|---| | Windows 10 or 11 (64-bit) | Supported OS | — | | DirectX 12 GPU with hardware ray tracing | Required for UE5 Lumen | — | | Unreal Engine 5.9 | Engine | Epic Games Launcher | | Visual Studio (C++ game tools) | Builds the C++ module | visualstudio.microsoft.com | | Skyrim Special Edition (tested on 1.6.1170) | Your own game files (read at runtime) | Steam | **Performance & Blueprints note:** This build is unoptimised and uses heavy CPU, GPU (Lumen hardware ray tracing), RAM, and VRAM — and **running scripts as Unreal Blueprints (the default) makes load times and runtime overhead significantly heavier**. Use `DK_MAKE=0` and `DK_SCRIPTS=vm` to run the lighter C++ script VM instead. **Author's test PC:** AMD Ryzen 7 9800X3D · AMD Radeon RX 7900 XTX (24 GB VRAM) · 64 GB RAM. ### 2. Setup and launch 1. Install **Unreal Engine 5.9**, **Visual Studio** (with the **Game development with C++** workload), and **Skyrim Special Edition**. 2. Start Skyrim Special Edition once through its normal launcher so `Plugins.txt` exists in `%LOCALAPPDATA%\Skyrim Special Edition\`. 3. Download or clone this repository, open a Command Prompt in that folder, set any paths that differ from defaults, and run `Edit.bat play`: ```bat :: Only needed if Unreal or Skyrim are not in their default folders: set "UE_ROOT=C:\Program Files\Epic Games\UE_5.9" set "DK_GAME_DATA=C:\Program Files (x86)\Steam\steamapps\common\Skyrim Special Edition\Data" :: Optional: skip heavy script Blueprint generation and use the lighter C++ script VM instead: :: set "DK_MAKE=0" :: set "DK_SCRIPTS=vm" :: Optional overrides: :: set "DK_LOAD_ORDER=C:\path\to\Plugins.txt" :: set "DK_WINPOS=-WinX=0 -WinY=0" :: set "DK_EDITOR_DISPLAY=DISPLAY2" (moves the editor window to that screen) :: Note: if a lab copy exists at test-data\Skyrim\plugins.txt, it is used as the load order unless DK_LOAD_ORDER is set. Edit.bat play ``` | Command | What it does | |---|---| | `Edit.bat` | Builds the C++ module and opens the Unreal Editor | | `Edit.bat play` | Builds script Blueprints if needed, then launches the game window (`1920x1080`) | | `Edit.bat fly` | Opens the Helgen intro (`MQ101`) with the free camera (`F7` = slow-mo fly cam, `F8` = normal) | | `Edit.bat test` | Runs a fixed-60 FPS deterministic test pass and prints `Saved\test_result.txt` | > [!TIP] > **First `Edit.bat play` takes a while — that is normal.** On the first run, it compiles C++, builds script Blueprints before opening the window (check `Saved\Logs\make_blueprints.log`), and compiles Unreal shaders. Later runs only rebuild stale Blueprints; set `DK_MAKE=0` to skip that step. --- ## Controls | Mode / Key | What it does | |---|---| | `Edit.bat play` | Launches normal play mode in `1920x1080` | | `Edit.bat fly` | Opens Helgen (`MQ101`) in free-camera fly mode | | `F7` | Slow-motion fly camera (in `Edit.bat fly`) | | `F8` | Normal speed (in `Edit.bat fly`) | --- ## Troubleshooting - **First `Edit.bat play` takes a while:** The first run builds script Blueprints before opening the window (check `Saved\Logs\make_blueprints.log`) and compiles Unreal shaders. Later runs only rebuild stale Blueprints; set `DK_MAKE=0` to skip that step. - **"BUILD FAILED" from `Edit.bat`** (it runs Unreal's own `Build.bat`): Make sure `UE_ROOT` points to your `UE_5.9` folder and Visual Studio has the **Game development with C++** workload installed. - **Missing load order / empty world:** Launch the real game once so `Plugins.txt` is generated, or set `DK_GAME_DATA` and `DK_LOAD_ORDER` explicitly. - **Black screen or crash on startup:** Confirm your GPU supports DirectX 12 hardware ray tracing (Lumen is enabled in `Config\DefaultEngine.ini`). --- ## Developer and Technical Details
Project layout, environment knobs (DK_*), and ponytail comments ### Project layout | Where | What | |---|---| | `Source\DovahKin\` | All the C++, one Unreal module. File readers (`GameFiles`, `NifFile`, `HavokFile`, `PexFile`, `SwfFile`) and the world that plays (`Dovah*.cpp`). | | `Content\DovahKin\` | Our own base materials and logo. No game data. | | `Mods\UE5Settings\` | Our small renderer plugin (`RendererBridge`: loads FSR and other add-ons you install yourself; the settings page that drives it is in `Source\DovahKin\Settings.cpp`). The downloaded vendor files are not in git. | | `xedit\` | Our xEdit scripts that export "right answers" from the real game files, used by the checks. Their runner scripts are local and not in this repo. | | `Edit.bat` | Builds, then opens the editor or game window. | Env-var knobs start with `DK_` and are documented next to where they are read: mostly in `Source\DovahKin\Dovah*.cpp`, some in the readers and other files there (`Settings.cpp`, `PexFile.cpp`, `HavokFile.cpp`, `GameFiles.cpp`, `Procedures.cpp`, `Precipitation.cpp` and others). `DK_WINPOS`, `DK_MAKE` and `DK_EDITOR_DISPLAY` are read by `Edit.bat`. Comments that start with `ponytail:` mark a known shortcut: they say what was kept simple, its limit, and when to replace it.
Reader checks (DumpRefs) and real-game comparison (optional dev tools) ### Reader checks (`DumpRefs`) `UnrealEditor-Cmd.exe DovahKin.uproject -run=DumpRefs ...` runs headless reader checks that compare our readers against xEdit exports (the option list is at the top of `Source\DovahKin\DumpRefsParts.h`). The lab folder (`test-data\`) holds local game file copies and is excluded by `.gitignore`. | Tool | What for | Where | |---|---|---| | xEdit (SSEEdit) | Runs the scripts in `xedit\` that export test baselines | github.com/TES5Edit/TES5Edit | | A lab folder | Local copies of your game files + xEdit exports (`-Lab=`) | — | ### Real-game comparison (optional) Same-spot compare (`DK_COMPARE`) drives a running Skyrim instance via DevBench on `127.0.0.1` (port knob `DK_DEVBENCH_PORT`): it moves the camera, sets hour/weather, hides actors, and reloads a save. | Tool | What for | Where | |---|---|---| | SKSE64 | Loads plugins into the real game | skse.silverlock.org | | Address Library for SKSE Plugins | Needed by most SKSE plugins | Nexus Mods | | DevBench (alandtse) | Lets a tool query the running game on `127.0.0.1` | its own page | | CrashLogger | Readable crash logs | Nexus Mods | **Extras the author uses, not needed to build or play:** 7-Zip, Blender and AssetRipper (looking at models and files), a private Python for the xEdit runner scripts (those runner scripts are not in this repo), Mod Organizer 2 (a mod list to test with), and the optional AMD FSR plugin and AMDNR add-on described in [`Mods\UE5Settings\README.md`](Mods/UE5Settings/README.md).
--- ## How It Was Made > [!NOTE] > **Accessibility & AI workflow:** I have major reading and writing disabilities, so **all text, documentation, notes, credits, and code in this repository are written with AI tools (Claude Code, Gemini, and earlier OpenAI GPT / Codex) regardless of use case, and are most often read back to me via text-to-speech**. AI summaries from project notes can be inaccurate, and AI has sometimes hallucinated fixes or cut corners instead of following instructions to pass tests. I am actively building automated porting and verification scripts/checkers (`DumpRefs`, `xedit\`, and real-game comparisons) so AI-written changes are verified automatically against real game data under human oversight. **Skyrim vs. New Vegas focus:** Skyrim (`DovahKin`) was built mostly via play-and-check testing and public documentation, so deeper work is largely waiting on further community decompilation of Skyrim. Fallout: New Vegas ([`DovaSins-NewVegas`](https://github.com/DovaSinS/DovaSins-NewVegas)) is currently the more active target for menus and gameplay systems because `fnv_decomp` makes reference lookup and automated testing much easier. The author is new to open source and to licences. The credits list was put together with AI help: the files were searched for other people's work and each source found was listed, and the author has read the list. It may still have gaps. If you find one, see [Licence & Credits](#licence-and-credits) below for how to report it. **Where the game rules come from.** From docs (UESP, Creation Kit wiki), from other open projects' notes (mostly OpenSky, also OpenMW and Mudcrab: see [CREDITS.md](CREDITS.md)), and from measuring the real game with test tools. Some OpenSky rules were found by OpenSky's own reading of the game exe. Some of those places say so in the code; others only say "OpenSky's reading", and some may not be marked. **What reads the game's exe, said openly.** - `FHkClasses::FromExe` (`HavokFile.cpp`) opens your own `SkyrimSE.exe` when the game starts, and in the DumpRefs Havok checks (`-Hkx` and others). It finds the one function that registers Havok classes by its code pattern, scans the exe's code for every call to it, and decodes the instructions that set up each call. That recovers the class table: each class's name, parent and size; each member's name, type, sub-type, flags, byte offset, the class it points to and its fixed array size; and the enums (item names and values). That is reading machine code, not only a data table. DovahKin needs those layouts to read the game's animation and behaviour files. Nothing this function reads is stored in this repo or shipped: it is read on your PC, from your copy, each run. It recovers data layouts, not game logic. Without the exe next to the Data folder, actors stand still. - Copied by hand from the exe and kept in the code (no exe code): a small number of Havok enum values (flag bits and mode numbers, marked "(exe enum)" in the code), and a few names and file paths from its text strings (menu function names, a menu model path, ini setting names, skeleton and behaviour paths). --- ## Licence and Credits GPL-3.0-or-later, see [LICENSE](LICENSE), with an added permission to combine it with Unreal Engine, see [NOTICE.md](NOTICE.md). Other people's work that DovahKin reads or learns from is listed in [CREDITS.md](CREDITS.md); licence texts that must travel with borrowed code are in [NOTICE.md](NOTICE.md). **What the licence covers.** GPL-3 covers only our own code and files in this repo, except the parts listed in [NOTICE.md](NOTICE.md), which keep their own licences (BSD-3 for the NifSkope parts, MIT for the Community Shaders maths, MPL-2.0 for the xEdit name tables). Everything else stays with its owners, under their own terms: - Skyrim: its files, names, story and game logic belong to its owners. None of the game's files are in this repo. The code does use names the game defines (record, script, menu and setting names) and, as backups when a plugin lacks a game setting, the game's own short labels and word pieces (for example "Weapons", "added"); longer messages are our own wording. - Unreal Engine belongs to Epic Games, under Epic's licence. - Other people's projects named in [CREDITS.md](CREDITS.md) keep their own licences. **Think something here is taken, or lacks the right permission?** Open an issue on this repo. Name the exact file and line here, and the code or resource you think it comes from (a link helps). I will look at it and, if needed, contact its author. Removal requests are reviewed when they come from the rights holder or someone who acts for them, with proof. Reports without a file, line or source cannot be checked and will be closed. Skyrim and The Elder Scrolls are trademarks of their owners. This project is not made or backed by them.