From 74a02981fb70738c1303311c778fc3e6a0bf395d Mon Sep 17 00:00:00 2001 From: Blade Date: Thu, 10 Mar 2022 11:46:13 -0500 Subject: [PATCH] Support starting elden ring through steam --- READMEs/ELDENRING_README.txt | 22 ++++++++++++------- ...art_eldenringt.bat => start_eldenring.bat} | 0 SoulsSkipIntroScreen/dllmain.cpp | 10 +++++++-- 3 files changed, 22 insertions(+), 10 deletions(-) rename READMEs/{start_eldenringt.bat => start_eldenring.bat} (100%) diff --git a/READMEs/ELDENRING_README.txt b/READMEs/ELDENRING_README.txt index c4ab971..c6feed4 100644 --- a/READMEs/ELDENRING_README.txt +++ b/READMEs/ELDENRING_README.txt @@ -1,27 +1,33 @@ -== Using == +## Using -!!!WARNING!!! Using this mod online will likely get you banned! Before going online you must disable the mod. Disable the mod by deleting dinput8.dll. +!!!WARNING!!! Using this mod online will likely get you banned! Before going online you must disable the mod. Disable the mod by deleting dinput8.dll and don't use start_eldenring.bat to start the game. -start_eldenring.bat has been included to start eldenring in offline mode. +start_eldenring.bat has been included to enable the mod and start eldenring in offline mode. To use the mod, navigate to the eldenring.exe directory and run start_eldenring.bat. +You can use this mod while starting through steam, see below. -== Installing == +## Installing * Extract nologomod.dll and start_eldenring.bat to the eldenring.exe directory. E.g. "C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Game". * Rename start_protected_game.exe to start_protected_game.orig This is so you don't accidentally start the game in online mode with the mod installed -== Uninstalling == +## Uninstalling * Navigate to the eldenring.exe directory and delete dinput8.dll, nologomod.dll and start_eldenring.bat. E.g. "C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Game". * Rename start_protected_game.orig to start_protected_game.exe + +## Starting through steam + * Disable EAC https://wiki.speedsouls.com/eldenring:EAC_Bypass + * Manually rename nologomod.dll to dinput8.dll. dinput8.dll should be put in the directory containing start_protected_game.exe + E.g. "C:\Program Files (x86)\Steam\steamapps\common\ELDEN RING\Game". -== What is this? == +## What is this? The No-Logo mod is a modification for Elden Ring that completely removes the intro logo screens from the game. These are the logos normally shown when first starting Elden Ring and after saving and quitting the game, every time. -== Supported Versions == +## Supported Versions 1.02.3 -== Source == +## Source https://github.com/bladecoding/DarkSouls3RemoveIntroScreens diff --git a/READMEs/start_eldenringt.bat b/READMEs/start_eldenring.bat similarity index 100% rename from READMEs/start_eldenringt.bat rename to READMEs/start_eldenring.bat diff --git a/SoulsSkipIntroScreen/dllmain.cpp b/SoulsSkipIntroScreen/dllmain.cpp index b4d4c70..c106360 100644 --- a/SoulsSkipIntroScreen/dllmain.cpp +++ b/SoulsSkipIntroScreen/dllmain.cpp @@ -75,7 +75,7 @@ GAME DetermineGame() { else if (fileName == "sekiro.exe") { return GAME::SEKIRO; } - else if (fileName == "eldenring.exe") { + else if (fileName == "eldenring.exe" || fileName == "start_protected_game.exe") { return GAME::ELDENRING; } else { @@ -175,6 +175,7 @@ void ApplySekiroPatches() { } void ApplyEldenRingPatches() { + bool patch_applied = false; Patch patches[] = { //1.02.3 Patch{ 0xAAAF1A, 2, { static_cast(0x90), static_cast(0x90) }, @@ -192,8 +193,13 @@ void ApplyEldenRingPatches() { VirtualProtect(addr, size, PAGE_EXECUTE_READWRITE, &old); memcpy(addr, patch.patch, size); VirtualProtect(addr, size, old, &old); + patch_applied = true; } } + + if (!patch_applied) { + MessageBoxA(0, "Unable to apply patch to elden ring. You may be running an unsupported version.", "", 0); + } } DWORD64 __cdecl onSteamInit() { @@ -233,7 +239,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, case DLL_PROCESS_ATTACH: Game = DetermineGame(); if (Game == GAME::UNKNOWN) { - MessageBoxA(0, "Unable to determine game. Valid EXEs are darksouls.exe, darksoulsiii.exe and sekiro.exe", "", 0); + MessageBoxA(0, "Unable to determine game. Valid EXEs are darksouls.exe, darksoulsiii.exe, sekiro.exe, elden_ring.exe and start_protected_game.exe", "", 0); break; }