How are conflicts handled?

The place to discuss scripting and game modifications for X Rebirth.

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

Post Reply
Nelien
Posts: 3
Joined: Wed, 29. Dec 10, 22:54
x4

How are conflicts handled?

Post by Nelien » Fri, 22. Nov 13, 12:34

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

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Fri, 22. Nov 13, 13:15

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.
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 ;)

Nelien
Posts: 3
Joined: Wed, 29. Dec 10, 22:54
x4

Post by Nelien » Fri, 22. Nov 13, 13:48

I think you're right UniTrader, but what about load order? How is that defined?

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Fri, 22. Nov 13, 15:05

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 ;)

Nebogloee
Posts: 69
Joined: Sat, 18. Aug 07, 00:15
x3tc

Post by Nebogloee » Fri, 22. Nov 13, 23:12

I have noticed the order to be alphabetical. But consider this circumstantial and anecdotal at best.

wwdragon
Posts: 3746
Joined: Mon, 1. Oct 07, 02:18
x4

Post by wwdragon » Sat, 23. Nov 13, 00:03

I think the actual read order is by date created or modified.
Editing posts since long before I remember.

Tyrant597
Posts: 299
Joined: Wed, 9. Apr 08, 05:52
x4

Post by Tyrant597 » Sat, 23. Nov 13, 02:20

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

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sat, 23. Nov 13, 08:05

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...
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.)
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 ;)

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Re: How are conflicts handled?

Post by Observe » Sat, 23. Nov 13, 08:31

Nelien wrote:...Or if they use a menu system and use the same slot for their menu?
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!

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.

UniTrader
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 14571
Joined: Sun, 20. Nov 05, 22:45
x4

Post by UniTrader » Sat, 23. Nov 13, 08:48

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
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 ;)

User avatar
Observe
Posts: 5079
Joined: Fri, 30. Dec 05, 17:47
xr

Post by Observe » Sat, 23. Nov 13, 09:01

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.
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.

Post Reply

Return to “X Rebirth - Scripts and Modding”