PT File Patcher

Results 1 to 6 of 6
  1. #1
    Custom title enabled bobsobol is offline
    May 2007 Join Date

    config PT File Patcher

    PT File Patcher

    PT File Patcher - Version 2.1 - build 7
    Although this is the first release of PT File Patcher, it is version 2.x because it is the heir and successor to my TGAPatch - Command Line tool. This enables these files to be opened with regular image and sound editing software.

    It still operates from the command line, and still patches TGA files, but it will now patch .bmps, .wavs & .bgms as well! The "on-mass" patching of every supported asset in the client folder is still supported by simply dragging the client (game) folder and dropping it on PTFilePatcher.exe, and it's still provided with complete source code. (This program is written in a dialect of the Basic programming language called freeBASIC, which is based on the GNU Compiler suite GCC. It can be built with the provided make.bat file from the freeBASIC command line in Windows, or from the fbEdit project file PTFilePatch.fbp.)

    Additionally, if you are one for Drag and Drop operation, or simply like to double click, it will present Windows GUI interface of dialogues... the most prominent being this one, shown during "on-mass" patching.
    Beyond that, every error message and fatal error is interpreted into a basic "OK" message box if launched from a GUI environment. And the "on-mass" Yes/No question is asked via a similar GUI dialogue box.

    It is still possible, and may be advisable, to drop a single file (BMP, TGA, WAV or BGM) on to PTFilePatch.exe and have it patch just that one file, and this will still operate in GUI mode if done as a drag'n'drop operation. Explorer replacements (Directory Opus, xplore2 etc.) should operate just as well as using Explorer "browse" or "explore" windows, just as it shouldn't matter what CLI (cmd.exe,, 4nt.exe TCC etc or any build of bash) you use to launch it in CUI mode. (clearly, I can't test them all)

    I haven't sacrificed any of the command line functionality in doing this however, and if you want to make backups of all your files before patching their headers, there is no way to do that without using the command line interface. Nor is it possible to redirect stdout and stderr to files for later analysis unless you run from a command line. It shouldn't matter whether you use cmd.exe or any other command line interface to launch the program and pass parameters to it. (please let me know if you do have problems with one)

    PT File Patcher is twice the program TGAPatch was. It's now twice the size, but 20K of that is the Icon alone. However, I think it's also at least three times as functional, if you count the GUI and the additional file formats.

    I've also provided the original PNG file which the afore mentioned Icon was generated from so you can make a more, or less detailed (and sizeable) versions of it, (or create an Icon for a Linux build, or such) and you can see it illustrated at the top of this post. (That poor Hopie doesn't look very happy with his sticking plaster does he... I blame the Pikes, my self. XD)
    The original artwork isn't mine. I think I first saw it posted on the PTV site, but it's shown up on most of the official PT sites since as part of a Bestiary or Heroes & Monsters trading card set of images.

    Only the pore-pore on his tummy and the transparency is my doing. Iconically, the Hopie represents PT, the sticking plaster (Band-aid? In U.S. English?) represents the patch. (but if I followed what I've overheard in "Art and Design" classes correctly I shouldn't have to explain that. XD)
    Latest Release (2.1 build 7) Download from:-
    Deposit Files

    VirusTotal report.

    MD5: fbfd9f769b5c7694c39ff5ce5b27ddbe
    SHA1: 2c82a081b849a98c5158f2d0b20295ad041c43b9
    SHA256: 2f542cea7131efa9a78150095ab9543c3cabfe8fec5e344762935d1736bf4c9e

    Original Release (2.0 build 115) Download from:-
    SendSpace - Dead?

    Other hosts can be made available on request.

    Please report any peculiarities back here, posting anomalous files before patching if possible, or giving as accurate a detail on how to repeat the anomalous behaviour as you can.
    I hope the helplessly pointing device addicted among you appreciate the effort I've gone to to make a single executable operate in both GUI and CUI mode and can forgive the brief "DOS box" that appears at start up. (it seems to be necessary in order to operate correctly in Console mode) I also hope the rest of you appreciate a tool that does everything relating to asset de-obfuscation in one fell swoop.

    Share, and enjoy.

    Nobody has given me enough feedback to credit them with anything for this version.

    I should still mention the un-named Brazilian (Portuguese speaker) who created the original VB6 TGA Reader which started this whole thing off, even though very little of his / her code or practices remains in this version, it started the snowball.

    I should also like to thank Obscura for the original BMPPatcher and WAVPatcher whose analysis of operation has been the inspiration for the remainder of the asset patching.

    I will also thank the PT "community" here at RZ for giving me this little hobby which keeps me amused in times of boredom.
    Attached Files Attached Files
    Last edited by bobsobol; 11-02-12 at 05:44 PM. Reason: Version 2.1 update

  2. #2
    Account Inactive Makloud is offline
    Apr 2008 Join Date

    Re: PT File Patcher

    Thanks ^^

  3. #3
    Member gkirby is offline
    Nov 2009 Join Date
    United StatesLocation

    Re: PT File Patcher

    Hi bob,

    So what this does is gets rid of the errors in the pt files?
    That would be really nice bob. Could you explain a little more how to use this handy tool. Can it fix game exe errors and server errors? Thanks bobsobol for this handy tool.


  4. #4
    Custom title enabled bobsobol is offline
    May 2007 Join Date

    Re: PT File Patcher

    Quote Originally Posted by gkirby View Post
    Hi bob,

    So what this does is gets rid of the errors in the pt files?
    No. It assumes your PT files are in good health, and will turn erroneous files into complete and utter garbage.
    Quote Originally Posted by gkirby View Post
    That would be really nice bob. Could you explain a little more how to use this handy tool. Can it fix game exe errors and server errors?
    It will do neither, I don't know where you get that idea, I've said nothing about exes, only BMPs, TGAs, WAVs and BGMs... you should not have any of those files in your server directory.

    If you can be so mislead about it's purpose from the clear documentation I've given, I'm not going to expand upon that... besides, it's documented here on the forum, it's self-documenting (-h /h --help) and it comes with 2 clearly written plain ASCII text files for further documentation.

    IDK how you can think it's "Lilly the Pinks' Medicinal Compound" from anything I've written, but you seem to. :s Please read with your eyes, and engage your brain before jumping to conclusions that this (or any other tool) will solve all your problems for you.

    This isn't the only tool available here which can do any of the things it does... It's just a quick and simple way to make normal 2D image and Sound files accessible to other applications so you can change the textures, UI artwork sound effects and background music without starting again from scratch. It is the first tool I've seen that will fix all of these files in one fell swoop with little or no user interaction. Since you don't need to, and really can't interact with it (except to stop it part way through)... I can't really see what more information I could give on how to use it, unless you don't understand how to read standard command line argument syntax, in which case, don't use it. At least not from the command line. Just drop your client folder on it... wait... job done.

    The one patching function I could have added to it with ease, and decided not to, was fixing the headers of SMD & SMB files in Sandurrs clients. I don't want people using his assets in their own clients without his permission so I see no reason to do that.

    Maybe some day I will add SMD & SMB -> ASE to it... but I doubt that too, as that would be better performed by a separate program.

    So the only "planned" features I'd like to add, is re-obfuscating the files for when you've finished tinkering with them, and fixing passing wild-card character processing ("*" and "?"). And, again, as it's so simple to remove that obfuscation (with this tool or others) I don't see much need to "hurry up" on that.

    Bug reports are welcome... I've already come across a single folder which refuses to be processed when dropped on PTFilePatch.exe, and I don't know why. Sub-folders work, and it works when the command line is passed the path manually, but not from Drag'n'Drop. More examples of that would be nice.

    I'm guessing it's something to do with Windows "MAXPATH" and the way Explorer wraps paths it passes... maybe the "short name" isn't preserved or something. It's possible that the change I will have to make to bypass my RTL in order to receive wild-cards unaltered will fix that issue too so I'm not going to panic over that either.

    I wish you'd either simply clicked the "Thanks" button or told me why you decided not to, rather than waste a post on the thread that just says what the button does better. XD
    Last edited by bobsobol; 15-08-10 at 01:24 AM.

  5. #5
    Custom title enabled bobsobol is offline
    May 2007 Join Date

    Re: PT File Patcher

    !!! Happy New Year !!!

    New year, new edition 2.1 of PTFilePatch. Find the links in the updated initial post of this thread.

    Change log for v2.1:-
    • Some code bumming took the executable from 81 KB to 79 KB, with no change in functionality and no noticeable performance hit.
    • Added version number to title bar of help in GUI mode.
    • Fixed Wildcard matching by disabling Win32 command line globbing.

    So basically, it's smaller and a little bit better. Nothing major, but enough niceties to warrant a decimal increment and a fresh release.

    Enjoy, and best wishes to all for the coming year.

  6. #6
    Professional Aussie SunnyZ is offline
    True MemberRank
    Jul 2006 Join Date

    Re: PT File Patcher

    Heya bobsobol, thanks for this!

    I have a question though. I wanted to use this source code to make it convert bitmap files back to their original encrypted state.
    I have done this, it works perfectly fine, but at the end instead of showing the completed so many files popup window, it just crashes.

    This is really not a huge problem, just wondering why it's happening. It also happened with the clean source code, so I know it's not something I've done.

    It gives this error when compiling.

    I basically need to do this because the latest version of Subagames English Priston Tale which is coming soon will not load edited image files.
    So I have to put back the original image file header in order for the game to read the edited image files.

    Once again, not a huge problem, it still works, converts all files perfectly, they work in game, the program just crashes upon closing.

    Thanks =D