Story Compilation Error DOS2: All 8 Fixes for Divinity: Original Sin 2

The story compilation error DOS2 appears when Divinity: Original Sin 2 cannot build a Story file. The game fails to process your active mods properly.

This error produces three different message variants. Consequently, it can permanently wipe your journals. Different scenarios require different solutions. All verified fixes exist in this guide.

WARNING: Do not save your game while the story compilation error is active. Saving over an existing file during this error will permanently wipe your in-game journals. They cannot be recovered after you overwrite the save. Therefore, close the game immediately without saving. Next, use an earlier autosave as your starting point for troubleshooting.

Also on Axeetech: Sibelius Error 40207

Story compilation error DOS2 Divinity Original Sin 2 fix guide
Complete fix guide for the DOS2 story compilation error in Divinity: Original Sin 2 Definitive Edition

What Is the Story Compilation Error DOS2?

The story compilation error happens during the initial startup phase. Initially, the game runs the Osiris compiler to build a Story file. If any mod contains errors, the compiler fails immediately.

This issue is not a graphics error or hardware problem. It is specifically a mod scripting failure instead. The Osiris compiler detected an unresolvable issue and reported it reliably.

The error produces three different on-screen messages constantly. All variants stem from the exact same class of failure. Therefore, understanding your specific message helps identify the cause quickly.

One confirmed side effect involves extra characters appearing in your party. Consequently, the game spawns placeholder characters from failed mod scripts. This remains a direct symptom of an active compilation error.

Also Read: app_w351_csidevice0down Error Code Fixed

DOS2 Story Compilation Error: All Three Message Variants

Error MessageWhen It AppearsPrimary Cause
“STOP! A Story Compilation Error occurred with your active mods. You may be missing mod dependencies. Mods will not work correctly!”On loading screen when launching with modsMissing mod dependency or Script Extender not installed correctly
“We were unable to create a working Story. Your add-on setup might be invalid. The game will continue with the story from the main adventure.”On loading screen or when starting new gameMod with non-compiling code or outdated mod conflicting with patch
“WARNING: The files of mod ‘Divinity: Original Sin 2’ and/or its dependencies are invalid. This can be caused by corrupt files…”On multiplayer session loadCorrupt game files or mismatched mod versions between players

What Causes the DOS2 Story Compilation Error?

The story compilation error has six confirmed causes. Identifying your specific cause saves significant troubleshooting time. Therefore, review these causes before attempting any complex fixes.

The most common cause is a missing Script Extender. Alternatively, players install the Script Extender in the wrong folder. Consequently, every dependent mod fails to compile without it.

Less obvious causes include leftover files from uninstalled mods. Additionally, Windows usernames containing special characters break the folder path entirely. Finally, mismatched mod versions between co-op players trigger this error immediately.

DOS2 Story Compilation Error: Confirmed Causes

CauseWho It AffectsError Message ProducedLikelihood
Script Extender missing or installed in wrong directoryAnyone using mods requiring SESTOP! Missing mod dependenciesVery Common
Outdated mod conflicting with current game patchAnyone with workshop modsWe were unable to create working StoryVery Common
Leftover .pak files from previously uninstalled modsAnyone who has ever used modsWe were unable to create working StoryCommon
Mod code with Osiris scripting errorAnyone using third-party modsWe were unable to create working StoryCommon
Windows username containing special charactersPlayers with accented PC usernamesAny variantLess Common
Mismatched mod versions between co-op playersMultiplayer co-op playersDependencies invalid warningCommon in co-op
Gift Bag conflictsVanilla players using Gift BagsWe were unable to create working StoryCommon on vanilla

Fix by Scenario: Which Situation Are You In?

The correct fix path depends heavily on your mod setup. Players with mods have completely different causes than vanilla players. Choosing the wrong fix path wastes your time entirely.

You might play with mods and see the error suddenly. If you just subscribed to a new mod, that is the cause. Alternatively, an outdated mod became incompatible with a new patch.

You might play with absolutely no external mods installed. In this case, conflicting Gift Bags usually cause the issue. Furthermore, corrupt game files can trigger the exact same error.

Also Read: USA Staffing has encountered an error

Which Fix Path to Use: DOS2 Story Compilation Error

