Merge pull request #41 from IvarWithoutBones/disable-rune-loss

Disable rune loss upon death
This commit is contained in:
gurrgur 2022-09-11 14:39:54 +02:00 committed by GitHub
commit 32586d3264
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 14 deletions

View file

@ -24,11 +24,12 @@ Note: There might be some distros (e.g. older Ubuntu releases) that launch pytho
## Features
| Argument | Description |
| --------------------------------------- | ------------------------------------------------------------------------------- |
| --------------------------------------- | --------------------------------------------------------------------------------------------------------- |
| `-r RATE` or `--rate RATE` | Set a custom framerate limit (default: 60). |
| `--with-eac` | Run game with EAC (Use it at your own risk) |
| `--fix-camera` | Disable camera auto-rotation. |
| `--all` | Enable all options except `--rate` and<br>gameplay changes like `--fix-camera`. |
| `--disable-rune-loss` | Disable losing runes upon death. |
| `--all` | Enable all options except `--rate` and<br>gameplay changes like `--fix-camera` and `--disable-rune-loss`. |
| `-u` or `--ultrawide` | Remove black bars. |
| `-v` or `--disable-vigniette` | Remove the vigniette overlay . |
| `-c` or `--disable-ca` | Disable chromatic abberation. |
@ -58,4 +59,6 @@ When the game is launched through steam, the tool creates a patched version of `
- vigniette and ca removal
- animation distance increase
- [DarkSouls3RemoveIntroScreens](https://github.com/bladecoding/DarkSouls3RemoveIntroScreens): intro logo skip
- [EldenRingMods](https://github.com/techiew/EldenRingMods) + [EldenRingFpsUnlockAndMore](https://github.com/uberhalit/EldenRingFpsUnlockAndMore): camera fix
- [EldenRingMods](https://github.com/techiew/EldenRingMods) + [EldenRingFpsUnlockAndMore](https://github.com/uberhalit/EldenRingFpsUnlockAndMore)
- camera fix
- disable rune loss

View file

@ -18,8 +18,9 @@ if __name__ == "__main__":
parser.add_argument("-r", "--rate", type=int, default=60, help="Modify the frame rate limit (e.g. 30, 120, 165 or whatever).")
parser.add_argument("--with-eac", action='store_true', help="Run game with EAC (Use at own your risk)")
parser.add_argument("--disable-rune-loss", action='store_true', help="Disable losing runes upon death.")
parser.add_argument("--fix-camera", action='store_true', help="Disable camera auto-rotation.")
parser.add_argument("--all", action='store_true', help="Enable all options except rate adjustment and gamplay changes like `--fix-camera`.")
parser.add_argument("--all", action='store_true', help="Enable all options except rate adjustment and gamplay changes like `--fix-camera` and `--disable-rune-loss`.")
parser.add_argument("-u", "--ultrawide", action='store_true', help="Removes black bars when using a resolution with an aspect ratio other than 16:9.")
parser.add_argument("-v", "--disable-vigniette", action='store_true', help="Disables the vigniette overlay.")
parser.add_argument("-c", "--disable-ca", action='store_true', help="Disables chromatic abberation.")
@ -50,6 +51,15 @@ if __name__ == "__main__":
else:
print("er-patcher: fix_camera pattern scan failed")
if patch.disable_rune_loss:
rl_pattern = "b0 01 .. 8b .. e8 .. .. .. .. .. 8b .. .. .. 32 c0 .. 83 .. 28 c3".replace(" ", "")
if (res := re.search(rl_pattern, exe_hex)) is not None:
rl_addr = res.span()[0] + 6
rl_patch = "90 90 90 90 90".replace(" ", "") # NOP
exe_hex = exe_hex[:rl_addr] + rl_patch + exe_hex[rl_addr + len(rl_patch):]
else:
print("er-patcher: disable rune loss pattern scan failed")
if patch.ultrawide or patch.all:
uw_pattern = "74 4f 45 8b 94 cc".replace(" ", "")
if (res := re.search(uw_pattern, exe_hex)) is not None: