How does the VFS handle the order in which UI files are added in by mods?

Jiska

Warlord
Joined
Apr 23, 2016
Messages
164
I thought it was super simple, and if two mods had the same file, e.g. SocialPolicyPopup.xml/lua, then whichever was loaded last overwrote the first one, and that was the one that was used. So if you had two mods and you wanted to use the same file in both, you referenced one in the other and referencing mod had priority.

But, after some testing, it seems it doesn't work that way. So, what are the rules? How do I make a compatibility mod for one of my mods and another mod that will consistently load its files rather than the ones that it's trying to make compatible?

thank
 
Last edited:
It's sooooo long since I looked at this …

Mods are loaded alphabetically - A first z last. Dependencies are used by the Mod UI screen to make sure you can't enable a dependant mod without the base mod present, and also if you disable the base mod, it will automatically disable the dependant mod(s). IIRC dependencies and references are also used by the loader to determine the order database updates are executed.

PS. Nothing in Civ 5 modding is ever "super simple" ;)
 
dependencies and references are also used by the loader to determine the order database updates are executed

but not the order mods are loaded into the VFS? Does that mean I have to rename my mod so that it comes alphabetically after the mod I want it to reference, or do I have to tell users to delete the conflicting file in the mod I want to reference?
 
Last edited:
IIRC (and it is a very long time since I investigate this, but the results are on these forums somewhere and also your observations agree with my bad memory) the VFS is loaded alphabetically
 
Thanks whoward! Since I think you'll probably read this, I just want to say that I've had a passion for modding games since childhood (8-10), and I've been a hobby programmer ever since then, but it's only in the last few years that I've really developed my skills, mostly in the ciV lua environment. It really wouldn't have been possible without your incredibly helpful tutorials and the numerous answers you (and other users, LeeS especially) have provided on these forums. Thanks again!

...and if you want to give me some feedback on my magnum opus: https://steamcommunity.com/sharedfiles/filedetails/?id=1737956594 , that would probably make me curl my toes with joy.
 
Back
Top Bottom