mirror of
https://github.com/uberhalit/SekiroFpsUnlockAndMore.git
synced 2026-06-13 09:57:55 +00:00
added option to disable came reset on lockon
This commit is contained in:
parent
e33a1f97f2
commit
7d6ba33c93
5 changed files with 148 additions and 79 deletions
50
README.md
50
README.md
|
|
@ -1,6 +1,6 @@
|
|||
# Sekiro FPS Unlocker and more
|
||||
|
||||
A small utility to remove frame rate limit, add custom resolutions with 21:9 widescreen support, change field of view (FOV), borderless window mode, display and log stats (OBS), disable camera auto adjust on movement and various game modifications for [Sekiro: Shadows Die Twice](https://www.sekirothegame.com/) written in C#.
|
||||
A small utility to remove frame rate limit, add custom resolutions with 21:9 widescreen support, change field of view (FOV), borderless window mode, display and log stats (OBS), disable automatic camera adjustments and various game modifications for [Sekiro: Shadows Die Twice](https://www.sekirothegame.com/) written in C#.
|
||||
Patches games memory while running, does not modify any game files. Works with every game version (legit steam & oh-not-so-legit), should work with all future updates. Also available on [Nexus Mods](https://www.nexusmods.com/sekiro/mods/13/).
|
||||
|
||||
## Download
|
||||
|
|
@ -14,12 +14,13 @@ Patches games memory while running, does not modify any game files. Works with e
|
|||
|
||||
* does not modify any game files, RAM patches only
|
||||
* works with legit, unmodified steam version as well as with unpacked, not-so-legit versions
|
||||
* GSYNC and FreeSync support even in borderless window mode
|
||||
* G-SYNC and FreeSync support even in borderless window mode
|
||||
* unlock frame rate (remove FPS limit) by setting a new custom limit
|
||||
* add a custom resolution, 21:9 widescreen supported (will overwrite the default 1920x1080 / 1280x720 resolution, HUD limited to 16/9)
|
||||
* add a custom resolution, 21:9 widescreen supported (will overwrite the default 1920x1080 / 1280x720 resolution, HUD limited to 16:9)
|
||||
* increase and decrease field of view (FOV)
|
||||
* set the game to borderless window mode
|
||||
* disable camera auto rotate adjustment on movement (intended for mouse users)
|
||||
* disable centering of camera (cam reset) on lock-on if there is no target
|
||||
* display hidden counters such as death/kill count and optionally log them to file to display in OBS
|
||||
* game modifications
|
||||
* global game speed modifier (increase or decrease)
|
||||
|
|
@ -93,37 +94,42 @@ The game enforces VSYNC and forces 60 Hz in fullscreen even on 144 Hz monitors s
|
|||
### To play the game with GSYNC do these additional steps (Nvidia):
|
||||
1. Under Nvidia Control Panel navigate to `3D Settings -> Manage 3D settings -> Program Settings -> Sekiro`
|
||||
2. Set `Monitor Technology` to `G-SYNC`
|
||||
3. If you want to play in (borderless) window mode you have to set `Vertical sync` to `Off` again as enabling G-SYNC re-enables it, if you play in exclusive fullscreen you can keep VSync on `Application controlled` to help remove frame time stutters ([see here](https://www.blurbusters.com/gsync/gsync101-input-lag-tests-and-settings/15/))
|
||||
4. Make sure that `Preferred refresh rate` is still set to `Highest available`
|
||||
5. [](#)
|
||||
6. If you do not have `Preferred refresh rate` or `Vertical sync` see the guide above on how to use the Nvidia Profile Inspector
|
||||
7. Don't forget to Apply and close Nvidia Control Panel
|
||||
8. Use a 3rd party frame rate limiter like [RTSS](https://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html) and set a frame rate limit just a few fps below your monitor refresh rate, on a 144Hz Monitor use 138
|
||||
9. Start `Sekiro FPS Unlocker and more` and set FPS lock to your monitors refresh rate
|
||||
10. Start the game and set it to Fullscreen
|
||||
11. Enjoy perfectly tearing free variable high refresh rates without VSYNC
|
||||
3. You can keep `Vertical sync` on `Use the 3D application setting` now to help remove frame time stutters ([see here](https://www.blurbusters.com/gsync/gsync101-input-lag-tests-and-settings/15/))
|
||||
1. Make sure that `Preferred refresh rate` is still set to `Highest available`
|
||||
2. [](#)
|
||||
3. If you do not have `Preferred refresh rate` or `Vertical sync` see the guide above on how to use the Nvidia Profile Inspector
|
||||
4. Don't forget to Apply and close Nvidia Control Panel
|
||||
5. Use a 3rd party frame rate limiter like [RTSS](https://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html) and set a frame rate limit just a few fps below your monitor refresh rate, on a 144Hz Monitor use 138
|
||||
6. Start `Sekiro FPS Unlocker and more` and set FPS lock to your monitors refresh rate
|
||||
7. Start the game and set it to Fullscreen
|
||||
8. Enjoy perfectly tearing free variable high refresh rates without VSYNC
|
||||
|
||||
### To add a custom resolution:
|
||||
1. Start the game
|
||||
2. Start `Sekiro FPS Unlocker and more`, set you desired resolution and enable it by ticking the check box
|
||||
3. Set your custom resolution in the graphical settings
|
||||
4. Be aware that your monitor has to natively support this resolution and the ingame HUD will be limited to 16/9
|
||||
3. Select your custom resolution in the graphical settings
|
||||
4. Be aware that your monitor has to natively support this resolution and the ingame HUD will be limited to 16:9
|
||||
|
||||
### To use the FOV changer:
|
||||
1. Start the game
|
||||
2. Load up your save game
|
||||
3. Start `Sekiro FPS Unlocker and more`, set you desired FOV value and enable it by ticking the check box
|
||||
3. Start `Sekiro FPS Unlocker and more`, set you desired FOV value (can be negative) and enable it by ticking the check box
|
||||
|
||||
### To use borderless window mode:
|
||||
1. Start the game
|
||||
2. Go to `Settings -> Graphical settings -> Monitor Mode` and set it to `Windowed`
|
||||
3. Set your resolution
|
||||
4. Start `Sekiro FPS Unlocker and more` and enable borderless window mode
|
||||
5. If you want fullscreen borderless enable `Fullscreen stretch`
|
||||
4. Start `Sekiro FPS Unlocker and more`
|
||||
5. If you want to use a custom resolution make sure you patch and select it now
|
||||
6. Enable borderless window mode
|
||||
7. If you want fullscreen borderless enable `Fullscreen stretch`
|
||||
|
||||
### On 'Disable camera auto rotate on movement':
|
||||
This will completely disable the automatic camera rotation adjustments when you are moving. This is mostly intended for mouse users, enabling it on non-native windows controllers will not work perfectly (some rotation adjustments will be left) and you will temporary lose the ability to slow-tilt (deadzones). Disabling the automatic camera adjustments makes little sense on controllers. If you changed your input device or made a mistake while selecting it simply close the utility, delete the `SekiroFpsUnlockAndMore.xml` file and restart the mod.
|
||||
|
||||
### On 'Disable camera reset on lock-on':
|
||||
You you press your target lok-on key and no target is in sight the game will reset and center your camera position and disable your input while its doing so. Ticking this checkbox will remove this behavior of the game.
|
||||
|
||||
### To display total death/kill counters in OBS:
|
||||
1. Start the game
|
||||
2. Load up your save game
|
||||
|
|
@ -164,7 +170,7 @@ This will completely disable the automatic camera rotation adjustments when you
|
|||
|
||||
## Preview
|
||||
|
||||
[](#)
|
||||
[](#)
|
||||
|
||||
### Unlocked framerate
|
||||
[](#)
|
||||
|
|
@ -203,15 +209,19 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
|
|||
|
||||
* the game has forced VSYNC so unlocking the frame rate when your monitor has 60Hz will do nothing. You'll have to disable VSYNC in Nvidia Control Panel or AMD Radeon Settings first, see Usage
|
||||
* in fullscreen the game forces the monitor to 60 Hz so you'll have to handle this with driver override too, see Usage
|
||||
* your monitor has to support your custom resolution otherwise it won't show up correctly
|
||||
* your monitor has to natively support your custom resolution otherwise it won't show up correctly
|
||||
* due to how the game renders the HUD is limited to 16:9 even on 21:9 resolutions
|
||||
* disabling automatic camera rotation adjustment on movement is intended for mouse users only, using it on a non-native windows controller can disable up-down controls
|
||||
* disabling automatic camera rotation adjustment on movement is intended for mouse users only, using it on a non-native windows controller will disable slow-tolting on sticks
|
||||
* Player speed modification needs a loaded save before it can be activated
|
||||
* Player and game speed modification can potentially crash the game in certain cutscenes and NPC interactions, use with caution
|
||||
* the hotkey won't work if the game runs in exclusive, true fullscreen mode
|
||||
|
||||
## Version History
|
||||
|
||||
* v1.2.2.0 (2019-04-13)
|
||||
* FOV can be set to any value between -95% and +95% now
|
||||
* Adden option to disable camera reset on lock-on if there is no target to lock-on
|
||||
* Fixed an issue with custom resolutions on certain system configurations
|
||||
* v1.2.1.1 (2019-04-09)
|
||||
* Added prompt to let user decide between mouse or controller input
|
||||
* This selection will fix locked up-down controls (pitch) on controllers if 'disable camera auto rotation" is used
|
||||
|
|
|
|||
|
|
@ -139,62 +139,6 @@ namespace SekiroFpsUnlockAndMore
|
|||
internal const float PATCH_FOVSETTING_DISABLE = 0.0174533f; // Rad2Deg -> 1°
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pPlayerStatsRelated to PlayerStats pointer, offset in struct to <int>iPlayerDeaths
|
||||
00000001407AAC92 | 0FB648 7A | movzx ecx,byte ptr ds:[rax+7A] |
|
||||
00000001407AAC96 | 888B F7000000 | mov byte ptr ds:[rbx+F7],cl |
|
||||
00000001407AAC9C | 48:8B05 4DD03903 | mov rax,qword ptr ds:[143B47CF0] |
|
||||
00000001407AACA3 | 8B88 8C000000 | mov ecx,dword ptr ds:[rax+8C] |
|
||||
00000001407AACA9 | 898B F8000000 | mov dword ptr ds:[rbx+F8],ecx |
|
||||
00000001407AACAF | 48:8B05 3AD03903 | mov rax,qword ptr ds:[143B47CF0] | pPlayerStatsRelated->[PlayerStats+0x90]->iPlayerDeaths
|
||||
00000001407AACB6 | 8B88 90000000 | mov ecx,dword ptr ds:[rax+90] | offset pPlayerStats->iPlayerDeaths
|
||||
*/
|
||||
// credits to 'Me_TheCat' for original offset
|
||||
internal const string PATTERN_PLAYER_DEATHS = "0F B6 48 ?? 88 8B ?? ?? 00 00 48 8B 05 ?? ?? ?? ?? 8B 88 ?? ?? 00 00 89 8B ?? ?? 00 00 48 8B 05 ?? ?? ?? ?? 8B 88 ?? ?? 00 00";
|
||||
internal const int PATTERN_PLAYER_DEATHS_OFFSET = 29;
|
||||
internal const int PATTERN_PLAYER_DEATHS_INSTRUCTION_LENGTH = 7;
|
||||
internal const int PATTERN_PLAYER_DEATHS_POINTER_OFFSET_OFFSET = 9;
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pTotalKills to <int>iTotalKills, does not get updated on every kill but mostly on every 2nd, includes own player deaths...
|
||||
0000000141151838 | 48:8D0D A9A5B302 | lea rcx,qword ptr ds:[143C8BDE8] | pTotalKills->iTotalKills
|
||||
000000014115183F | 891481 | mov dword ptr ds:[rcx+rax*4],edx |
|
||||
0000000141151842 | C3 | ret |
|
||||
*/
|
||||
// credits to 'Me_TheCat' for original offset
|
||||
internal const string PATTERN_TOTAL_KILLS = "48 8D 0D ?? ?? ?? ?? 89 14 81 C3";
|
||||
internal const int PATTERN_TOTAL_KILLS_INSTRUCTION_LENGTH = 7;
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pTimeRelated to TimescaleManager pointer, offset in struct to <float>fTimescale which acts as a global speed scale for almost all ingame calculations
|
||||
0000000141149E87 | 48:8B05 3A24B402 | mov rax,qword ptr ds:[143C8C2C8] | pTimeRelated->[TimescaleManager+0x360]->fTimescale
|
||||
0000000141149E8E | F3:0F1088 60030000 | movss xmm1,dword ptr ds:[rax+360] | offset TimescaleManager->fTimescale
|
||||
0000000141149E96 | F3:0F5988 68020000 | mulss xmm1,dword ptr ds:[rax+268] |
|
||||
*/
|
||||
// credits to 'Zullie the Witch' for original offset
|
||||
internal const string PATTERN_TIMESCALE = "48 8B 05 ?? ?? ?? ?? F3 0F 10 88 ?? ?? ?? ?? F3 0F";
|
||||
internal const int PATTERN_TIMESCALE_INSTRUCTION_LENGTH = 7;
|
||||
internal const int PATTERN_TIMESCALE_POINTER_OFFSET_OFFSET = 11;
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pPlayerStructRelated1 to 4 more pointers up to player data class, offset in struct to <float>fTimescalePlayer which acts as a speed scale for the player character
|
||||
00000001406BF1D7 | 48:8B1D 128C4A03 | mov rbx,qword ptr ds:[143B67DF0] | pPlayerStructRelated1->[pPlayerStructRelated2+0x88]->[pPlayerStructRelated3+0x1FF8]->[pPlayerStructRelated4+0x28]->[pPlayerStructRelated5+0xD00]->fTimescalePlayer
|
||||
00000001406BF1DE | 48:85DB | test rbx,rbx |
|
||||
00000001406BF1E1 | 74 3C | je sekiro.1406BF21F |
|
||||
00000001406BF1E3 | 8B17 | mov edx,dword ptr ds:[rdi] |
|
||||
*/
|
||||
// credits to 'Zullie the Witch' for original offset
|
||||
internal const string PATTERN_TIMESCALE_PLAYER = "48 8B 1D ?? ?? ?? ?? 48 85 DB 74 3C 8B 17";
|
||||
internal const int PATTERN_TIMESCALE_PLAYER_INSTRUCTION_LENGTH = 7;
|
||||
internal const int PATTERN_TIMESCALE_POINTER2_OFFSET = 0x88;
|
||||
internal const int PATTERN_TIMESCALE_POINTER3_OFFSET = 0x1FF8;
|
||||
internal const int PATTERN_TIMESCALE_POINTER4_OFFSET = 0x28;
|
||||
internal const int PATTERN_TIMESCALE_POINTER5_OFFSET = 0xD00;
|
||||
|
||||
|
||||
/**
|
||||
Controls camera pitch. xmm4 holds new pitch from a calculation while rps+170 holds current one from mouse so we overwrite xmm4 with the old pitch value
|
||||
000000014073AF26 | 0F29A5 70080000 | movaps xmmword ptr ss:[rbp+870],xmm4 | code inject overwrite from here
|
||||
|
|
@ -259,5 +203,72 @@ namespace SekiroFpsUnlockAndMore
|
|||
0xF3, 0x0F, 0x10, 0x86, 0x74, 0x01, 0x00, 0x00, // movss xmm0,dword ptr ds:[rsi+174]
|
||||
0xF3, 0x0F, 0x11, 0x86, 0x74, 0x01, 0x00, 0x00 // movss dword ptr ds:[rsi+174],xmm0
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
When user presses button to lock on target but no target is in range a camera reset is triggered to center cam position. This boolean indicates if we need to reset or not
|
||||
000000014073AD97 | C686 A3020000 01 | mov byte ptr ds:[rsi+2A3],1 | Sets bool to indicate we need to reset camera and block user input til cam is reset
|
||||
000000014073AD9E | F3:0F108E B4020000 | movss xmm1,dword ptr ds:[rsi+2B4] |
|
||||
*/
|
||||
internal const string PATTERN_CAMRESET_LOCKON = "C6 86 ?? ?? 00 00 ?? F3 0F 10 8E ?? ?? 00 00";
|
||||
internal const int PATTERN_CAMRESET_LOCKON_OFFSET = 6;
|
||||
internal static byte[] PATCH_CAMRESET_LOCKON_DISABLE = new byte[1] { 0x00 }; // FALSE
|
||||
internal static byte[] PATCH_CAMRESET_LOCKON_ENABLE = new byte[1] { 0x01 }; // TRUE
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pPlayerStatsRelated to PlayerStats pointer, offset in struct to <int>iPlayerDeaths
|
||||
00000001407AAC92 | 0FB648 7A | movzx ecx,byte ptr ds:[rax+7A] |
|
||||
00000001407AAC96 | 888B F7000000 | mov byte ptr ds:[rbx+F7],cl |
|
||||
00000001407AAC9C | 48:8B05 4DD03903 | mov rax,qword ptr ds:[143B47CF0] |
|
||||
00000001407AACA3 | 8B88 8C000000 | mov ecx,dword ptr ds:[rax+8C] |
|
||||
00000001407AACA9 | 898B F8000000 | mov dword ptr ds:[rbx+F8],ecx |
|
||||
00000001407AACAF | 48:8B05 3AD03903 | mov rax,qword ptr ds:[143B47CF0] | pPlayerStatsRelated->[PlayerStats+0x90]->iPlayerDeaths
|
||||
00000001407AACB6 | 8B88 90000000 | mov ecx,dword ptr ds:[rax+90] | offset pPlayerStats->iPlayerDeaths
|
||||
*/
|
||||
// credits to 'Me_TheCat' for original offset
|
||||
internal const string PATTERN_PLAYER_DEATHS = "0F B6 48 ?? 88 8B ?? ?? 00 00 48 8B 05 ?? ?? ?? ?? 8B 88 ?? ?? 00 00 89 8B ?? ?? 00 00 48 8B 05 ?? ?? ?? ?? 8B 88 ?? ?? 00 00";
|
||||
internal const int PATTERN_PLAYER_DEATHS_OFFSET = 29;
|
||||
internal const int PATTERN_PLAYER_DEATHS_INSTRUCTION_LENGTH = 7;
|
||||
internal const int PATTERN_PLAYER_DEATHS_POINTER_OFFSET_OFFSET = 9;
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pTotalKills to <int>iTotalKills, does not get updated on every kill but mostly on every 2nd, includes own player deaths...
|
||||
0000000141151838 | 48:8D0D A9A5B302 | lea rcx,qword ptr ds:[143C8BDE8] | pTotalKills->iTotalKills
|
||||
000000014115183F | 891481 | mov dword ptr ds:[rcx+rax*4],edx |
|
||||
0000000141151842 | C3 | ret |
|
||||
*/
|
||||
// credits to 'Me_TheCat' for original offset
|
||||
internal const string PATTERN_TOTAL_KILLS = "48 8D 0D ?? ?? ?? ?? 89 14 81 C3";
|
||||
internal const int PATTERN_TOTAL_KILLS_INSTRUCTION_LENGTH = 7;
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pTimeRelated to TimescaleManager pointer, offset in struct to <float>fTimescale which acts as a global speed scale for almost all ingame calculations
|
||||
0000000141149E87 | 48:8B05 3A24B402 | mov rax,qword ptr ds:[143C8C2C8] | pTimeRelated->[TimescaleManager+0x360]->fTimescale
|
||||
0000000141149E8E | F3:0F1088 60030000 | movss xmm1,dword ptr ds:[rax+360] | offset TimescaleManager->fTimescale
|
||||
0000000141149E96 | F3:0F5988 68020000 | mulss xmm1,dword ptr ds:[rax+268] |
|
||||
*/
|
||||
// credits to 'Zullie the Witch' for original offset
|
||||
internal const string PATTERN_TIMESCALE = "48 8B 05 ?? ?? ?? ?? F3 0F 10 88 ?? ?? ?? ?? F3 0F";
|
||||
internal const int PATTERN_TIMESCALE_INSTRUCTION_LENGTH = 7;
|
||||
internal const int PATTERN_TIMESCALE_POINTER_OFFSET_OFFSET = 11;
|
||||
|
||||
|
||||
/**
|
||||
Reference pointer pPlayerStructRelated1 to 4 more pointers up to player data class, offset in struct to <float>fTimescalePlayer which acts as a speed scale for the player character
|
||||
00000001406BF1D7 | 48:8B1D 128C4A03 | mov rbx,qword ptr ds:[143B67DF0] | pPlayerStructRelated1->[pPlayerStructRelated2+0x88]->[pPlayerStructRelated3+0x1FF8]->[pPlayerStructRelated4+0x28]->[pPlayerStructRelated5+0xD00]->fTimescalePlayer
|
||||
00000001406BF1DE | 48:85DB | test rbx,rbx |
|
||||
00000001406BF1E1 | 74 3C | je sekiro.1406BF21F |
|
||||
00000001406BF1E3 | 8B17 | mov edx,dword ptr ds:[rdi] |
|
||||
*/
|
||||
// credits to 'Zullie the Witch' for original offset
|
||||
internal const string PATTERN_TIMESCALE_PLAYER = "48 8B 1D ?? ?? ?? ?? 48 85 DB 74 3C 8B 17";
|
||||
internal const int PATTERN_TIMESCALE_PLAYER_INSTRUCTION_LENGTH = 7;
|
||||
internal const int PATTERN_TIMESCALE_POINTER2_OFFSET = 0x88;
|
||||
internal const int PATTERN_TIMESCALE_POINTER3_OFFSET = 0x1FF8;
|
||||
internal const int PATTERN_TIMESCALE_POINTER4_OFFSET = 0x28;
|
||||
internal const int PATTERN_TIMESCALE_POINTER5_OFFSET = 0xD00;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,11 +31,12 @@
|
|||
<CheckBox x:Name="cbBorderless" DockPanel.Dock="Left" Margin="0,0,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Borderless window" ToolTip="To enable this set 'Windowed' mode in game options first." IsEnabled="False" Checked="CbBorderless_Checked" Unchecked="CbBorderless_Unchecked"/>
|
||||
<CheckBox x:Name="cbBorderlessStretch" DockPanel.Dock="Right" Margin="10,0,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Fullscreen stretch" IsEnabled="False" Checked="CbBorderlessStretch_Check_Handler" Unchecked="CbBorderlessStretch_Check_Handler" />
|
||||
</StackPanel>
|
||||
<CheckBox x:Name="cbCamAdjust" Margin="0,5,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Disable camera auto rotate on movement" ToolTip="Disables the annoying automatic camera adjustment on movement. Intended for mouse users." Checked="CbCamAdjust_Check_Handler" Unchecked="CbCamAdjust_Check_Handler" />
|
||||
<CheckBox x:Name="cbLogStats" Margin="0,5,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Log stats (Deaths, Kills) to file for OBS" ToolTip="Check the guide on how to display these on stream with OBS." Checked="CbStatChanged" Unchecked="CbStatChanged" />
|
||||
<Expander x:Name="exGameMods" Margin="-3,5,0,0" Height="Auto" FontSize="14 px" Header="Game modifications" IsExpanded="False">
|
||||
<Grid Margin="3,0,0,0" Background="#FFF9F9F9">
|
||||
<Expander x:Name="exGameMods" Margin="-3,5,0,0" Height="Auto" FontSize="14 px" Header="Modifications" IsExpanded="True">
|
||||
<Grid Margin="3,1,0,0" Background="#FFF9F9F9">
|
||||
<StackPanel Width="Auto" Height="Auto">
|
||||
<CheckBox x:Name="cbCamAdjust" Margin="0,5,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Disable camera auto rotate on movement" ToolTip="Disables the annoying automatic camera adjustment on movement. Intended for mouse users." Checked="CbCamAdjust_Check_Handler" Unchecked="CbCamAdjust_Check_Handler" />
|
||||
<CheckBox x:Name="cbCamReset" Margin="0,3,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Disable camera reset on lock-on" ToolTip="Disables the annoying camera centering on lock-on when there is no target." Checked="CbCamReset_Check_Handler" Unchecked="CbCamReset_Check_Handler" />
|
||||
<DockPanel Margin="0,3,0,0" LastChildFill="False">
|
||||
<CheckBox x:Name="cbGameSpeed" DockPanel.Dock="Left" Margin="0,0,0,0" Height="25" FontSize="14 px" VerticalContentAlignment="Center" Content="Game speed (%):" ToolTip="Increase or decrease. Can potentially crash the game in cutscenes, use with caution." Checked="CbGameSpeed_Check_Handler" Unchecked="CbGameSpeed_Check_Handler" />
|
||||
<Button x:Name="bGs100" DockPanel.Dock="Right" Content="100" Margin="0,0,0,0" Width="30" Height="25" FontSize="14 px" BorderThickness="1" Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}" Focusable="False" Click="BGs100_Click" />
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ namespace SekiroFpsUnlockAndMore
|
|||
internal long _offset_resolution = 0x0;
|
||||
internal long _offset_resolution_default = 0x0;
|
||||
internal long _offset_resolution_scaling_fix = 0x0;
|
||||
internal long _offset_camera_reset = 0x0;
|
||||
internal long _offset_total_kills = 0x0;
|
||||
internal long _offset_player_deaths = 0x0;
|
||||
internal long _offset_timescale = 0x0;
|
||||
|
|
@ -166,6 +167,7 @@ namespace SekiroFpsUnlockAndMore
|
|||
this.cbBorderless.IsChecked = _settingsService.ApplicationSettings.cbBorderless;
|
||||
this.cbBorderlessStretch.IsChecked = _settingsService.ApplicationSettings.cbBorderlessStretch;
|
||||
this.cbCamAdjust.IsChecked = _settingsService.ApplicationSettings.cbCamAdjust;
|
||||
this.cbCamReset.IsChecked = _settingsService.ApplicationSettings.cbCamReset;
|
||||
this.cbLogStats.IsChecked = _settingsService.ApplicationSettings.cbLogStats;
|
||||
this.exGameMods.IsExpanded = _settingsService.ApplicationSettings.exGameMods;
|
||||
this.cbGameSpeed.IsChecked = _settingsService.ApplicationSettings.cbGameSpeed;
|
||||
|
|
@ -189,6 +191,7 @@ namespace SekiroFpsUnlockAndMore
|
|||
_settingsService.ApplicationSettings.cbBorderless = this.cbBorderless.IsChecked == true;
|
||||
_settingsService.ApplicationSettings.cbBorderlessStretch = this.cbBorderlessStretch.IsChecked == true;
|
||||
_settingsService.ApplicationSettings.cbCamAdjust = this.cbCamAdjust.IsChecked == true;
|
||||
_settingsService.ApplicationSettings.cbCamReset = this.cbCamReset.IsChecked == true;
|
||||
_settingsService.ApplicationSettings.cbLogStats = this.cbLogStats.IsChecked == true;
|
||||
_settingsService.ApplicationSettings.exGameMods = this.exGameMods.IsExpanded;
|
||||
_settingsService.ApplicationSettings.cbGameSpeed = this.cbGameSpeed.IsChecked == true;
|
||||
|
|
@ -331,6 +334,11 @@ namespace SekiroFpsUnlockAndMore
|
|||
Debug.WriteLine("lpFovPointer data cave at: 0x" + _memoryCaveGenerator.GetDataCaveAddressByName(_DATACAVE_FOV_POINTER).ToString("X"));
|
||||
}
|
||||
|
||||
_offset_camera_reset = patternScan.FindPattern(GameData.PATTERN_CAMRESET_LOCKON) + GameData.PATTERN_CAMRESET_LOCKON_OFFSET;
|
||||
Debug.WriteLine("lpCameraReset found at: 0x" + _offset_camera_reset.ToString("X"));
|
||||
if (!IsValidAddress(_offset_camera_reset))
|
||||
_offset_camera_reset = 0x0;
|
||||
|
||||
long ref_lpPlayerStatsRelated = patternScan.FindPattern(GameData.PATTERN_PLAYER_DEATHS) + GameData.PATTERN_PLAYER_DEATHS_OFFSET;
|
||||
Debug.WriteLine("ref_lpPlayerStatsRelated found at: 0x" + ref_lpPlayerStatsRelated.ToString("X"));
|
||||
if (IsValidAddress(ref_lpPlayerStatsRelated))
|
||||
|
|
@ -477,6 +485,13 @@ namespace SekiroFpsUnlockAndMore
|
|||
this.cbFov.IsEnabled = false;
|
||||
}
|
||||
|
||||
if (_offset_camera_reset == 0x0)
|
||||
{
|
||||
UpdateStatus("camera reset not found...", Brushes.Red);
|
||||
LogToFile("camera reset not found...");
|
||||
this.cbCamReset.IsEnabled = false;
|
||||
}
|
||||
|
||||
if (_offset_player_deaths == 0x0)
|
||||
{
|
||||
UpdateStatus("player deaths not found...", Brushes.Red);
|
||||
|
|
@ -571,6 +586,7 @@ namespace SekiroFpsUnlockAndMore
|
|||
_offset_resolution = 0x0;
|
||||
_offset_resolution_default = 0x0;
|
||||
_offset_resolution_scaling_fix = 0x0;
|
||||
_offset_camera_reset = 0x0;
|
||||
_offset_player_deaths = 0x0;
|
||||
_offset_total_kills = 0x0;
|
||||
_offset_timescale = 0x0;
|
||||
|
|
@ -772,6 +788,28 @@ namespace SekiroFpsUnlockAndMore
|
|||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Patches the game's camera centering on lock-on.
|
||||
/// </summary>
|
||||
/// <param name="showStatus">Determines if status should be updated from within method, default is true.</param>
|
||||
private bool PatchCamReset(bool showStatus = true)
|
||||
{
|
||||
if (!this.cbCamReset.IsEnabled || !CanPatchGame()) return false;
|
||||
if (this.cbCamReset.IsChecked == true)
|
||||
{
|
||||
WriteBytes(_gameAccessHwndStatic, _offset_camera_reset, GameData.PATCH_CAMRESET_LOCKON_DISABLE);
|
||||
}
|
||||
else if (this.cbCamReset.IsChecked == false)
|
||||
{
|
||||
WriteBytes(_gameAccessHwndStatic, _offset_camera_reset, GameData.PATCH_CAMRESET_LOCKON_ENABLE);
|
||||
if (showStatus) UpdateStatus(DateTime.Now.ToString("HH:mm:ss") + " Game unpatched!", Brushes.White);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (showStatus) UpdateStatus(DateTime.Now.ToString("HH:mm:ss") + " Game patched!", Brushes.Green);
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Patches game's global speed.
|
||||
/// </summary>
|
||||
|
|
@ -869,6 +907,7 @@ namespace SekiroFpsUnlockAndMore
|
|||
PatchResolution(false),
|
||||
PatchFov(false),
|
||||
PatchWindow(false),
|
||||
PatchCamReset(false),
|
||||
PatchGameSpeed(false),
|
||||
PatchPlayerSpeed(false)
|
||||
};
|
||||
|
|
@ -1274,6 +1313,12 @@ namespace SekiroFpsUnlockAndMore
|
|||
InjectToGame();
|
||||
}
|
||||
|
||||
private void CbCamReset_Check_Handler(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (this.cbCamReset.IsEnabled)
|
||||
PatchCamReset();
|
||||
}
|
||||
|
||||
private void CbStatChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
_statLoggingEnabled = cbLogStats.IsChecked == true;
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ namespace SekiroFpsUnlockAndMore
|
|||
[XmlElement]
|
||||
public bool cbCamAdjust { get; set; }
|
||||
[XmlElement]
|
||||
public bool cbCamReset { get; set; }
|
||||
[XmlElement]
|
||||
public bool cbLogStats { get; set; }
|
||||
[XmlElement]
|
||||
public bool exGameMods { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue