How are conflicts handled?
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
How are conflicts handled?
With more and more mods coming along and mods getting more and more complex, conflicts are starting to crop up.
I understand that (if mods are done well) two mods can modify the same file and still work together (for example if two mods ADD stuff to the file or replace different things), but what if they both replace the same thing? Or if they use a menu system and use the same slot for their menu? Which mod takes precedence then?
Mods I've noticed are conflicting at the moment:
UpcloseDetailMonitor with NESA
UpcloseDetailMonitor with Shut UP!
Improved Fleets with Manual Command Extension
I understand that (if mods are done well) two mods can modify the same file and still work together (for example if two mods ADD stuff to the file or replace different things), but what if they both replace the same thing? Or if they use a menu system and use the same slot for their menu? Which mod takes precedence then?
Mods I've noticed are conflicting at the moment:
UpcloseDetailMonitor with NESA
UpcloseDetailMonitor with Shut UP!
Improved Fleets with Manual Command Extension
i think it depends on loading order and content of the diffs. example:
basic file:
<root>
.<foo>
..<bar id="1">some text</bar>
..<bar id="2">some other text</bar>
.</foo>
</root>
Diff 1:
<diff>
.<replace sel='/root/foo/bar[@id="1"]'>
..<bar id="3">a completely diffrent text</bar>
.</replace>
</diff>
Diff 2:
<diff>
.<replace sel='/root/foo/bar[@id="1"]'>
..<bar id="1">a diffrent text</bar>
.</replace>
</diff>
id diff 1 is loaded first Diff 2 would fail (not sure what happens then, but probably its irgnored) and the result would be:
<root>
.<foo>
..<bar id="3">a completely diffrent text</bar>
..<bar id="2">some other text</bar>
.</foo>
</root>
if diff 2 is loaded first and then diff 1 then the result would be the same, but without error since bar id="1" is replaced sucessfully in both cases.
many more combinations are possible. i think we need a <conflict>-Node in the Content-xml which works similiar to the <dependency> but does the opposite - prevent loading extension if the other is active instead of requiring them.
basic file:
<root>
.<foo>
..<bar id="1">some text</bar>
..<bar id="2">some other text</bar>
.</foo>
</root>
Diff 1:
<diff>
.<replace sel='/root/foo/bar[@id="1"]'>
..<bar id="3">a completely diffrent text</bar>
.</replace>
</diff>
Diff 2:
<diff>
.<replace sel='/root/foo/bar[@id="1"]'>
..<bar id="1">a diffrent text</bar>
.</replace>
</diff>
id diff 1 is loaded first Diff 2 would fail (not sure what happens then, but probably its irgnored) and the result would be:
<root>
.<foo>
..<bar id="3">a completely diffrent text</bar>
..<bar id="2">some other text</bar>
.</foo>
</root>
if diff 2 is loaded first and then diff 1 then the result would be the same, but without error since bar id="1" is replaced sucessfully in both cases.
many more combinations are possible. i think we need a <conflict>-Node in the Content-xml which works similiar to the <dependency> but does the opposite - prevent loading extension if the other is active instead of requiring them.
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
i would guess either alphabetical or a random order, like setups in X3
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
If we ever get to mod the UI, that won't be much of a problem anymore. =) The 'real' problem is this 'controller-friendly' UI...
You don't talks about X:Rebirth...
X4 Mods: Collect Inventory Wares Stations Supply Build Storage Mass Move Marines
X4 Mods: Collect Inventory Wares Stations Supply Build Storage Mass Move Marines
sure about that? for now we are maybe forced to use the few xmls calling up the menu for UI mods, but conflicts will probably arise in other cases, too (they dont even have to modify the same file/part in some cases, if an extension is based on some quirk in the Vanilla files without touching it and another removes that quirk the fist one will probably not work.. althoughh that case is unlikely, it is not out of question.)Tyrant597 wrote:If we ever get to mod the UI, that won't be much of a problem anymore. =) The 'real' problem is this 'controller-friendly' UI...
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Re: How are conflicts handled?
In the case of adding to the menu system, this is a serious problem! Currently, we have only 6 options in each menu. The main menu is already taken up, and the others very limited open "slots". Considering most of us have a keyboard, the 6-key limit is limiting indeed!Nelien wrote:...Or if they use a menu system and use the same slot for their menu?
For example, for my targeting extension mod, I replaced the "Modes" menu "Close" option to access my menu. This means there are no longer any slots open in that menu (Modes).
Hopefully we can find a better solution when we have greater access to the UI files.
we may have 6 slots there only, but at least we dont have to worry about assigning the same slot, because if no position is given the next free one will be used. not that big improvement, but good to keep in mind when hooking in some existing menu.
PS i would suggest merging this thread with my earlier opened thread about possible script conflicts and how to avoid them since both are about the same topic
PS i would suggest merging this thread with my earlier opened thread about possible script conflicts and how to avoid them since both are about the same topic
if not stated otherwise everything i post is licensed under WTFPL
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Ich mache keine S&M-Auftragsarbeiten, aber wenn es fragen gibt wie man etwas umsetzen kann helfe ich gerne weiter
I wont do Script&Mod Request work, but if there are questions how to do something i will GLaDly help
Except in the case of "Modes", there were no empty slot. The only thing I could do, was replace the "Close" option with one linking to my new menu.UniTrader wrote:we may have 6 slots there only, but at least we dont have to worry about assigning the same slot, because if no position is given the next free one will be used.