Logo Platform
logo amplifiers simplified

Mod conflict identification and reslotution

Reply
Copied to clipboard!
7 years ago
Mar 26, 2018, 3:18:10 AM

I'm writing a python script to identify (and perhaps eventually resolve) conflicts between mods in ES2.  So far the script successfully identifies conflicting files.  But I get the impression that just because there is a file with the same name in more than one mod folder, does not necessarily mean that there is a conflict (e.g. locale files).  


How can I determine from the files whether an actual conflict exists?  Are certain xml elements necessarily additive? or necessarily not additive?


Are some files not additive (they always fully overwrite a file of the same name from a different mod)?  If so, which ones?   

0Send private message
7 years ago
Mar 26, 2018, 8:08:19 AM

First thing is there is three types of mod, it’s set in the mod manifest’s RuntimeModule header.


Almost all are the Extension type which means they only overwrite when an entry of the same type & name already exists, file names have no effect here.


There is also Conversion which the game will only run one of and any file it edits with the same name is overwritten in addition to any entry of the same type & name that already exists.


The last type is Standalone which can only be activated by itself and makes the game ignore vanilla files & only use the mods files.




Since most mods are of the Extension type to check compatibility you will want to write the script to create a list of a mods edits of each datatype (as entries of different datatypes can use the same name, e.g. ModuleDefenseShield3Strategic4 is a ExtendedGuiElement, DefenseModule & SimulationDescriptor) and then check the list against all the other mods lists for matches.




Some conflicts are not too bad, e.g. two mods having the ModuleDefenseShield3Strategic4 SimulationDescriptor just means that one mods changes to Advanced Plasmoid Shielding’s values will be lost.


Other conflicts can cause the game to not load, there are a few very important large entries that need to be edited to add new functionality (this is why many big mods will conflict) generally it’s any SimulationDescriptor that begins with Class but the by far most commonly modded ones are: ClassEmpire , ClassStarSystem & ClassColonizedStarSystem.

0Send private message
7 years ago
Mar 27, 2018, 2:15:43 AM

Thank you.  That is helpful.  But I'm still a bit confused.  


For example, in SimulationDescriptors[Empire].xml, several mods modify the <SimulationDescriptor Name="ClassEmpire" Type="Class"> element.  But it seems that much of the content is repetitive of the base game file.  Is this because modding the element overwrites the ENTIRE element (and its children) from the base game?  Such that modifying one small piece necessitates copying the entire element (and its children), and then making the small modification?


If so, this seems to present a potential problem: It will be difficult to programatically discern between intentional modifications in slightly dated mods from "accidental" modifications due to newer base game files...  Any thoughts?

Updated 7 years ago.
0Send private message
7 years ago
Mar 27, 2018, 10:41:27 AM

With these classes most modifications to the base files done in the vanilla version (such as a new property being defined) will cause the mod to break the game if the changes are not also applied to the mods file, So there should not be many instances of this. 

I and others use WinMerge on the public directory & our mod files to check for such changes as they are the only way for an update to cause a mod to break.

0Send private message
7 years ago
Mar 28, 2018, 1:37:22 AM

Is there any documentation about how the game reads/loads mod files?  That might go a long way in helping me create meaningful diffs for comparison.

0Send private message
?

Click here to login

Reply
Comment

Characters : 0
No results
0Send private message