davidlallen Posted March 18, 2016 Share Posted March 18, 2016 If mods A and B both override the same class, one of them (based on load-order) will not work. Is that for sure? Will XcomEngine.ini have both lines? As long as they both override different functions it could theoretically work. Link to comment Share on other sites More sharing options...
Solariz Posted March 18, 2016 Author Share Posted March 18, 2016 It shouldn't work. ModClassOverride entries change the class that the static SPAWN function will create.The last value in the xcomengine.ini will work, afaik. Link to comment Share on other sites More sharing options...
davidlallen Posted March 18, 2016 Share Posted March 18, 2016 Has anybody tried overriding one class with two new classes, but overriding different functions in each one? If that is not possible, then there will be a lot of *unresolvable* mod conflicts. Link to comment Share on other sites More sharing options...
Solariz Posted March 18, 2016 Author Share Posted March 18, 2016 (edited) Well, that's one of the reasons everyone is abusing screen listeners. Edited March 18, 2016 by Solariz Link to comment Share on other sites More sharing options...
davidlallen Posted March 18, 2016 Share Posted March 18, 2016 From a software architecture standpoint, using a *screen* listener to affect *data* is just wrong. I have gone out of my way to remove screen listeners. I hope that solution does not become the only way to do certain things. For example, template modification is done much better with the ambient narrative trick, which will not lead to conflicts AFAIK. Link to comment Share on other sites More sharing options...
BlueRaja Posted March 19, 2016 Share Posted March 19, 2016 (edited) Is that for sure? Will XcomEngine.ini have both lines? As long as they both override different functions it could theoretically work. No, it couldn't. There is no way to magically merge two classes at runtime. Maybe in a higher-level language that treats functions like objects (such as Javascript), but not in Unrealscript. From a software architecture standpoint, using a *screen* listener to affect *data* is just wrong. Of course. However, correctness always comes before clean code. If the code is clean but does the wrong thing, it's bad code. For mods, that includes working alongside other mods. In XCOM 2's case, that means avoiding class overrides whenever possible. Edited March 19, 2016 by BlueRaja Link to comment Share on other sites More sharing options...
yewjrn Posted March 20, 2016 Share Posted March 20, 2016 I'm starting to have problems opening the mod manager. It doesn't start up and states that an exception happened. The error log shows the following below. An item with the same key has already been added.Stack: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at XCOM2Launcher.ModInfo.loadFile(String filepath) at XCOM2Launcher.ModList.loadMod(String modDir, ModSource source) at XCOM2Launcher.ModList.loadMods(String dir) at XCOM2Launcher.Settings.ImportMods() at XCOM2Launcher.Program.initializeSettings() at XCOM2Launcher.Program.Main(String[] args) Link to comment Share on other sites More sharing options...
Solariz Posted March 20, 2016 Author Share Posted March 20, 2016 (edited) Are you perhaps not using the most recent version? I think I already fixed that error Edited March 20, 2016 by Solariz Link to comment Share on other sites More sharing options...
Dragon32 Posted March 20, 2016 Share Posted March 20, 2016 Another idea for a feature: create a list of active mos. Could be useful when troubleshooting as someone could easily post their active mods list when having a problem with a mod, hopefully the author of the mod would be able to see mods which may be conflicting. Perhaps: <Name> <ID> <Workshop ID> Link to comment Share on other sites More sharing options...
Solariz Posted March 20, 2016 Author Share Posted March 20, 2016 Great idea. I'll implement it after I'm done with the current rework... Link to comment Share on other sites More sharing options...
Recommended Posts