Last active
January 18, 2026 23:34
-
-
Save shmerl/34efee526ea405b718d5f058f31354c6 to your computer and use it in GitHub Desktop.
Various fixes for GOG version of Deus Ex: Human Revolution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Based on https://www.nexusmods.com/deusexhumanrevolution/mods/28 (thanks to LightPower1) | |
| # | |
| # Simplified for use on Linux. | |
| # | |
| # Supports a subset of tweaks and fixes which can be turned off like this: | |
| # | |
| # fov_increase=false gog_deus_ex_human_revolution_fixes.sh <path_to_game>/DXHRDC.exe | |
| # | |
| # For full list of possible fixes, see mod's source files | |
| # | |
| fov_increase=${fov_increase:-true} | |
| no_intros=${no_intros:-true} | |
| skip_cutscenes=${skip_cutscenes:-true} # allow skipping more cutscenes | |
| fix_exit=${fix_exit:-true} | |
| no_telemetry=${no_telemetry:-true} | |
| gog_ver_sha256='509409e94ddc0585e2c17b6bd289bb1440a20ea9aebe6865c24163d2ad6bceeb' | |
| game_binary="$1" | |
| current_sha256=$(sha256sum "$game_binary" | cut -d ' ' -f 1) | |
| if [[ "$current_sha256" != "$gog_ver_sha256" ]]; then | |
| echo "You have incorrect version! Aborting." | |
| exit 1 | |
| fi | |
| function binary_patch() | |
| { | |
| local offset="$1" | |
| local patch="$2" | |
| local target="$3" | |
| echo "patching ${target} at ${offset}..." | |
| echo "${offset}: ${patch}" | xxd -r - "$target" | |
| } | |
| if $fov_increase; then | |
| binary_patch "667043" "6e" "$game_binary" | |
| binary_patch "3de612" "6e" "$game_binary" | |
| binary_patch "3de61a" "08" "$game_binary" | |
| fi | |
| if $no_intros; then | |
| binary_patch "2323e5" "90 90" "$game_binary" | |
| fi | |
| if $skip_cutscenes; then | |
| binary_patch "3dab98" "24" "$game_binary" | |
| fi | |
| if $fix_exit; then | |
| binary_patch "3f2d69" "90 90 90 90 90 90 90" "$game_binary" | |
| fi | |
| if $no_telemetry; then | |
| binary_patch "eb096" "eb" "$game_binary" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment