Jump to content

How should a patch behave?


tahu157

Recommended Posts

Lately I've been messing around with "patching" freeware VNs. Basically all I'm doing is extracting content, editing that content, re-packaging the edits, and then seeing if my changes show up when I try to read the VN again. This is mostly for fun and to try to get an understanding of how certain VN engines work. However, I've come to the realization that I'm not actually sure how patches are supposed to work. In these experiments I'm doing, I'm replacing the games' script files with my new edited script files. This method seems (to me) less like patching and more like modding. There's an outright replacement of old content with new content going on, but that doesn't seem to be how the patches I've applied in the past behaved. They've almost always been an additional file that is dropped in the game directory but doesn't replace anything that's already there.

This is probably a very broad and hard to answer question, but how exactly do VN patches inject edited (translated) content into a VN without replacing existing content? Is it usually some function of the VN engine to look for designated patch files? Or do patches usually just replace the game files entirely and I've just never noticed? I realize the answer could vary drastically depending on the VN engine in question, but if anyone has a general explanation I'd appreciate the insight.

Link to comment
Share on other sites

Usually, a "mod" has the connotation of being unofficial. And depending on the context, the terms "mod" and "patch" can be used interchangeably. In either case, the end result is a change in the game data.

Indeed, the delivery mechanisms for a patch/mod/update/add-on is dependent on the engine and the nature of the patch itself.

Typical methods usually boil down to one of these:
-Install a patch archive
-Install updated raw files (script/image/audio)
-Overwrite an existing game archive
-Delta patch

Many engines can detect and use new packages which deliver patched content. They might have obvious filenames like patch.xxx and updateXX.yyy, or something like dataXXXX.zzz to look consistent with existing files. During gameplay, the engine will give precedence to files in the patch archive -- it accesses them first if they exist, otherwise it will default to reading the originally shipped data.

Some games do patches just by adding or replacing raw files in the game folder. I think engines allow for this as a development feature (avoids needing to rebuild archives to test new changes) which also doubles as a patching mechanism. Games that do this might not even use archives at all.

And then there are engines that don't have a built-in way to load patches, meaning the original archives must be overwritten in order to serve patched content. Updates for VNs usually focus on the scripts, so a new script package will be small enough for the user to download and replace outright.

But for games where large archives need to be updated/overwritten, downloading the whole thing again would be very inconvenient. An alternative method is called delta patching, where an patched file is constructed from an existing older version using a delta (before/after difference) file. After the new file is created, the old one can be deleted -- effectively overwriting the original copy. Aside from VNs, delta patching can be seen in areas like fan-tl'd console games, hotfixes for fansubbed anime, and of course, game updates on Steam.

I feel like my response answered the "what" but not the "why" part of the question, so there's probably more stuff to talk about.

Link to comment
Share on other sites

So, patching usually involves a lot more replacement than I initially thought? That's interesting. I always thought of translation patches as redirecting the engine's focus to the translation and away from the original text without actually doing anything to the original text. That seemed to be how KiriKiri Engine worked anyway so maybe that's why I thought that.

I've been looking specifically at NScripter and its spin-off ONScripter. It seems I can add my own archive files with relative ease, but I'm not sure if there's any way to simply add a new script file for the translation part. Actually I'm guessing that there isn't one at all because the Tsukihime (NScripter) translation seems to have totally replaced the Japanese text. Another thing about the Tsukihime translation is that it was distributed as a .exe but functionally it's just a zip archive. Are other .exe translation patches like that as well? Is shipping a translation patch as a .exe when it's really a zip file just a stylistic choice? Is that considered more professional or user-friendly?

Link to comment
Share on other sites

For the first part... the answer is a bit of yes and no, depending on how you interpret the question. In one sense, a patch does work in the way you describe it: the engine focuses on the translation inside a patch file instead, and the originally-installed files remain untouched. But on the other hand, the translation is made by modifying a copy of the script -- replacing the Japanese text and putting English text in its place. The resulting script is packaged into the patch file. Side-note: if the scripts are 100% text based, the translation team might choose to comment out the original text instead of removing it from modified script. This makes it convenient for TLC at the expense of larger file sizes if the comments remain in the final product.

For the second part... From what I understand, NScripter scripts are written as a bunch of individual files just like any sane project would do. During the packaging process, NScripter will combine all the script files into one big encrypted text file. Everything from the source scripts should still be there, it's just one big blob now.

The exe you mentioned is just an installer, and yes, user-friendliness is often the main motivator for providing an installer instead of a zip file. Looking professional is just a bonus, in my opinion. Installers are beneficial to users who, for example, lack file management skills and want to have an easy way to install or uninstall a patch. There are TL projects that have shipped their patches as installers, but most projects I've seen tend not to... especially if it only takes 2 seconds to drop a file into the game folder.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...