Here's what I've observed so far trying to get the Even Moar Units packs to work reliably for everyone;
1) The Even Moar Units mods depend on both the main Moar Units mod and 1 DLC. For example, Even Moar Units: Australia requires the
UpdateDatabase action for
both Moar Units
and the Australia DLC to execute before the Even Moar Units: Australia UpdateDatabase action.
2) It used to be enough simply to specify this in Dependencies:
<Dependencies>
<Mod id="E3F53C61-371C-440B-96CE-077D318B36C0" title="Australia"/>
<Mod id="8342b98d-80c7-4002-87bb-419646bd9b54" title="MOARUnits"/>
</Dependencies>
This no longer seems to affect mod load order in any way as far as I call tell. Dependencies only seems to control what mods activate what other mods in the set up screens.
3) DLCs appear to be treated identically to mods with regard to load order. It is not guaranteed that DLC database updates will run before Mod database updates.
4) The default load order seems to depend on the timestamp of the Mod/DLC folder. This means the Even Moar Units mods can work for people by accident if the timestamps of the DLCs and Moar Units folders are earlier than the Even Moar Units folders. If the folder timestamps of the DLCs or Moar Units happen to be later than the Even Moar Units packs the database updates will happen in an incorrect order and you won't be able to start a game. This is obviously not useful, but I mention it as it something that threw me off multiple times as I thought that everything was working for everybody in all cases when it wasn't.
The only reliable way I've found to enforce load order is to use the Load Order property. So I've ended up with this:
Code:
<UpdateDatabase id="MOAR_UpdateDatabase">
<Properties>
<LoadOrder>-1</LoadOrder>
</Properties>
<File>Data/MOAR_Units_Data.xml</File>
<File>Data/MOAR_Units_Data.sql</File>
</UpdateDatabase>
<UpdateDatabase id="MOAR_Australia_UpdateDatabase">
<Properties>
<LoadOrder>10</LoadOrder>
</Properties>
<File>Data/Even_MOAR_Units_Australia_Data.xml</File>
<File>Data/Even_MOAR_Units_Australia_Data.sql</File>
</UpdateDatabase>
So the Load Orders are now:
-1: Moar Units (could really be 0 as it can run in parallel with the DLC)
0: DLC (have the default Load Order)
10: All Even Moar Units mods
So basically if your mod depends on other mod's database updates you MUST specify a Load Order that is greater than it/them so that the code executes afterwards.
Edit: Also the Modding.log is really useful in confirming the execution order of database updates from DLC and Mods.