Your SituationMost Likely CauseStart With
Using mods + STOP error on new gameMissing Script Extender or wrong SE install pathFix 1, then Fix 2
Using mods + error after game updateOutdated mod conflicting with new patchFix 3, then Fix 1
Using mods + error on existing saveLeftover files from uninstalled modFix 4, then Fix 3
No mods (vanilla/Gift Bags only) + errorConflicting Gift Bags or corrupt game filesFix 5, then Fix 6
Multiplayer + Dependencies Invalid warningMismatched mod versions between playersFix 7
Error on clean install (never used mods)Corrupted game files or Windows usernameFix 6, then Fix 8

Fix 1: Install or Reinstall Norbyte’s Script Extender Correctly

Norbyte’s Script Extender is required by many DOS2 mods. Consequently, these mods fail to compile without the extender installed. This specific failure produces the STOP error on your screen.

DXGI.dll correct install path DefEd bin folder DOS2 Script Extender
The Script Extender DXGI.dll must go in DefEd\bin — not the main bin folder

The most common mistake involves the DXGI.dll file placement. Players often extract it into the main bin folder incorrectly. Instead, the Script Extender must go in the DefEd subfolder.

Once correctly installed, the Script Extender auto-updates on launch. Therefore, you do not need to manually download new versions. The Script Extender version must always match the game version.

You must verify the Script Extender works after installation. Launch the game and watch the initial loading screen closely. You should see the version number displayed at the top.

  1. Download the Script Extender from Norbyte’s GitHub releases page.
  2. Extract the downloaded .zip file to your desktop temporarily.
  3. Locate your DOS2 installation folder via Steam local files.
  4. Open the DefEd subfolder carefully.
  5. Open the bin subfolder inside the DefEd folder.
  6. Place the DXGI.dll file inside this specific DefEd bin folder.
  7. Launch DOS2 and watch the loading screen very closely.
  8. Verify the Script Extender version number appears clearly.
  9. Relaunch the game and test for the compilation error.

IMAGE 2

CRITICAL PATH: The DXGI.dll file must go in the DefEd bin folder. Do not place it in the main bin folder. Placing it in the main bin folder causes a silent failure.

Fix 2: Find and Remove the Conflicting Mod

You must identify the specific broken mod next. First, disable half of your active mods and test the game. Next, narrow down which half contains the broken code.

Outdated mods cause most errors after a game patch. Consequently, mods overriding vanilla scripts break during the update. Always check the Steam Workshop page for recent author updates.

After identifying the broken mod, you must remove it twice. First, remove it from the in-game mod list entirely. Second, delete its .pak file from your Documents folder directly.

  1. Open the main menu in DOS2 and select Mods.
  2. Disable all mods except the base game files.
  3. Start a new game and check the loading screen.
  4. If gone, re-enable mods in batches of half.
  5. Test the game again after each newly enabled batch.
  6. Identify the exact batch where the error finally returns.
  7. Enable mods one at a time from that bad batch.
  8. Unsubscribe from the broken mod in Steam Workshop immediately.
  9. Manually delete its .pak file from your Documents folder.
  10. Restart the game and verify the error is completely resolved.

TWO-LOCATION DELETE RULE: Unsubscribing from a mod in Steam is not enough. It does not remove the .pak file from your Documents folder. You must manually delete the file from that specific folder. Leaving orphaned files causes bugs similar to what requires learninghow to fix the PR_END_OF_FILE errorin browsers.

Fix 3: Update Outdated Mods After a Game Patch

Larian releases DOS2 patches and updates occasionally. Consequently, abandoned mods become incompatible with the new game version. The story compilation error then appears on your next launch.

Sometimes, no update exists for a conflicting mod. First, disable the mod and wait for an official update. Alternatively, use Steam’s Beta branch to run an older version.

  1. Open Steam and navigate to your Workshop subscriptions.
  2. Sort by last updated and identify old mods quickly.
  3. Check each suspect mod’s page for patch compatibility notes.
  4. Click Subscribe on the updated version if it exists.
  5. Delete the old .pak file from your Documents folder.
  6. Relaunch DOS2 and check the loading screen version actively.
  7. Test the game for the story compilation error again.

