What is the load order of mods?

The place to discuss scripting and game modifications for X4: Foundations.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

Post Reply
Lord-Herek
Posts: 14
Joined: Fri, 23. Jul 21, 20:20

What is the load order of mods?

Post by Lord-Herek » Sat, 24. Jul 21, 09:06

Hi,

I want to create a mod that makes all Terrans White and all Argons Asians.

I kinda know what I have to do to achieve that but I'm not sure about the load order of mods and DLCs. I know I have to modify character_macros.xml, but the problem is, both the base game and the DLCs have their own character_macros.xml file. As I understand it, each character_macros.xml version gets merged at some point when the game is loading.

So, If I create a mod that modifies character_macros.xml, is it gonna be loaded after base game and DLCs character_macros.xml files get merged?

user1679
Posts: 789
Joined: Fri, 20. Jul 18, 23:20

Re: What is the load order of mods?

Post by user1679 » Sat, 24. Jul 21, 10:39

Load order is based on the folder name for all mods installed in the same location (documents or game's extensions folder) unless you use the "dependency" tag in your "content.xml". This tag will force your mod to at least load after the tagged mod.

Example (content.xml)

<dependency id="ego_dlc_split" optional="false" name="Split Vendetta"/>

This will load your mod after Split Vendetta. The optional="false" will also prevent the player from starting a game and warn them they have missing mods if the
mod listed under id= doesn't exist (you can get the name needed for id= from the mod's content.xml)

Another useful tag is "personal" which can be true (mod is in user's documents) or false (mod is in game's extensions folder)


Example (from content.xml of a mod in the game's extensions folder dependent on a mod in the user's documents):

<dependency id="a_mod_in_documents" optional="false" personal="true" name="Mod in documents"/>

Example (from content.xml of a mod in the user's documents folder dependent on a mod in the game's extensions folder):

<dependency id="a_mod_in_game_path" optional="false" personal="false" name="Mod in game path"/>

Post Reply

Return to “X4: Foundations - Scripts and Modding”