okay, I think i figured out what's up with diff3
I needed the -e or -a option.
Then I didn't get any output with <<<<< or ====
C:\temp>DIFF3 -e -m civforge\raw\objectS\entity_default.txt 34_11\raw\objects\en
tity_default.txt accmod\raw\objects\entity_default.txt >temp.txt
updated batch script
dir /b %2\raw\objects
mkdir VersionABC
mkdir VersionABC\raw
mkdir VersionABC\raw\objects
for /f %%f in ('dir /b %2\raw\objects') do diff3 -e --merge %1\raw\objects\%%f %2\raw\objects\%%f %3\raw\objects\%%f > VersionABC\raw\objects\%%f
I think correct order is
diff3batch modb moda modc
moda:modc changes will be merged into modb, moda serves as base.
Here's a relevant section and how it was handled by the merge, I think it merge wonderfully.
Left = 34_11; Middle = AccMod; Right = CivForge
You can see it respected the 34_11 - AccMod entity changes when it looked at Civilization Forge, and it added in an item from Civilization Forge, the jar.
So... diff3 diff3 diff3!
http://imgur.com/SOitufkNote: It looks like the behavior dropped toy_doll from being added by CivForge due to the fact that the entire section was deleted by Accelerated mod.
The notepad++ window is the output of the diff3 -e -m merge operation. Behind it, the center column in kdiff3 looks just like the column on the left. The only difference is the right column (civforge) has a _Jar entry that is added in the final output.
Update:
I was able to merge 3 34_11 mods together and then update them to 40_09 using diff3. I went through and randomly verified some of the additions that you can see were brought in from my github version tracking. For example, the changes from 34_11:Fortress Defense entity_default can be seen here (although similar to accelerated mod, Fortress Defense entity_default optional changes also got rid of wheelbarrow's for plainsmen, which accelerated mod did not, and those changes were merged in)
https://github.com/thistleknot/df_34_11_win-Flattened-Bases/commit/8d71025dfc2b8996245f2b0ff4ee469b747233a8I merged
34_11:Accelerated changes into CivForge = AccCivForge
34_11:Fortress Defense changes into AccCivForge = AccCivForgeFortressDefense
34_11:40_09 changes into AccCivForgeFortressDefense = AccCivForgeFortressDefense-40_09The only caveat, is this batch file only works on the files in raw\objects. Diff3 can be modified to work with other files.
Also, the batch file only looks at the [directory listing of] base folder's raw\objects\*.* for diff3 comparisons. New files that are not in this folder due to other mods having them, won't have a diff3 merge ran on them because their absent from this initial directory listing (as a workaround, an empty file could be created for those missing files, diff3 should create a new outputted file for each missing file if they are supplied in this manner). So if two mods mod the same file but the base doesn't have it. Then a 2 way merge would have to be done between the two outside of this diff3 batch file and then that file would have to be brought into the final output.
On a final note, alphabetizing:
The only thing stopping us from doing something like this EFFICIENTLY on a total conversion mod... is a [command line] raw/text object alphabetizer. Maybe with extended functionality to alphabetize castes within object:id's.
However. If one wanted to incorporate a total conversion mod. One could... alphabetize all the raws by hand using rawExplorer. It can alphabetize a whole set of raws apparently and output it in a single go, then we parse them. Then do the same with vanilla base. And you could probably do better additive/subtractive diff3 comparisons.