If I set an optional dependency in my mod, will that cause my mod to be loaded after the dependency if the dependency is found to be present?
I'm trying to figure out a way to add support for other mods to some of my mods but some of those mods will get loaded after mine based on what little I know about mod load order.
Thank you!
Optional dependancies
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 15
- Joined: Thu, 23. Mar 23, 21:23
Optional dependancies
AKA Toazd on Nexus mods and Steam
-
- Posts: 134
- Joined: Sat, 3. Jul 10, 23:23
Re: Optional dependancies
That is correct.wmcdannell wrote: ↑Mon, 24. Apr 23, 17:42 If I set an optional dependency in my mod, will that cause my mod to be loaded after the dependency if the dependency is found to be present?
-
- Posts: 15
- Joined: Thu, 23. Mar 23, 21:23
Re: Optional dependancies
Excellent. That is exactly what I want. Thank you!sprIder wrote: ↑Mon, 24. Apr 23, 18:04That is correct.wmcdannell wrote: ↑Mon, 24. Apr 23, 17:42 If I set an optional dependency in my mod, will that cause my mod to be loaded after the dependency if the dependency is found to be present?
AKA Toazd on Nexus mods and Steam
-
- Posts: 1637
- Joined: Wed, 15. Nov 06, 10:21
Re: Optional dependancies
There is also the 'optional' tag. If I understand correctly, setting to false is needed in case a mod requires another otherwise can't be used. For instance I set my xrsge dependant and optional 'false' from my other stars mod because the latter contains all the new materials used by it. But if you just wish to make a mod load after another that changes the same stuff, but they don't share resources, than optional can be set on 'true'.
-
- Posts: 15
- Joined: Thu, 23. Mar 23, 21:23
Re: Optional dependancies
Thank you! That's what we're discussing, I think.Realspace wrote: ↑Tue, 25. Apr 23, 14:52 There is also the 'optional' tag. If I understand correctly, setting to false is needed in case a mod requires another otherwise can't be used. For instance I set my xrsge dependant and optional 'false' from my other stars mod because the latter contains all the new materials used by it. But if you just wish to make a mod load after another that changes the same stuff, but they don't share resources, than optional can be set on 'true'.
Here's an example from one of my mods content.xml that modifies another mod and the DLC if they are present (and if any or all of them are found I want to ensure that my mod loads after them):
Code: Select all
<dependency id="ego_dlc_boron" optional="true" name="Kingdom End"/>
<dependency id="ego_dlc_pirate" optional="true" name="Tides of Avarice"/>
<dependency id="ego_dlc_split" optional="true" name="Split Vendetta"/>
<dependency id="ego_dlc_terran" optional="true" name="Cradle of Humanity"/>
<dependency id="recycleshipsandstations" optional="true" name="RecycleShipsAndStations"/>
AKA Toazd on Nexus mods and Steam
-
- Posts: 1637
- Joined: Wed, 15. Nov 06, 10:21
Re: Optional dependancies
I'd set the dependency from dlc as optional="false" because their resources are needed. But I suppose it won't make any difference. I tried making a dlc dependent from my mod (because it is an overhaul) but this option is not allowed by the engine. So I suppose that the dlcs are always loaded first. They can have dependency from each other thou, as the boron dlc does.