Skip to content
Permalink
Browse files

Usability improvements when required files are not present & added mo…

…re information to the online README.md file
  • Loading branch information...
agb1 committed Dec 14, 2016
1 parent 8fecc98 commit 1107fd3b646d3266f79b915e312e645fb47f02c5
Showing with 126 additions and 33 deletions.
  1. +2 −0 BiG World Fixpack.bat
  2. +14 −4 README.md
  3. +37 −1 _ApplyPatches.bat
  4. +21 −22 _ApplyPatches.tp2
  5. +38 −2 _CreatePatches.bat
  6. +14 −4 readme.md
@@ -1,6 +1,8 @@
IF NOT EXIST "_ApplyPatches.bat" echo "This script is legacy code and has been replaced by the newer _ApplyPatches script. Please copy that script (_ApplyPatches.tp2 and _ApplyPatches.bat) into your game folder and run it instead (after unpacking all of the mods you plan to install, so it can determine if additional compatibility patches are needed)."
IF NOT EXIST "_ApplyPatches.bat" pause

IF NOT EXIST "_ApplyPatches.tp2" echo "This script is legacy code and has been replaced by the newer _ApplyPatches script. Please copy that script (_ApplyPatches.tp2 and _ApplyPatches.bat) into your game folder and run it instead (after unpacking all of the mods you plan to install, so it can determine if additional compatibility patches are needed)."
IF NOT EXIST "_ApplyPatches.tp2" pause

Call "_ApplyPatches.bat"

@@ -6,14 +6,24 @@ This is a community project; you are welcome to fork this repository and contrib

