Skip to content

Commit 43e2393

Browse files
committed
Added new "Fully Unlocked" mode to Assassin's Creed Shadows, that patches a few extra pieces of code in a way that the setting cannot be turned off without restarting the game.
1 parent 002c4e9 commit 43e2393

4 files changed

Lines changed: 105 additions & 14 deletions

File tree

CHANGELOG.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
25.3.25.1
1+
25.3.25.2
2+
=========
3+
+ Added new "Fully Unlocked" mode to Assassin's Creed Shadows, that patches
4+
a few extra pieces of code in a way that the setting cannot be turned
5+
off without restarting the game.
6+
7+
* In exchange for having to restart the game to switch modes, performance
8+
is better than the basic unlock setting.
9+
10+
+ Turned the "FMV Playing" indicator into an option (disabled by default now).
11+
12+
13+
25.3.25.1
214
=========
315
+ Added warning when launching Special K for the first time and PresentMon
416
related user permissions are preventing AutoVRR from working.

include/SpecialK/DLL_VERSION.H

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
#define SK_YEAR 25
44
#define SK_MONTH 3
55
#define SK_DATE 25
6-
#define SK_REV_N 1
7-
#define SK_REV 1
6+
#define SK_REV_N 2
7+
#define SK_REV 2
88

99
#ifndef _A2
1010
#define _A2(a) #a

src/config.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3397,6 +3397,9 @@ auto DeclKeybind =
33973397
config.nvidia.dlss.allow_flip_metering = true;
33983398
config.compatibility.disallow_ll_keyhook = true;
33993399
config.nvidia.dlss.disable_ota_updates = true;
3400+
// Address issues caused by Steam Input
3401+
config.input.gamepad.dinput.
3402+
blackout_gamepads = true;
34003403

34013404
// Delay the application of framerate patch in case other mods are
34023405
// doing the same thing...

src/plugins/unclassified.cpp

Lines changed: 87 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,12 +1812,16 @@ SK_EnderLilies_InitPlugIn (void)
18121812
#include <SpecialK/nvapi.h>
18131813

18141814
bool __SK_ACS_IsMultiFrameCapable = false;
1815-
bool __SK_ACS_AlwaysUseFrameGen = true;
1816-
bool __SK_ACS_UncapFramerate = true;
1817-
int __SK_ACS_DLSSG_MultiFrameCount = 1;
1815+
bool __SK_ACS_AlwaysUseFrameGen = true;
1816+
bool __SK_ACS_ShowFMVIndicator = false;
1817+
bool __SK_ACS_UncapFramerate = true;
1818+
bool __SK_ACS_UncapFramerateFully = true;
1819+
int __SK_ACS_DLSSG_MultiFrameCount = 1;
18181820

18191821
sk::ParameterBool* _SK_ACS_AlwaysUseFrameGen;
1822+
sk::ParameterBool* _SK_ACS_ShowFMVIndicator;
18201823
sk::ParameterBool* _SK_ACS_UncapFramerate;
1824+
sk::ParameterBool* _SK_ACS_UncapFramerateFully;
18211825
sk::ParameterInt* _SK_ACS_DLSSG_MultiFrameCount;
18221826

18231827
using slGetPluginFunction_pfn = void* (*)(const char* functionName);
@@ -1979,6 +1983,18 @@ SK_ACS_PlugInCfg (void)
19791983
ImGui::EndTooltip ();
19801984
}
19811985

1986+
if (__SK_ACS_AlwaysUseFrameGen)
1987+
{
1988+
ImGui::SameLine ();
1989+
1990+
if (ImGui::Checkbox ("Identify FMVs", &__SK_ACS_ShowFMVIndicator))
1991+
{ _SK_ACS_ShowFMVIndicator->store (__SK_ACS_ShowFMVIndicator);
1992+
changed = true;
1993+
}
1994+
1995+
ImGui::SetItemTooltip ("Identify when cutscenes are running at low framerate because they are pre-rendered.");
1996+
}
1997+
19821998
if (__SK_HasDLSSGStatusSupport)
19831999
{
19842000
static bool has_used_dlssg = __SK_IsDLSSGActive;
@@ -2027,6 +2043,10 @@ SK_ACS_PlugInCfg (void)
20272043
static float last_game_fps_limit = __target_fps;
20282044
float y_pos = ImGui::GetCursorPosY ();
20292045

2046+
if (__SK_ACS_UncapFramerateFully) // Implicit relation
2047+
__SK_ACS_UncapFramerate = true;
2048+
2049+
ImGui::BeginDisabled ( __SK_ACS_UncapFramerateFully);
20302050
if (ImGui::Checkbox ("Uncap Framerate", &__SK_ACS_UncapFramerate))
20312051
{
20322052
changed = true;
@@ -2039,6 +2059,7 @@ SK_ACS_PlugInCfg (void)
20392059
last_game_fps_limit;
20402060
}
20412061
}
2062+
ImGui::EndDisabled ();
20422063

20432064
if (ImGui::BeginItemTooltip ())
20442065
{
@@ -2048,6 +2069,29 @@ SK_ACS_PlugInCfg (void)
20482069
ImGui::EndTooltip ();
20492070
}
20502071

