Friday, September 12, 2014

Merging Mod Updates into Your Custom Versions

A computer screen filled with many lines of cryptic, arcane, code gibberish.
~  Code Gibberish ~
If you've been using your own custom versions of Minetest mods made by others, then you know what a headache updates can be.

For me, adding updates to the mods that I've customized has evolved into a multi-stage process.

I have a few different installs of Minetest, each with its own purpose. One install is for playing Minetest. A second install is for testing and working on Minetest mods. And then a third install of Minetest is off to the side, away from my main files, so I can use it while my computer is running a backup.

A special reminder,... coming from several painful experiences of much lost data,... BACKUP YOUR COMPUTER!!

Frequently.

Consistently.

Obsessively.

Backup, backup, backup, and when you are sick of it - back it up again!

Ok, returning to the subject of updating the mods made by others, that you've customized to suit your own, personal, preferences.

My mod-work install of Minetest has many individual worlds solely dedicated to each original mod, as well as worlds dedicated to each of my customized versions of those mods.

I begin by reading through the changes made to the mod on its Minetest forums thread and in its GitHub repository. Then I download and install the mod into its own test world.

If it is a mod that I've been using for a long time, then its test world has been setup with a variety of things:

  • A display of all of the mod's items. Since recipe items are usually not something you can place, by themselves, in the world, I put each one in it's own chest. That way, when I look in the chests after an update, I can see what recipe items may have been removed.
  • A few experiment setups to test the functions of the mod (if it is more than just a decorative-block type of mod).
  • Signs with very, very brief notes of my thoughts, of any ideas, of any issues that came up,... notes of anything about the mod and its changes that I want to keep track of.

Another side note: always keep your full, detailed, Minetest notes in a word processor, text editor, or some kind of note-taking program. Think of signs as nothing more than temporary sticky-notes in the game. Signs can be messed-up by updates so always, always, keep the important notes somewhere else.

I check-out the new stuff the mod update has added and search for any changes in the test world caused by the code-fixes or code-edits that may also be in the mod's update. I evaluate the changes, take note of what to alter or what to omit, then move on to the process of comparing and integrating the updates into my custom version of the mod.

To do this I use a free, open-source program called, "Meld".

(Meld is tailored for Linux but there is a "not-yet-official" installer for Microsoft Windows listed toward the bottom of Meld's homepage.)

Meld allows you to compare and edit files and directories, side-by-side in the same window. Any differences between the files or directories being compared are presented as color-coded sections. This helps merging the updated code into your custom mods a little easier.

For the updates to stuff you haven't customized, you can copy the changes straight over.

For the parts that you have customized, you must go through, line-by-line and decide what to keep, what to omit, and what to edit. Meld's color-coded highlighting is really useful here.

Once the updates have been merged into my custom version of the mod, I load that custom mod's test world and run it through the paces, looking for problems I may have missed or not thought of, and checking to make sure the updates and my customizations work like they are supposed to.

If everything check-outs satisfactorily, then and only then do I install the update-merged version of the customized mod into my main, long-term world.

If you decide to customize the mods you use in your Minetest worlds, you will have to accept that merging mod updates into your custom versions of those mods can be a lot of work at times.

A lot of work, yes, but... the reward is a Minetest world, custom tailored to your personal tastes, that is unlike any Minetest world out there.



About Comments
Be civil and show some class toward your fellow commenters.

Trolls will be ignored as will posts containing swear-words or alternate spellings of swear words.

No comments:

Post a Comment