Fix 4: Clear Orphaned Mod Files from Documents Folder

DOS2 copies a .pak file to Documents upon installation. Uninstalling a mod through Steam does not remove this automatically. Consequently, orphaned .pak files accumulate and cause compilation errors constantly.

DOS2 mods folder Documents Larian Studios Divinity Original Sin 2 location
Orphaned .pak files in the Documents\Larian Studios\Mods folder cause story compilation errors even after unsubscribing from mods

Clearing orphaned files requires checking your Documents folder manually. Carefully identify any .pak file that lacks an active mod. Subsequently, delete every unmatched file from the folder entirely.

Always back up your save files before clearing the folder. Managing your saves safely is crucial. It mimics finding Stellar Blade save file locations on PC to prevent data loss.

  1. Back up your saves to a separate folder initially.
  2. Navigate to your Documents Larian Studios DOS2 Mods folder.
  3. Compare every .pak file against your active mod list.
  4. Delete every .pak file lacking an active mod counterpart.
  5. Check and clear the Public folder within Documents additionally.
  6. Restart DOS2 and check if the error is resolved.

IMAGE 3

Fix 5: Fix the Gift Bag Conflict (Vanilla / No Mods)

Players using no external mods still encounter this error. Larian’s built-in Gift Bags trigger the exact same compilation failures. Consequently, some Gift Bags conflict with each other directly.

The Hagglers Gift Bag causes story issues on the current patch. Furthermore, the Inventory Sorter remains unstable on Definitive Edition. Disabling these specific Gift Bags resolves the error for most players.

Disabling a Gift Bag mid-playthrough affects your existing saves. Therefore, start a brand new game after changing Gift Bag settings. Afterwards, you can attempt to continue your existing save file.

  1. Select Story Mode directly from the main menu.
  2. Select Gift Bags before creating a new game.
  3. Review your active selections carefully and methodically.
  4. Disable Hagglers and Inventory Sorter first.
  5. Start a new game and check for the error.
  6. If the error persists, disable all Gift Bags entirely.
  7. If resolved, re-enable Gift Bags individually to find the culprit.

Fix 6: Perform a True Clean Reinstall

A standard Steam uninstall does not fully clean DOS2. It leaves behind non-vanilla files in the game folder. Consequently, previously installed mod files persist through standard Steam reinstalls.

A true clean reinstall requires manual deletion of folders. First, delete the main game folder from Steam entirely. Next, delete the Larian Studios folder located securely in Documents.

Deleting the Documents folder resets corrupted settings files successfully. Deep cleaning prevents lingering issues like Roblox error codes. Therefore, this process remains the most thorough reset available.

  1. Back up your PlayerProfiles folder to a safe location.
  2. Uninstall DOS2 completely through your Steam client menu.
  3. Navigate to your Steam common folder manually.
  4. Delete the Divinity Original Sin 2 folder completely.
  5. Navigate to your system’s Documents folder next.
  6. Delete the entire Larian Studios folder cleanly.
  7. Reinstall DOS2 through Steam normally.
  8. Launch the game once without any mods installed.
  9. Test for the error before re-adding any modifications.

IMPORTANT DELETION RULE: A Steam uninstall is not a clean reinstall. Steam only removes vanilla files. You must manually delete the entire game folder after uninstalling. This fix mirrors the deep cleaning required for how to fix Ubisoft error Dolphin-028.

Fix 7: Sync Mod Versions in Multiplayer

Every co-op player must run identical mod versions. A minor version mismatch triggers the error instantly for everyone. Consequently, the compilation error blocks all players in the session.

You must verify mod versions manually through the main menu. Compare the specific version numbers with all co-op partners carefully. Finally, update any mismatched mods before loading a shared session.

  1. Ask each player to open the in-game Mods menu.
  2. Hover over each active mod to reveal its version number.
  3. Note down the exact version of every active mod.
  4. Compare these lists with all co-op players involved.
  5. Any player with a different version must update immediately.
  6. Ensure all players subscribe to the newest updates.
  7. Relaunch DOS2 and test the multiplayer session again.

Fix 8: Rename Windows Username Containing Special Characters

