Page 1 of 1

Show warning if 2 plugins contain the same script ID

Posted: 19 Aug 2018, 13:04
by Equinox
If 2 or more plugins have a script with similar IDs.. only the script in the last loaded plugin will run in the game.

Currently, there is no way to determine this other than checking scripts in the CS, but this is a tedious process when you have lots of mods.

Another idea is to have a tool to verify conflicting plugins, maybe in the launcher but before the game starts. So the user dont have to check all plugins one by one.

Lastly, a more revolutionary solution is to make the game run the scripts independent of plugins. For example, a script from plugin A will not affect a script from plugin B, UNLESS both mods are dependent on each other. For example, plugin A is a patch for plugin B, or vice versa.

In my opinion, displaying a warning to the user would be enough..

Re: Show warning if 2 plugins contain the same script ID

Posted: 20 Aug 2018, 11:21
by Zini
Having two plugins with the same script ID is completely valid. Plugin A might want to modify the script in Plugin B. Also, the post-1.0 namespace feature will take care of this problem anyway.

Re: Show warning if 2 plugins contain the same script ID

Posted: 20 Aug 2018, 13:21
by Equinox
Zini wrote:
20 Aug 2018, 11:21
Having two plugins with the same script ID is completely valid. Plugin A might want to modify the script in Plugin B. Also, the post-1.0 namespace feature will take care of this problem anyway.
It is valid, but only one of the script will run.. So there is a chance that some mods wouldnt work.

Re: Show warning if 2 plugins contain the same script ID

Posted: 20 Aug 2018, 23:58
by Chris
Equinox wrote:
20 Aug 2018, 13:21
It is valid, but only one of the script will run..
That's the point. If a script has the same name as another, the intention is to overwrite it rather than run side-by-side. That's how mods work, but overwriting records with replacements that do something different.

Re: Show warning if 2 plugins contain the same script ID

Posted: 21 Aug 2018, 02:40
by Equinox
So if two mods.. that have completely different purposes, coincidentally have same script IDs, loaded together into the game.. we can forget about the other mod from functioning properly?

Re: Show warning if 2 plugins contain the same script ID

Posted: 21 Aug 2018, 05:56
by Ravenwing
Like Chris said, that's the whole point of mods - overwriting already existing stuff. If this feature existed the signal to noise ratio would be extremely low because so many scripts that overwrite other scripts are meant to being doing that. I only see two scenarios where this would even come into play:

1) lazy naming by the mod author. e.g. my_first_script
This is something we can't hope to control. Many mod authors have their own scheme for naming IDs that help differential their content from the rest.

2) the small, but finite chance that this happens accidentally among well named scripts.


With all that being said, I think it might be nice to have a tool within OpenMW-CS for mod authors and savvy users to check compatibility with other mods/mod lists, of which script IDs would be one type of data checked. Are there not any tools that do this already? I recall you not wanting a bunch of functions like this added willy-nilly to the editor, Zini. Perhaps this would be a good candidate for an editor plugin eventually? As you say though, the namespace solution essentially eliminates this problem.

Re: Show warning if 2 plugins contain the same script ID

Posted: 21 Aug 2018, 09:50
by kuyondo
I agree the possibility of script names clashing is very low, almost none out of my entire 10 years of modding and playing. But we still cant rule out the possibility.

Re: Show warning if 2 plugins contain the same script ID

Posted: 21 Aug 2018, 13:35
by Zini
As I wrote before, that problem will go away after 1.0 with the introduction of namespaces. It would be only relevant to legacy content then. And indeed script ID clashes almost never happen anyway. Therefore this feature would have very little use.

An editor plugin is unlike to be an option, since depending on the the exact content file configuration one of the scripts may be eliminated during loading. I don't see us providing a plugin API that allows hooking into the load process.