Click [here](https://github.com/BiGWorldProject/BiG-World-Fixpack/archive/master.zip) to download the latest version.

# Usage
# Enhanced Edition Trilogy (EET) Patches Are Included

See http://gibberlings3.net/forums/index.php?showtopic=27741&page=33#entry248962 for details. These patches make all of the EET-compatible mods also compatible with Enhanced Edition games without EET.

# Usage when installing mods manually

The BiG World Fixpack has a WeiDU-based cross-platform install script (Windows: run _ApplyPatches.bat, OSX/Linux/other: run weidu _ApplyPatches.tp2) and will validate each patch before applying it by checking the VERSION of the target mod in your game folder and comparing it to the VERSION in the Fixpack patches. If there is a mismatch, it will pause and ask you whether you want to patch anyway or skip that mod. It is also safe to run the WeiDU Fixpack script multiple times, because it will skip mods that have already been patched.
The Fixpack is different from other WeiDU patches because it does not modify content in the game directly: instead, it modifies specific files in each unpacked mod folder in your game directory, which will affect what those mods do to the game when you run their individual installers later. For example, the Fixpack patches WeiDU .baf script and .D dialogue and .tra translation files before they are compiled into the game. This type of patching has no effect on any mods that have already been installed, so only run the "setup-modname.exe" (or weidu installer equivalent for OSX/Linux/other) for a mod after running the Fixpack script (so: unpack a mod, run the Fixpack script, then at some later time run the mod's own installer).
If you use the Windows-only [BiG World Setup](https://forums.beamdog.com/discussion/44476/tool-big-world-setup-bws-mod-manager-for-baldurs-gate-enhanced-edition-trilogy-for-windows/p1) automated mod installation tool, this BiG World Fixpack will be downloaded and installed for you automatically.
NOTE: On Linux, before applying these patches, due to case sensitivity, you must either place all of the game and mod files in a case-insensitive filesystem partition or use ciopfs (case-insensitive on-purpose file-system) as a workaround. Note that if you use ciopfs, you must also recursively convert all filenames in the game directory to lowercase (e.g., using a tolower command as in https://linuxconfig.org/rename-all-files-from-uppercase-to-lowercase-characters), as that command works by converting all paths accessed on the file system to lowercase, therefore ignoring any filenames containing uppercase letters. Since the game itself contains hard-coded paths to files that include upper-case letters, you will also need to launch the game inside ciopfs or convert all filenames back to their original case after installing all patches and mods. Also note that if some patches fail due to mismatched line endings, you can run the dos2unix utility on the patch files to convert CRLF (Windows-style line endings) to LF (Linux-style line endings). Patch failures will be logged in the _ApplyPatches.debug file, and .rej (reject) files will be created in the same folder as each file that could not be patched successfully.
# Enhanced Edition Trilogy (EET) Patches Are Included
# Usage with BiG World Setup or BiG World Project (not the same!)
See http://gibberlings3.net/forums/index.php?showtopic=27741&page=33#entry248962 for details. These patches make all of the EET-compatible mods also compatible with Enhanced Edition games without EET.
If you use the Windows-only [BiG World Setup](https://forums.beamdog.com/discussion/44476/tool-big-world-setup-bws-mod-manager-for-baldurs-gate-enhanced-edition-trilogy-for-windows/p1) mod selection and automated download+extract+installation tool, this BiG World Fixpack will be downloaded automatically and applied to all of the mods you selected without requiring you to take any manual action.
Indeed, you should not manually apply any hotfixes or patches to any mods until at least after the automated BiG World Fixpack patching at the beginning of the installation process has completed. Any manual changes to mod files can cause the automated patching to fail, possibly resulting in partial/incomplete patching.
If you want to edit mod files manually when using BWS, after Fixpack patching, one option is to use the 'OverwriteFiles' advanced feature of BWS to supply your own replacement copies of certain files, which BWS will automatically copy into the game folder for you; alternatively, you can configure BWS to pause (via right-click during the mod/component selection phase) before installing the particular mods you want to modify manually, and then at any time after the Fixpack patching is done you can make whatever additional changes you want.
If you use the Windows-only [BiG World Project](https://kerzenburg.baldurs-gate.eu/downloads.php?cat=10) command-line automated installation scripts, you may wish to download the Fixpack from this page rather than the from the BWP link. The BWP author (Leonardo Watson) prefers to release snapshot versions of the Fixpack periodically and does not contribute directly to this repository, so shortly after each BWP release there may be some newer fixes available from the BWP version of the Fixpack, but such fixes are generally incorporated into this repository within a day or two.
@@ -1,4 +1,40 @@
:: Run this in the same folder as _ApplyPatches.tp2 and WeiDU.exe (not included) - usually your game folder, but could be elsewhere
:: Run this in the same directory as _ApplyPatches.tp2 and WeiDU.exe and the BiG World Fixpack folder - usually your game folder, but could be elsewhere

@echo off
SETLOCAL
cd /d %~dp0

SET helpmsg=This .bat file, the latest WeiDU.exe (included with this Fixpack or available from www.weidu.org/~thebigg/weidu.exe), the _ApplyPatches.tp2 file and the BiG World Fixpack folder must be placed in the same directory (usually that would be your game directory, although it does not have to be), before running this script.
SET helpmsg2=The unpacked mod folders that you want to patch (along with any tp2 files in the mod package that were not inside the mod folder itself, such as a setup-modname.tp2 file) must be placed in that same directory also, before running this script.
SET helpmsg3=Note that you can use a free tool like 7zip (http://www.7-zip.org/download.html) or any similar utility to unpack mods that are distributed in exe format (they are really just zip files wrapped in a self-extracting install script, so tools like 7zip can unpack them just like zip files).

IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" echo %helpmsg%
IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" echo %helpmsg2%
IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" echo %helpmsg3%
IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" pause

IF NOT EXIST "_ApplyPatches.tp2" echo.
IF NOT EXIST "_ApplyPatches.tp2" echo %helpmsg%
IF NOT EXIST "_ApplyPatches.tp2" echo.
IF NOT EXIST "_ApplyPatches.tp2" echo %helpmsg2%
IF NOT EXIST "_ApplyPatches.tp2" echo.
IF NOT EXIST "_ApplyPatches.tp2" echo %helpmsg3%
IF NOT EXIST "_ApplyPatches.tp2" echo.
IF NOT EXIST "_ApplyPatches.tp2" pause

IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo.
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo %helpmsg%
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo.
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo %helpmsg2%
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo.
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo %helpmsg3%
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" echo.
IF NOT EXIST "BiG World Fixpack" IF NOT EXIST "BiG_World_Fixpack" pause

weidu --nogame --no-exit-pause --logapp --log _ApplyPatches.debug _ApplyPatches.tp2

IF NOT EXIST "BiG World Installpack\BiG World Smoothpack" pause
@@ -48,7 +48,7 @@
BACKUP ~BWP_Fixpack/backup~ // not the same folder as the one containing Fixpack patches
AUTHOR ~agb1 on shsforums.net, gibberlings3.net or forums.beamdog.com~

VERSION ~v2.3~
VERSION ~v2.4~

ALWAYS
// special folders and marker file
@@ -92,7 +92,7 @@ ALWAYS
STR_VAR
msg_file_path = ~~
BEGIN
ACTION_IF %INTERACTIVE% THEN BEGIN
ACTION_IF INTERACTIVE THEN BEGIN
PRINT ~~
AT_NOW ~%DISPLAY_FILE_CMD% %msg_file_path%~
PRINT ~~
@@ -106,31 +106,29 @@ ALWAYS
DEFINE_ACTION_FUNCTION ~checks~
BEGIN
ACTION_IF (NOT DIRECTORY_EXISTS ~%MESSAGES%~) THEN BEGIN
PRINT ~~
PRINT ~Can't locate the directory "%MESSAGES%".~
PRINT ~Make sure the Fixpack resides in the current directory~
PRINT ~~
PRINT ~Das Verzeichnis "%MESSAGES%" konnnte nicht gefunden werden.~
PRINT ~Es ist f�r die Installation zwingend erforderlich~
PRINT ~und muss im aktuellen Verzeichnis vorhanden sein.~
PRINT ~~
PRINT ~Ne trouve pas le repertoire "%MESSAGES%".~
PRINT ~Assurez-vous qu'il se trouve dans le repertoire actuel.~
PRINT ~~
PRINT ~No se puede localizar el directorio "%MESSAGES%".~
PRINT ~Es necesario para la instalacion y debe estar en el~
PRINT ~directorio actual.~
PRINT ~~
FAIL ~Missing Fixpack Sub-Folder~
PRINT "%WNL%%WNL%" ^
"Can't locate the directory '%MESSAGES%'.%WNL%" ^
"Make sure the Fixpack folder resides in the current directory.%WNL%" ^
"The latest WeiDU (from www.weidu.org/~thebigg) is also required.%WNL%" ^
"%WNL%%WNL%" ^
"Das Verzeichnis '%MESSAGES%' konnnte nicht gefunden werden.%WNL%" ^
"Es ist f�r die Installation zwingend erforderlich%WNL%" ^
"und muss im aktuellen Verzeichnis vorhanden sein.%WNL%" ^
"%WNL%%WNL%" ^
"Ne trouve pas le repertoire '%MESSAGES%'.%WNL%" ^
"Assurez-vous qu'il se trouve dans le repertoire actuel.%WNL%" ^
"%WNL%%WNL%" ^
"No se puede localizar el directorio '%MESSAGES%'.%WNL%" ^
"Es necesario para la instalacion y debe estar en el directorio actual.%WNL%%WNL%"
PRINT ~Press any key to continue...~
ACTION_READLN ~pause~
FAIL ~Missing Required 'BiG World Fixpack' Folder~
END

ACTION_IF (NOT FILE_EXISTS ~%INSTALL_MARKER%~) THEN BEGIN // create empty installation marker file
<<<<<<<< .../BiG_World_Fixpack-inlined/%INSTALL_MARKER%
>>>>>>>>
COPY ~.../BiG_World_Fixpack-inlined/%INSTALL_MARKER%~ ~%INSTALL_MARKER%~
// END ELSE BEGIN
// LAF ~show_message~ STR_VAR msg_file_path = EVAL ~%os_quote%%MESSAGES%%os_slash%previous_install.txt%os_quote%~ END
// FAIL ~Previous Installation Marker File Found~
END
END

@@ -454,10 +452,11 @@ ALWAYS
END
END // ALWAYS

BEGIN ~Apply Patches To Unpacked Mod Folders In Game Directory~ INSTALL_BY_DEFAULT NO_LOG_RECORD
BEGIN ~Apply Patches To Unpacked Mod Folders In Current Directory~ INSTALL_BY_DEFAULT NO_LOG_RECORD

LAUNCH_ACTION_FUNCTION ~checks~ END
LAUNCH_ACTION_FUNCTION ~show_message~ STR_VAR msg_file_path = EVAL ~%os_quote%%MESSAGES%%os_slash%header.txt%os_quote%~ END
LAUNCH_ACTION_FUNCTION ~show_message~ STR_VAR msg_file_path = EVAL ~%os_quote%%MESSAGES%%os_slash%start.txt%os_quote%~ END
LAUNCH_ACTION_FUNCTION ~process_mod_folders~ END
LAUNCH_ACTION_FUNCTION ~show_message~ STR_VAR msg_file_path = EVAL ~%os_quote%%MESSAGES%%os_slash%end.txt%os_quote%~ END

@@ -1,4 +1,40 @@
:: Run this in the same folder as _CreatePatches.tp2 and WeiDU.exe (not included) - usually your game folder, but could be elsewhere
:: Run this in the same directory as _CreatePatches.tp2 and WeiDU.exe and the BiG World Fixpack folder - usually your game folder, but could be elsewhere

@echo off
SETLOCAL
cd /d %~dp0
weidu --nogame --log _CreatePatches.debug _CreatePatches.tp2

SET helpmsg=This .bat file, the latest WeiDU.exe (included with this Fixpack or available from www.weidu.org/~thebigg/weidu.exe) and the _CreatePatches.tp2 file must be placed in the same directory (usually that would be your game directory, although it does not have to be), before running this script.
SET helpmsg2=The mod folders for which you want to generate patches (along with any tp2 files in the mod package that were not inside the mod folder itself, such as a setup-modname.tp2 file) must be placed in that same directory also, before running this script. Original (pre-patch) copies of those same mods must be placed in a new folder named _ORIGINALS. This script will compare the mod files in subfolders of the local directory to the mod files in subfolders of the _ORIGINALS directory and produce patches reflecting any differences.
SET helpmsg3=This script is primarily for contributors to the BiG World Fixpack, so if your goal is to apply existing Fixpack patches rather than to create new patches of your own, please use the other script (_ApplyPatches) instead of this one.

IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" echo %helpmsg%
IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" echo %helpmsg2%
IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" echo %helpmsg3%
IF NOT EXIST "weidu.exe" echo.
IF NOT EXIST "weidu.exe" pause

IF NOT EXIST "_CreatePatches.tp2" echo.
IF NOT EXIST "_CreatePatches.tp2" echo %helpmsg%
IF NOT EXIST "_CreatePatches.tp2" echo.
IF NOT EXIST "_CreatePatches.tp2" echo %helpmsg2%
IF NOT EXIST "_CreatePatches.tp2" echo.
IF NOT EXIST "_CreatePatches.tp2" echo %helpmsg3%
IF NOT EXIST "_CreatePatches.tp2" echo.
IF NOT EXIST "_CreatePatches.tp2" pause

IF NOT EXIST "_ORIGINALS" echo.
IF NOT EXIST "_ORIGINALS" echo %helpmsg%
IF NOT EXIST "_ORIGINALS" echo.
IF NOT EXIST "_ORIGINALS" echo %helpmsg2%
IF NOT EXIST "_ORIGINALS" echo.
IF NOT EXIST "_ORIGINALS" echo %helpmsg3%
IF NOT EXIST "_ORIGINALS" echo.
IF NOT EXIST "_ORIGINALS" pause

weidu --nogame --no-exit-pause --logapp --log _CreatePatches.debug _CreatePatches.tp2

IF NOT EXIST "BiG World Installpack\BiG World Smoothpack" pause

0 comments on commit 1107fd3

Please sign in to comment.
You can’t perform that action at this time.