Your Windows username might contain special characters or accents. If so, DOS2 cannot correctly read your file path. Consequently, this produces a compilation error with zero mods installed.

The fix requires creating a new Windows user account safely. This prevents path bugs like the State of Play store glitch error CE-107938-8. Finally, launch DOS2 from the new ASCII-only account safely.

  1. Open Windows Settings and navigate to Accounts.
  2. Click on the Family & Other Users tab specifically.
  3. Add a new local account to your PC securely.
  4. Use only standard ASCII characters in the new username.
  5. Log in to this new Windows account carefully.
  6. Copy your save files to the new Documents folder.
  7. Launch DOS2 and test for the compilation error.

How to Read the Osiris Error Log

Norbyte’s Script Extender writes detailed compilation logs automatically. Reading these logs shows exactly which mod caused the failure. Additionally, it highlights the exact line of failing code.

These logs are stored in your Documents folder by default. Look specifically inside the OsirisLogs directory for these text files. Furthermore, they are named accurately after the specific game session.

Look for lines containing ERROR or FATAL inside the log. These lines identify the specific mod filename very clearly. Consequently, you can easily target that exact file for removal.

  1. Close DOS2 completely before starting the process.
  2. Navigate to your Documents folder and find OsirisLogs.
  3. Open the most recent log file using Notepad.
  4. Search for the words ERROR or FATAL directly.
  5. Read the error line to find the failing mod file.
  6. Note the exact mod filename from that text line.
  7. Locate that .pak file in your DOS2 Mods folder.
  8. Remove that specific mod and retest the game.

LOG LOCATION: The log is found in your Documents under OsirisLogs. This log shows exactly which mod caused the compilation failure. Reading it is much faster than manually disabling mods individually. Look for lines containing ERROR or FATAL specifically.

DOS2 Story Compilation Error Symptoms Reference Table

The story compilation error does not always display a popup. Several in-game symptoms signal an active compilation error silently. Therefore, watching for these symptoms prevents long-term save damage.

The most distinctive symptom involves extra characters in your party. Consequently, players often see four or six unnamed characters appearing. This signals a severe script compilation failure immediately.

Missing journal entries represent the most dangerous symptom possible. If you save during an error, journal data is overwritten permanently. Furthermore, this damage cannot be reversed on that specific save.

Symptoms and What They Mean

SymptomWhat It MeansIs It Reversible?
STOP! popup on loading screenActive compilation error: mods did not compileYes: fix the mod issue and relaunch
Extra unnamed characters in partyStory file compiled with errors: placeholders spawnedYes: resolves after fixing compilation error
Journals blank or entries missingSaved while error was active: data overwrittenNo: use an earlier autosave
Mods appearing enabled but not workingMods loaded without compiling correctlyYes: fix compilation error and relaunch
Game continues but mod abilities absentPartial compilation failure: some scripts executedYes: fix compilation error

Frequently Asked Questions

The questions below address common points of confusion completely. These answers originate from confirmed Steam community thread solutions exclusively. Furthermore, they source from Larian Studios forums and Nexus Mods.

Will the story compilation error delete my save files?

No. The error itself does not delete the saves directly. However, saving during an active error overwrites your journals permanently. Always use an autosave from before the error appeared.

Can I get the story compilation error without any mods?

Yes. Vanilla players using Gift Bags can trigger this error. The Hagglers and Inventory Sorter bags cause the most issues. Disabling them resolves the error for most vanilla players.

Where exactly does DXGI.dll go for the Script Extender?

The file must reside in the DefEd bin folder. Do not place it in the main root bin folder. Placing it wrong causes the Extender to fail silently.

Why does the error appear after a game update?

Game updates change vanilla scripts that your mods override. Consequently, a mod referencing an old script creates a conflict. Updating or disabling the outdated mod resolves this completely.

Can I recover journals that were wiped by the error?

No. Saving over a corrupted session permanently wipes journal data. That specific data cannot be recovered from the affected save file. Therefore, you must restore a backup autosave immediately.

Does the story compilation error affect achievements?

No. Achievements track from your account data directly. They do not track from the compiled Story file at all. Therefore, the compilation error only affects mod functionality natively.

Leave a Reply

Your email address will not be published. Required fields are marked *