XCOM: Enemy Unknown
0 of 0

File information

Last updated

Original upload

Created by

Dubiousintent

Uploaded by

dubiousintent

Virus scan

Safe to use

Documentation

Readme

View as plain text

EXEPatcher Script

Version 1.0
Author: Dubiousintent

This is a Windows CMD file script that utilizes the open source package "bspatch" to apply a patch file (created with the companion program "bsdiff") to the XComGame.EXE file. It turns the orginal game file into a backup (XComGame.exe.bak), and the patched version becomes the executable. It can be installed anywhere, but the patch file MUST be placed in the same location as the game executable.

The included patch file(s) will apply the "Disabling Hash checks" and "Enabling INI loading" mods to a Steam XCOM game as described [http://wiki.tesnexus.com/index.php/Basic_Guide_to_installing_mods#Recent_Discoveries here]. See the History section for which of these patch files applies to which game patch version of the executable.

Requires:
"bsdiff" package, available [http://sites.inka.de/tesla/f_others.html#bsdiff]. This is free/open source. It is not included here.

The "bsdiff" package may be installed anywhere, but if the "bspatch.exe" file (which is included in that package) is not found in either the "Steam\steamapps\common\XCom-Enemy-Unknown" or the ".\Binaries\Win32" subfolder, the script should be modified to point to it's location. There is a variable defined near the top of the script (diffpath) just for this purpose. As the "bsdiff package" does not make any registry entries when it is installed, it is not possible to determine where you have installed it otherwise.

Please note that you can manually do everything this script does yourself, if all the components are present in the same location. The primary advantage of the script is that it can be used with components in various locations, and will alert you if you are missing the required Patch_File parameter, and saves including all the paths on the commandline.

The script utilizes WMIC (if available; it's part of the WMI toolset included in Windows versions from XP Professional onwards) to retrieve the XCOM install folder. If WMIC is not available, it relies upon the value of a variable defined near the top of the script (exepath) just for this purpose. This might also need modifying by you. All the defined variables are checked for validity first.

A script file was chosen to implement this patch mechanism because it is an easily modified tool for anyone's Windows environment and any game, and permits the components (except the patch file itself) to be installed anywhere. Only variables defined at the beginning of the script should require altering. It is called with a single command line parameter which consists of the name of the Patch_File created by "bsdiff", and that filename can take any form. (For example: "EXEPatcher.cmd XComGame_Patch_20130711-233432") It is recommended you create a "shortcut" to the script with the name of the Patch_File as a parameter as the easiest method to apply the patch. More shortcuts can be used with different Patch_File parameters as required. With simple adjustments to the variables it can be used in a similar manner to patch any executable.

Installation:
Obtain and install bsdiff package to any location.
Unpack the archive to any location. Move/copy the patch file [XComGame_Patch_20130711-233432] to the same folder as the game executable (i.e. "Steam\steamapps\common\XCom-Enemy-Unknown\Binaries\Win32").

Uninstallation:
Move/delete the patch file [XComGame_Patch_20130711-233432] from the executable folder.
Remove the "EXEPatcher.cmd" file from the installation folder.


Known incompatibilities:
None known.

History:
v1.0 XComGame_Patch_20130711-233432 for XCOM game patched to Patch 4 (dated: 2013-Feb-20, file propeties version: 1.0.0.28586, change 356266)