andwhyisit said:
Compared to what? You still need to convert from your patch to the Mac format as well.
The comparison I made was applying the patch on Windows to applying the patch on Mac (same patch file). Suppose you did use the UPS format. As I understand, UPS is a generic binary diff format, which compares two binary files and outputs a file which can then be used to transform one of those files into the other. So, that UPS patch would be trivial to apply to a copy of Windows Cave Story.
But then suppose that you wanted to apply the patch to a copy of Mac Cave Story. It's no longer trivial, because the Mac executable has an entirely different format. Applying said patch would require that the Mac patcher know both the format of the Windows executable and the format of the Mac executable, in order to file all the data into the correct location.
A custom patch format such as I have suggested, however, is independent of the actual layout of the executable, and thus it is fairly easy (though not quite trivial) for the patch to be applied to any executable, on any platform.
andwhyisit said:
If you really want to do this then there is one thing you need to understand...
Do not attempt to make it human readable. You need it to be as machine readable as possible if you want people to use it and develop for it, so store your values as bytes.
Uh. A human readable format is still machine readable. Suppose it was text-based of the form "attribute<tab>value". In that case, a patcher would simply need to have a loop where it first reads a string and then, depending on what the string is, reads a second value and stores it in the proper location. Furthermore, it has the advantage of being endian-independent, so that a patcher does not need to care about what endian the file should use.
Of course, it has disadvantages too; it's less compact, for example. But the main point here is that "human-readable" and "machine-readable" are by no means mutually exclusive.
andwhyisit said:
..and document the patch file in the readme file (like the example above) for developer use.
Well, of course. Whichever format I choose (text, binary, whatever), it will be documented.
Note that text handling in Python is actually easier than handling of binary files, so that might factor into my choice. (And in C++, they're both just as easy provided you use std::string for your text handling.)
andwhyisit said:
Still think it's a bad idea either way but a bit of advice can't hurt.