Common Pitfalls
Recurring issues across all modding topics, compiled from community experience:
-
Uppercase filenames – MD scripts in
md/must be lowercase. X4 silently ignores files that do not match expected casing. On Linux, all paths are case-sensitive. -
Full file replacement instead of diff patching – breaks on every game update and conflicts with other mods. Always use
<diff>patches for library files. -
Missing index registration – the number one reason new content “does not exist.” Every new macro needs
index/macros.xml; every new component needsindex/components.xml. -
Forgetting
"escaping in XPath – attribute values in diff patchselXPath must use"for quotes:sel="//ware[@id="energycells"]". -
Line breaks in content.xml – use
in description text, not\n. -
Silent diff patch failures – if a
selXPath does not match, X4 logs a warning but otherwise silently skips. Enable-debug allto see these. Usex4cat validate-diffto catch them before shipping. -
Version field is an integer –
version="100"means version 1.00. Multiply by 100. -
Game updates break things – diff patches are more resilient than replacements, but any mod can break on major updates. Consider locking game versions for stable mod lists.
-
Ware IDs must be lowercase – uppercase characters in ware IDs cause problems on case-sensitive filesystems.
-
Mod placement – mods can go in two locations:
- Game directory:
<X4 install>/extensions/ - User documents:
Documents/Egosoft/X4/extensions/ - Some features (like
substcatalogs) only work from the game directory.
- Game directory: