Community Patch - Shared Imports
witcher-3 — Mods & Enhancements
This is a foundational mod that exports all shared class definitions, enums, and global variables from the game's script files into a single, clean package — without adding any gameplay changes. It acts as a dependency for dozens of other mods (e.g., 'W3EE', 'Ghost Mode', 'Enhanced Targeting') to call these same classes without duplicating code, dramatically reducing merge conflicts and script compile errors. Players install it as a mandatory prerequisite when running multiple script-heavy mods that would otherwise overwrite each other's class definitions.
📦 Full mod page on discovermods
Downloads, ratings, compatibility info, installation guides, and user reviews.
View on discovermods →Syntax
Utilities
Example
Downloads: 802,767 | Endorsements: 16,236
💡 Notes
By rmemr | vv0.6 | 16,236 endorsements
🎯 Tips & Tricks
Open the 'mods/modSharedImports/content/scripts' folder and verify the file 'sharedImports.ws' exists. If a mod like 'W3EE' says 'Requires Shared Imports v1.2+', ensure your version is newer — compare the 'version' line in the mod's 'meta.xml' file.
In Vortex, set the load order so this mod is ABOVE all other script mods (e.g., 'W3EE', 'Enhanced Targeting'). In the mods.settings file, add this line under '[modSharedImports]': 'Priority=0' to force it to load before everything else, preventing class redefinition errors.
When using Script Merger, if you see 'Duplicate class definition' errors, delete the duplicate classes from the conflicting mod's 'scripts' folder and leave only the ones in Shared Imports. Then in Script Merger, select 'Use Shared Imports' for those classes — this resolves 90% of merge failures.
🔧 Troubleshooting
Game crashes on startup with 'Invalid class' error when using 'W3EE' and 'Ghost Mode' together, because both define their own 'playerWitcher' class.
Remove the 'playerWitcher.ws' file from both mods' script folders. Then download the 'Shared Imports W3EE Patch' from Nexus, which re-adds a unified 'playerWitcher' class that references Shared Imports' base definitions. Place this patch AFTER both mods in load order.
Script Merger keeps failing to merge 'sharedImports.ws' with 'Enhanced Targeting' because both modify the 'targetingSystem' class.
Open Script Merger, select the conflict between the two, and choose 'Use file from Shared Imports' for the 'targetingSystem' class. Then manually edit 'enhancedTargeting.ws' to replace its 'targetingSystem' class with a call to 'sharedImports.targetingSystem' — this avoids duplication.
⚠️ Common Mistakes
- Players often install this mod but forget to uninstall older versions of 'Community Base' mods, which still contain duplicate class definitions — this causes hidden conflicts that only appear after 10+ hours of gameplay when a script fires.
- A common error is placing this mod in the 'Optional' folder of a mod manager, which disables it from loading — then other mods fail to compile, and the user blames the wrong mod instead of checking that Shared Imports is actually active.
👍 Pros
- 16,236 endorsements
- 802,767 downloads
- Category: Utilities
👎 Cons
- Requires mod manager installation
- May conflict with similar mods