taleden Posted October 26, 2012 Share Posted October 26, 2012 I'm looking for mod authors to beta test a new DefaultGameCore mod installer tool. This new tool can be a drop-in replacement for modpatcher, but it is also able to combine the effects of multiple INI mods at the same time, without them overwriting each other like they do with modpatcher. The initial tester(s) will need to install Python 2.7 (free download) and be familiar with the command line and the DefaultGameCore.ini file format. Later on I'll release a native Windows executable and add a GUI, but I want to test the core functionality first. Please post here or send me a PM if you're interested in trying it out. Link to comment Share on other sites More sharing options...
rf900 Posted October 26, 2012 Share Posted October 26, 2012 I cannot see how it will be able to combine several mods, surely if two mods change the same value you will have to choose one or the other. Link to comment Share on other sites More sharing options...
taleden Posted October 26, 2012 Author Share Posted October 26, 2012 I cannot see how it will be able to combine several mods, surely if two mods change the same value you will have to choose one or the other. If they change the very same value, yes, of course, there can be only one final result. But the problem right now is that every INI mod has to specify not only the values they want to actually change, but also every other value in the original INI file which was not changed. What xcominipatch allows is for a mod to change what it wants to without touching anything else. For example, let's say this is the original default INI file: ONE=1 TWO=2 STRUCT=(FIRST=1, SECOND=2, THIRD=3) Now we have one mod that wants to change the "ONE" and "STRUCT.FIRST" settings, so it supplies a modified INI: ONE=10 TWO=2 STRUCT=(FIRST=11, SECOND=2, THIRD=3) So far so good; but now we want to use a second mod that only changes the "TWO" and "STRUCT.SECOND" settings: ONE=1 TWO=20 STRUCT=(FIRST=1, SECOND=22, THIRD=3) If we use modpatcher to install these two mods, whichever one is installed second will overwrite the first one. Instead, xcominipatch can combine them so that you get the effects of both: ONE=10 TWO=20 STRUCT=(FIRST=11, SECOND=22, THIRD=3) Notice not only did both ONE and TWO get changed by the two different mods, but the individual properties of STRUCT were also blended, including the default value for THIRD which neither of them touched. In order to accomplish this, all you have to do is use xcominipatch to generate "diffs" of each mod against the original file. So instead of installing those two modified INIs that contain every setting, the two mod's patches would look like this: ONE=10 STRUCT(FIRST=11) TWO=20 STRUCT(SECOND=22) Does that make sense? Link to comment Share on other sites More sharing options...
Dark0ne Posted October 26, 2012 Share Posted October 26, 2012 This sounds great, Taleden. While I don't fit the criteria for your testing, I look forward to seeing it all in action :) Link to comment Share on other sites More sharing options...
versengeteriks Posted October 26, 2012 Share Posted October 26, 2012 love to try it. ive a set of personal mods i like to use. but i also like to try some other aspects from other mods too. If you post it. it will be tested. Link to comment Share on other sites More sharing options...
taleden Posted October 26, 2012 Author Share Posted October 26, 2012 If you post it. it will be tested. Fair enough; have at it. As I mentioned, for the moment you'll need Python 2.7.3 (32 bit, even if your OS is 64) from python.org, and the xcominipatch.pyc attached to this post. Later on I'll make it a standalone program, and I'm also planning to release the source code under GPL2, I just want to make sure there are no serious bugs first. To get started, you'll need both an original and a modified DefaultGameCore.ini, from which we'll create a patch: C:\SomeDir> xcominipatch.pyc --ini Original-DefaultGameCore.ini --diff Modified-DefaultGameCore.ini If your original INI is embedded in a backup EXE file, you can do it that way too: C:\SomeDir> xcominipatch.pyc --exe Original-XComGame.exe --diff Modified-DefaultGameCore.ini Or, if your current primary XComGame.exe file is unmodified (like after re-verifying via Steam), then it should be found and used automatically: C:\SomeDir> xcominipatch.pyc --diff Modified-DefaultGameCore.ini This will compare the two INIs and create a new file called "ModifiedDefaultGameCore.ini.patch". The patch file contains only the specific settings that were actually changed in the modified INI; everything that was left the same as the original is not included at all. You can do this as many times as you want to generate .patch files for multiple mods. To install these patches, just leave out the --diff option: C:\SomeDir> xcominipatch.pyc FirstMod.patch SecondMod.patch ThirdMod.patch This will make a backup of your XComGame.exe file, and then patch it with all the mods simultaneously. As long as those mods didn't modify exactly the same setting, you should see the effects from all of them (as always, you might have to start a new game first). If you want to apply mods to a specific EXE rather than the automatically located one, you can use the --exe option again: C:\SomeDir> xcominipatch.pyc --exe XComGame-ToPatch.exe FirstMod.patch SecondMod.patch ThirdMod.patch Or, you can apply the patches to a specific standalone INI file: C:\SomeDir> xcominipatch.pyc --ini DefaultGameCore-ToPatch.ini FirstMod.patch SecondMod.patch ThirdMod.patch Any file which will be modified is always backed up first, and old backups are never deleted or overwritten, so you should always be able to undo anything. Link to comment Share on other sites More sharing options...
versengeteriks Posted October 26, 2012 Share Posted October 26, 2012 stick a post in here uploaded files ipload ur file with the post above explaining what it is and ull prolly get a few testers. Link to comment Share on other sites More sharing options...
taleden Posted October 26, 2012 Author Share Posted October 26, 2012 stick a post in here uploaded files ipload ur file with the post above explaining what it is and ull prolly get a few testers. It's attached to the previous post; I just want to make sure that it actually works on somebody's computer other than mine before I publicize it more widely. Link to comment Share on other sites More sharing options...
versengeteriks Posted October 26, 2012 Share Posted October 26, 2012 ok, im prolly being a bit dim. currently. I have python installed. ive extrated the patch file. and i can click on it to run. it quickly loads a command window and closes. I cant read what it says. And i cant see how to set the patcher to use my modded file? Link to comment Share on other sites More sharing options...
tbkiah Posted October 26, 2012 Share Posted October 26, 2012 you need to open a command window where the file is (shift + right mouse button in the folder).. and use the commands that he outlined in this thread. Link to comment Share on other sites More sharing options...
Recommended Posts