Version control

Users who are viewing this thread

original

Knight
Hey all,

I'm thinking of modding a few things I disagree with native, but now that v1.130 got released, it made me wonder how I can keep my mods in tact with new updates.
How do you all ensure your changes aren't overwritten?
 
By not placing them in files that module system overwrites?
I avoided the whole issue by putting modded stuff outside main files.  And since I don't have "major" mods (I run ard 10 minimods/kits/itempacks in addition to my own modded stuff), I got the whole thing working in 5 minutes... including build time  :mrgreen:
 
Is that how your ModMerger work? I DLed it but have not try it yet. I will probably use it soon to add a few features of Battle Tactics Kit (restricted to AI use only) into my mod.

My main concern is conflicted codes. Things like 2 pieces of code giving too much benefit/penalty or just negate each other.

I've been keeping note of what I did, which files I changed, tag the my codes, using WinMerge and just systematically port file by file.
 
Yes.  ModMerger works on non-destructive modification of the original files in module system.  This concurrently allows the "changes" to be placed in files other than the main modules.

But your concern is valid when conflict occurs (e.g. 2 mods changes to same line in the same file), it will require manual resolution (In ModMerger's case, it requires tweaking of the merging instructions).  That I think cannot be avoided.  What ModMerger tries to do is to make it easier for the cases where it DOESN'T conflict.  So if there are manual stuff to do, at least if can be restricted to only those areas that really needs attention.  For example, when I try to insert/delete/modify certain key lines in scripts, if the line cannot be found, I usually make it throw an exception to alert myself of conflicts so that they can be resolved.  But from my perspective, it isn't any worse from the original case.  And the tweaking usually only need to be done once when including a new mod into the build.  Upgrading the module system is usually "free" (no extra work required).

WinMerge is good.  I use it a lot to "reverse-extract" modified content from existing mods to repack them into packs for ModMerger :smile: But I find that winmerge is more useful only in the case when upgrading module system version (or game version) for the existing set of modified changes.  It is still too troublesome for cases where I want to include/exclude stuff from individual feature mods, esp when I used a lot of other people's mods/kits.  That is one of the reason why I started ModMerger.  Though recently, I am toying with the idea of using winmerge to compare two op-blocks and auto generate the required "change directives" (instructions to modify the 1st block so that it becomes second block).  But I haven't found an easy way to use winmerge from python (other than using command line stuff, which seems troublesome to wrap)

Anyway, I intended ModMerger to be an example, rather than a standard, though if people find it useful, it could become a standard (hopefully hand over to somebody better at python than I?).  Any person with decent python background can probably do what I did, I just demonstrate a way and a proposed method to minimize intrusion in the main module files, as well as to minimize the work required by modders to create their own mod content in separate files.  And more importantly, easy to include/exclude/update mods in the build.  For Major Mods it is often hard for things to work out without extensive tweaking, but for minor kits, (e.g. say I just want rubik's battle minimap), there is a good chance that all it takes is copy the files and add the mod-id to the list of active mods.

Guiding principle: Convenience for modders (esp in porting/upgrading mods),  convenience for mod users (easy installation/updates/uninstallation).
So far, it is working for me :wink:
 
Back
Top Bottom