Oblivion - PyFFI Binary Patch Kit

Post » Wed Mar 30, 2011 3:41 am

http://www.tesnexus.com/downloads/file.php?id=37548

http://www.tesnexus.com/downloads/file.php?id=37548


    Utility tool directed primarily at mod users, with instructions to apply binary patches of any Oblivion meshes optimized with PyFFI.


    This package contains one batch file, one python file and the folders 'in', 'out' and 'patch'.
    The file 'patcher.exe' is the vcdiff tool xdelta v3.0z x86-32 used.


    Apply generic PyFFI Binary Patch optimization in few steps:

    • Place the original meshes (or folders with meshes) to be optimized inside the "in" folder.

    • Download a Binary Patch Kit package and extract the archive to the 'patch' folder.

    • Run or double-click "run_patcher.bat".

    • After patching, the new optimized meshes are placed inside folder 'out', respecting the directory structure inside the 'in' folder as usual.


    (Applying a binary patch is faster than processing the file(s) with PyFFI.)



Full Readme and Details:

Spoiler
Name: Oblivion - PyFFI Binary Patch Kit
Version: 1
Date: 2011/03/13
Category: Utilities
Requirements: Python 2.6.6
Author(s): ulrim
Source: http://www.tesnexus.com/downloads/file.php?id=37548
Forum: http://www.gamesas.com/index.php?/topic/1173353-oblivion-pyffi-binary-patch-kit/


Description
======================================================================
Utility tool directed primarily at mod users, with instructions to apply binary patches of any Oblivion meshes optimized with PyFFI.


Details
======================================================================
This package contains one batch file, one python file and the folders 'in', 'out' and 'patch'.
The file 'patcher.exe' is the vcdiff tool xdelta v3.0z x86-32 used.


Usage
======================================================================
Apply patch:

Place original mesh inside 'in' folder.
Place patch inside 'patch' folder.
Run or double-click 'run_patcher.bat'.

The patcher reads original file from 'in' folder, applies patch from 'patch' folder and saves the new updated file to the 'out' folder, respecting the same directory structure as usual.

It creates a log file next to 'run_patcher.bat'



Create patch:

Disabled by default.



Install
======================================================================
Create a folder somewhere at your discretion, i.e. 'C:\Binary Patch Kit\'.
Unpack the contents of this archive to the respective folder.


Uninstall
======================================================================
Delete the folder where you unpacked the contents of this archive.


Upgrade
======================================================================
N/A


Incompatibility
======================================================================
N/A


Release Notes
======================================================================
Small helper utility: does the job decently without trouble.

Logger can inspect for orphaned files. If using the 'Apply Patch' (default) it means they are patch files which do not have corresponding original files to patch.


Known Issues and Bugs
======================================================================
Applying patch replaces files inside the folder 'out' by default.

Patch creation capability is disabled by default for now.

If you have Python installed in a folder other than the default 'C:\Python26' set 'PYTHON_PATH' in 'run_patcher.bat' accordingly.


Version History
======================================================================
Releases follow a version increment approach starting at 1.

1, 2011/03/13
* Initial release.


Contact
======================================================================
You can find me on the Official Elder Scrolls forums and TESNexus as 'ulrim'.
You can send me an e-mail here: ulrimnohraar at gmail dot com.


Credits
======================================================================
Thanks to:
* Bethesda, for making The Elder Scrolls IV: Oblivion.
* TESNexus.com, for the one-stop-shop resource for authors and players.
* Amorilia, for PyFFI and the NIF tools project.
* http://xdelta.org/ for the open-source VCDIFF tool.
* Tomlong75210, for http://tesivpositive.animolious.com
* All who spend time and effort modding, documenting and building open source software for TES.


Tools Used
======================================================================
7-Zip - http://www.7-zip.org/
Python - http://www.python.org/
PyFFI - http://pyffi.sourceforge.net/
xdelta3 - http://xdelta.org/


Licensing/Legal
======================================================================
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY WHATSOEVER.


Latest updates:

1, 2011/03/13
  • Initial release.




Example step-by-step tutorial how to make a fully optimized 'Oblivion - Meshes.bsa' using this kit:


    Pre-optimization:

      Download the Binary Patch Kit package for 'Oblivion - Meshes.bsa'.

      Extract this archive to the 'patch' folder.

      Open OBMM, go to utilities and use BSA Browser to open 'Oblivion - Meshes.bsa'.

      Click 'Extract all' and select the 'in' folder as the destination directory.

      Run the batch file 'run_patcher.bat'.


    Post-optimization:

      Rename the original file 'Oblivion - Meshes.bsa' to 'ORIGINAL - Oblivion - Meshes.bsa'
      (Notice the file name must not start with 'Oblivion').

      Open OBMM, use BSA Creator, click 'Add Folders' and select the 'in' folder.

      After adding the 'in' folder, click 'Add Folders' again and select the 'out' folder.
      (This step overwrites the default meshes with the optimized meshes.)

      Hit 'Create' button and save it as 'Oblivion - Meshes.bsa'.

      After it finishes creating 'Oblivion - Meshes.bsa'', adjust the modified date with an http://tesivpositive.animolious.com/?page=programs_and_utilities to the same modified date as the original file you renamed.


That's it! You did it!

Check the http://tesivpositive.animolious.com for more insight or drop a message if you're in trouble.
User avatar
Aman Bhattal
 
Posts: 3424
Joined: Sun Dec 17, 2006 12:01 am

Post » Tue Mar 29, 2011 10:20 pm

Woot, another tool.

Only...

Maybe I'm just having a particularly dunderheaded day, but I'm somehow missing WHY I'd want to do this. What is the purpose of binary patching? Is it some kind of of additional performance enhancement that PyFFi alone can't provide?
User avatar
cheryl wright
 
Posts: 3382
Joined: Sat Nov 25, 2006 4:43 am

Post » Wed Mar 30, 2011 8:04 am

Time spent updating 'Oblivion - Meshes.bsa' using PyFFI: 2+ hours.

Time spent using a Binary Patch Kit for 'Oblivion - Meshes.bsa': Some minutes.
User avatar
Casey
 
Posts: 3376
Joined: Mon Nov 12, 2007 8:38 am

Post » Tue Mar 29, 2011 11:01 pm

Thanks Ulrim!

I have applied the patches to Oblivion - Meshes BSA and tried it. Everything works! I ran from Anvil to Skingrad and around both without problems! :)

Also worth mentioning is how good is this because of short time required to patch the files! :)
User avatar
Queen Bitch
 
Posts: 3312
Joined: Fri Dec 15, 2006 2:43 pm

Post » Wed Mar 30, 2011 12:20 pm

I can't get this to work properly. I used BSA Commander to unpack all the files into the In folder, unzipped all the patch meshes into the Patch folder, then ran the patcher. I ended up with 19.7 MB of meshes in the Out folder. The log says it did them all, though there are several error messages, like this:

Spoiler
Ready to patch: .\in\meshes\marker_horse.nif
Applying patch: .\patch\meshes\marker_horse.vxdelta3: target window checksum mismatch: XD3_INVALID_INPUT
xdelta3: source file too short: XD3_INVALID_INPUT
xdelta3: source file too short: XD3_INVALID_INPUT
xdelta3: source file too short: XD3_INVALID_INPUT
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT
xdelta3: source file too short: XD3_INVALID_INPUT
xdelta3: source file too short: XD3_INVALID_INPUT
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT
xdelta3: source file too short: XD3_INVALID_INPUT
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT
xdelta3: target window checksum mismatch: XD3_INVALID_INPUT
cdiff
Running xdelta3: .\patcher.exe -f -d -s .\in\meshes\marker_horse.nif .\patch\meshes\marker_horse.vcdiff .\out\meshes\marker_horse.nif


What did I do wrong?
User avatar
Marine x
 
Posts: 3327
Joined: Thu Mar 29, 2007 4:54 am

Post » Tue Mar 29, 2011 9:29 pm

Wait is this different than the other one?

Brain is fired after moving - kinda lost here.
User avatar
Daniel Brown
 
Posts: 3463
Joined: Fri May 04, 2007 11:21 am

Post » Wed Mar 30, 2011 12:17 pm

...
What did I do wrong?


Maybe you have different version of the game, or maybe you have edited your 'Oblivion - Meshes.bsa' before?
User avatar
Amy Gibson
 
Posts: 3540
Joined: Wed Oct 04, 2006 2:11 pm

Post » Wed Mar 30, 2011 6:14 am

Awesome, will there be a binary patches for the SI meshes and DLC?
User avatar
Dean Ashcroft
 
Posts: 3566
Joined: Wed Jul 25, 2007 1:20 am

Post » Wed Mar 30, 2011 3:47 am

Maybe you have different version of the game, or maybe you have edited your 'Oblivion - Meshes.bsa' before?

Different version, as in the GOTY? No - mine's the base version. And no, I didn't mess with my BSA either.
User avatar
Anthony Diaz
 
Posts: 3474
Joined: Thu Aug 09, 2007 11:24 pm

Post » Wed Mar 30, 2011 4:26 am

Would this be compatible with the GOTY version but it just doesn't patch the SI and DLC meshes or is GOTY Oblivion as a whole incompatible with your binary patch?

Edit:

I'm specifically talking about the patch ulrim has on the nexus page for the Binary Patch Kit:

BinPatchKit Oblivion Meshes PyFFI219b6
Oblivion - Meshes.bsa patch kit optimized with PyFFI 2.1.9 beta 6. For the regular edition - Not GOTY

Edit2:

Looks like they are different after all. I compared my Oblivion - Meshes.bsa MD5 and SH-1:

MD5: 284E8841D500E79B3EB395834C0A32E8
SH-1: 0C1093C7482423A8E26DE830BDC10CB40DE6C169

to vanilla bsa MD5 and SH-1 given here http://www.tesnexus.com/downloads/file.php?id=36882 and they don't match :(

So if anyone out there would like to make a pyffi patch of Oblivion - Meshes.bsa GOTY edition...
User avatar
christelle047
 
Posts: 3407
Joined: Mon Apr 09, 2007 12:50 pm

Post » Tue Mar 29, 2011 11:20 pm

I feel like the answer to this should be obvious, but I'm missing it.

The patch has around 7k files. My out folder has the same exact number. My in folder has closer to 20k files. Now this is fine. I figure part of the point of a patch kit is to help me avoid the meshes that shouldn't be PyFFIed. But I can't move any files because it will kill the leading spaces. If it's not safe to merge my in and out folders, how do I rebuild my BSA?
User avatar
Rob Smith
 
Posts: 3424
Joined: Wed Oct 03, 2007 5:30 pm


Return to IV - Oblivion