Jump to content

[TUTORIAL] How to use Diffmerge to update custom scripts and overrides


Recommended Posts

We all know that feeling, you just got your server tweaked and optimized just how you like it and an Epoch update comes out!  OH NO! what do we do?  Wait for the mod authors to release their own patch?  Hell no!  We diffmerge!

 

If you followed my guide on how to override mod files, you may be asking "what happens if the files we overrode changed on an update?"  well the answer depends if it was changed.  Here is how you can locate all the changes if there are any and make the changes needed to keep your server running.

 

What you'll need: Diffmerge, A working copy of DayZEpoch Server, modifications

Difficulty: Advanced

 

 

Scenario 1: An epoch mod update came out and you being a good admin want to make sure there were no changes made to your reference file.

For this guide, we will assume you modified the variables.sqf by using my tutorial

 

  • Locate the files you have made changes to
  • Locate the original file
  • Diffmerge the two files and compare changes, merging where necessary
  • Right click your original file and select "Diffmerge->Open With Diffmerge"
  • Click "Browse" on the 2nd line referencing the "right" file.  Note diffmerge always goes from left to right.  Meaning the file you wish to change or update needs to be on the right hand side!

Here's what the diffmerge window looks like, note the changes in red.  You can see where we added the new class reference.

WoSoCBn.png

 

If we click the down arrow (Next Change) we can scroll all the way to the right and see where we added our new skin

 

2Iw0pNC.png

 

 

That's it.  Just take a look at all the changes and use your reasoning to determine if you need to make changes.

 

If you are being studious, you may have noticed a few more changes near the bottom of the file represented by the red "-" on the left.  Ignore these, normally you would only see the top two changes.

Link to comment
Share on other sites

WOW THANKS SOO MUCH

this may remove my fear of trying to find the changes in 1.0.4.2 and 1.0.4.2a

I have not upgraded my server yet. been procrastinating  didn't want to re-script everything I looked for an hour or so to see if I could see any changes

I heard it was only in server_monitor but I didnt see any changes...

maybe this great tool will help find it...

 

thankz

Link to comment
Share on other sites

WOW THANKS SOO MUCH

this may remove my fear of trying to find the changes in 1.0.4.2 and 1.0.4.2a

I have not upgraded my server yet. been procrastinating  didn't want to re-script everything I looked for an hour or so to see if I could see any changes

I heard it was only in server_monitor but I didnt see any changes...

maybe this great tool will help find it...

 

thankz

No Problem! Glad I could help yout.

 

You do know theres a plugin for Notepad++, that is way better then Diffmerge, right?

And can it compare entire directory trees?  If so, I'll have to check it out.  One major bonus diffmerge has going for it is comparing entire PBO's to eachother.

 

Here is a screenshot for those who don't know.  This is the difference in the Dayz_Epoch_Server.pbo from 1.0.4.2 to 1.0.4.2a.  As we can see, there are only 2 files with changes made between these versions.  Now we don't have to hunt down every single file.  

pwq7P7H.png

 

edit:  Here's a pic showing more changes going from 1.0.4 to 1.0.4.2a

a3SVBr4.png

Link to comment
Share on other sites

The plugin can be download stright from Notepad++, its under the plugins--->Get more Plugins, Only one called Compare. Then it works great. I dont recommed the whole directoy scan, since it will show epochs updated from vx.x to the new server and that might cause people to fu*k up, so just remeber what mods were put in and what files were edited.

Link to comment
Share on other sites

  • 1 month later...

I would suggest all to download Ultraedit and Ultracompare. Its Notepad++ on steroids.

Its 'compare' program is the best i've seen

 

But it is also US$99 for both and Notepad++ is free.  DiffMerge, whilst free seems to have nagware to register for a small fee (how much is the fee ?).

 

I did like Ultraedit when I did the free trial but probably not $99 over Notepad ++.  Saying that, Notepad++ text colouring is a bit annoying with some items being light blue or grey on a white background.  Makes reading printed copies hard as well but that is more due to the syntax highlighting configuration I suspect.

 

RB

Link to comment
Share on other sites

We all know that feeling, you just got your server tweaked and optimized just how you like it and an Epoch update comes out!  OH NO! what do we do?  Wait for the mod authors to release their own patch?  Hell no!  We diffmerge!

 

....

 

Nice writeup.

 

Have been using wingrep and windiff and Notepad ++ but will now also take a look at this.  Could help work out what changes users need to make to get a newly developed mod working (changes sometimes go unrecorded when debugging) :).

 

RB

Link to comment
Share on other sites

Nice writeup.

 

Have been using wingrep and windiff and Notepad ++ but will now also take a look at this.  Could help work out what changes users need to make to get a newly developed mod working (changes sometimes go unrecorded when debugging) :).

 

RB

 

thanks, I also find windows grep to be extremely useful.  Mostly for locating variables or finding guids in log files.

 

Be careful tho, I've seen windows grep lock files so if you have an automated build process going it could screw with that.

Link to comment
Share on other sites

  • 4 months later...

I downloaded the trial version of Ultraedit and UltraCompare.   Sure UltraCompare does a line-for-line and character-by-character comparison but I don't see anything about the editor knowing anything about .SQF files or any other filetypes in the Arma2/Epoch filesystem.  And I did a quick Google search for anyone that has created an import files that tell it how to handle .SQF files.   No luck.  At least there is one for Notepad++ - so tell me again what makes Ultraedit so great for Arma2 files?

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Discord

×
×
  • Create New...