2072+
if (__SK_ACS_UncapFramerate)
2073+
{
2074+
ImGui::TreePush ("");
2075+
if (ImGui::Checkbox ("Fully Unlock Framerate", &__SK_ACS_UncapFramerateFully))
2076+
{
2077+
restart_required = true;
2078+
2079+
_SK_ACS_UncapFramerateFully->store (__SK_ACS_UncapFramerateFully);
2080+
2081+
changed = true;
2082+
}
2083+
2084+
if (ImGui::BeginItemTooltip ())
2085+
{
2086+
ImGui::TextUnformatted ("Prevent the Game From Making Changes to Framerate");
2087+
ImGui::Separator ();
2088+
ImGui::BulletText ("This is like the Menu/Cutscene Uncap, but it cannot be turned off without restarting the game.");
2089+
ImGui::BulletText ("This mode offers the best uncapped framerate experience.");
2090+
ImGui::EndTooltip ();
2091+
}
2092+
ImGui::TreePop ();
2093+
}
2094+
20512095
if (restart_required)
20522096
{
20532097
ImGui::PushStyleColor (ImGuiCol_Text, ImColor::HSV (.3f, .8f, .9f).Value);
@@ -2088,6 +2132,9 @@ SK_ACS_PlugInCfg (void)
20882132
void
20892133
SK_ACS_InitPlugin (void)
20902134
{
2135+
// Address issues caused by Steam Input
2136+
config.input.gamepad.dinput.blackout_gamepads = true;
2137+
20912138
#ifdef _M_AMD64
20922139
static HANDLE hInitThread =
20932140
SK_Thread_CreateEx ([](LPVOID)->DWORD
@@ -2110,11 +2157,21 @@ SK_ACS_InitPlugin (void)
21102157
L"AlwaysUseFrameGen", __SK_ACS_AlwaysUseFrameGen,
21112158
L"Use FrameGen in Cutscenes" );
21122159

2160+
_SK_ACS_ShowFMVIndicator =
2161+
_CreateConfigParameterBool ( L"AssassinsCreed.FrameRate",
2162+
L"ShowFMVIndicator", __SK_ACS_ShowFMVIndicator,
2163+
L"Show an indicator while FMVs are Playing" );
2164+
21132165
_SK_ACS_UncapFramerate =
21142166
_CreateConfigParameterBool ( L"AssassinsCreed.FrameRate",
21152167
L"UncapMenusAndCutscenes", __SK_ACS_UncapFramerate,
21162168
L"Uncap Framerate in Cutscenes" );
21172169

2170+
_SK_ACS_UncapFramerateFully =
2171+
_CreateConfigParameterBool ( L"AssassinsCreed.FrameRate",
2172+
L"UncapFramerateFully", __SK_ACS_UncapFramerateFully,
2173+
L"Uncap Framerate Permanently" );
2174+
21182175
_SK_ACS_DLSSG_MultiFrameCount =
21192176
_CreateConfigParameterInt ( L"AssassinsCreed.FrameRate",
21202177
L"DLSSGMultiFrameCount", __SK_ACS_DLSSG_MultiFrameCount,
@@ -2261,7 +2318,8 @@ SK_ACS_InitPlugin (void)
22612318
float game_limit =
22622319
*framerate_limit;
22632320

2264-
if (__SK_ACS_UncapFramerate)
2321+
if (__SK_ACS_UncapFramerate ||
2322+
__SK_ACS_UncapFramerateFully)
22652323
{
22662324
SK_RunOnce (
22672325
void* const limit_check_addr =
@@ -2272,6 +2330,21 @@ SK_ACS_InitPlugin (void)
22722330
memcpy (limit_check_addr, "\x90\x90", 2);
22732331
VirtualProtect (limit_check_addr, 2, dwOrigProt,
22742332
&dwOrigProt);
2333+
2334+
if (__SK_ACS_UncapFramerateFully)
2335+
{ __SK_ACS_UncapFramerate = true;
2336+
memcpy (limit_store_addr, "\x90\x90\x90\x90\x90\x90\x90\x90", 8);
2337+
VirtualProtect (limit_store_addr, 8, dwOrigProt,
2338+
&dwOrigProt);
2339+
2340+
void* const limit_alt_addr =
2341+
(uint8_t *)img_base_addr+0x178AD29;
2342+
2343+
VirtualProtect (limit_alt_addr, 10, PAGE_EXECUTE_READWRITE, &dwOrigProt);
2344+
memcpy (limit_alt_addr, "\xC7\x46\x28\x00\x00\x80\xBF\x90\x90\x90", 10);
2345+
VirtualProtect (limit_alt_addr, 10, dwOrigProt,
2346+
&dwOrigProt);
2347+
}
22752348
);
22762349
}
22772350

@@ -2351,13 +2424,16 @@ SK_ACS_InitPlugin (void)
23512424

23522425
else if (__SK_ACS_AlwaysUseFrameGen && ReadULongAcquire (&FrameGenDisabledForFMV) != 0 && (pFrameGenEnabled != nullptr && *pFrameGenEnabled == false))
23532426
{
2354-
SK_ImGui_CreateNotification (
2355-
"ACShadows.FMVDecay", SK_ImGui_Toast::Warning, "FMV Playing", nullptr, INFINITE,
2356-
SK_ImGui_Toast::UseDuration |
2357-
SK_ImGui_Toast::ShowCaption |
2358-
SK_ImGui_Toast::ShowNewest |
2359-
SK_ImGui_Toast::Unsilencable |
2360-
SK_ImGui_Toast::DoNotSaveINI );
2427+
if (__SK_ACS_ShowFMVIndicator)
2428+
{
2429+
SK_ImGui_CreateNotification (
2430+
"ACShadows.FMVDecay", SK_ImGui_Toast::Warning, "FMV Playing", nullptr, INFINITE,
2431+
SK_ImGui_Toast::UseDuration |
2432+
SK_ImGui_Toast::ShowCaption |
2433+
SK_ImGui_Toast::ShowNewest |
2434+
SK_ImGui_Toast::Unsilencable |
2435+
SK_ImGui_Toast::DoNotSaveINI );
2436+
}
23612437
}
23622438

23632439
if (__SK_IsDLSSGActive)

0 commit comments

Comments
 (0)