diff --git a/PluginCache/K4sh/GlobalDependencies/Scripts/StandardBase.lua b/PluginCache/K4sh/GlobalDependencies/Scripts/StandardBase.lua new file mode 100644 index 0000000..ba37602 --- /dev/null +++ b/PluginCache/K4sh/GlobalDependencies/Scripts/StandardBase.lua @@ -0,0 +1,898 @@ +if ModuleDependencys:GetDependency("Theme") then + require(ModuleDependencys:GetDependency("Theme"):GetPackageName()) +else + require(GlobalDependencys:GetDependency("StandardTheme"):GetPackageName()) +end + +int_tOriginalEXEName = nil +int_tClassNames = nil +int_tEXENames = nil +int_FailureRetryInterval = 60 +int_CurrentRetryInterval = 0 +int_ViewportStarted = false +int_FatelConfigEnableError = false + + +function Init_BaseControls() + + --Module Vars + SyncDisplayDetection() + HackTool = FWSBinds.c_HackTool() + HackTool:SetProcessFriendlyName(Process_FriendlyName) + WindowTool = FWSBinds.c_WindowTools() + + if Process_EXEName == nil then Process_EXEName = "*" end + if Process_ClassName == nil then Process_ClassName = "*" end + if Process_WindowName == nil then Process_WindowName = "*" end + + int_WindowNames = split(Process_WindowName,";") + int_ClassNames = split(Process_ClassName,";") + int_EXENames = split(Process_EXEName,";") + + --UI VARS + VersionString = "Unknown" + bAutoDetectVersion = true + bVersionSupported = false + bIsSteam = false + bIsOrigin = false + + --INJECTION VARS + RequreTarget = nil + ConfigureFunction = nil + EnableFunction = nil + DisableFunction = nil + PeriodicFunction = nil + PreviouslyEnabled = false + WaitingForProcessStart = false + LastKnownPID = 0 + + if SuspendThread == nil then SuspendThread = true end + if InjectDelay == nil then InjectDelay = 1 end + if SearchInterval == nil then SearchInterval = 500 end + if ConfigureDelay == nil then ConfigureDelay = 0 end + if int_ScanRetryMax == nil then int_ScanRetryMax = 10 end + + SigScanError = string.format("Could not find %%s injection point, %s may have updated to a version that is no longer supported.\r\n\r\nTry restarting %s or selecting a different version and re-enable the fix.",Process_FriendlyName,Process_FriendlyName) + + DefaultControls.AddHeader("Header_EnableDisable","Enable / Disable",15,10,210,17) + DefaultControls.AddFixToggle("CheckBox_Enable","Fix Enabled","CKEnable_Changed",25,41,100,14,true) + DefaultControls.AddHeader("Header_Version","Game Version",245,10,210,17) + + VersionOptions = {} + for index,value in ipairs(SupportedVersions) do + if value[2] ~= "Auto" then + VersionOptions[index] = string.format("%s (%s)",value[1],value[2]) + else + VersionOptions[index] = value[1] + end + end + + DefaultControls.AddComboBox("VersionCombo","VersionCombo_Changed",VersionOptions,255,37,190,300) + DefaultControls.AddTimer("Fix_Timer",60000,"Fix_Timer_Elapsed",SearchInterval,false) + DefaultControls.AddTimer("Failed_Fix_Timer",60001,"Failed_Fix_Timer_Elapsed",1000,false) + + Fix_Timer:SetEnabled(true) + +end + +function WriteBytes(AddressName, Bytes) + + local PrepareString = string.format("%s" .. Bytes, "0x") + local PrepareString = string.gsub(PrepareString, " ", ", 0x") + x = 0 + local test = HackTool:GetAddress(AddressName) + for key, value in PrepareString:gmatch("%P+") do + test:WriteByte(key, x) + x = x + 1 + end + +end + +function HK_EnableToggle() + + if bFixEnabled == true then + CheckBox_Enable:SetCheckState(0) + CKEnable_Changed(CheckBox_Enable) + else + + CheckBox_Enable:SetCheckState(1) + CKEnable_Changed(CheckBox_Enable) + end + +end + +function CKEnable_Changed(Sender) + + Failed_Fix_Timer:SetEnabled(false) + + if Toggle_CheckFix(Sender) == true then + int_FatelConfigEnableError = false + bFixEnabled = true + PluginViewport:SetStatusMessage( "Searching for " .. Process_FriendlyName .. " process, please configure desired settings and launch the game." ,true ) + else + bFixEnabled = false + end + + Fix_Timer:SetEnabled(bFixEnabled) + Fix_Timer:SetInterval(SearchInterval) + ForceUpdate() + +end + +function VersionCombo_Changed(Sender) + + if HackTool:GetIsValid() == false then return false end + + if LastKnownPID == HackTool:GetAttachedProcessID() then + DisableFix() + end + + CleanUp() + + if int_tOriginalEXEName ~= nil then + Process_EXEName = int_tOriginalEXEName + int_tOriginalEXEName = nil + end + + local tProcessName = HackTool:GetProcessEXEName() + if Process_EXEName ~= tProcessName then + int_tOriginalEXEName = Process_EXEName + Process_EXEName = tProcessName + else + int_tOriginalEXEName = nil + end + + int_ScanRetryCount = 1 + PreviouslyEnabled = false + + vString = Sender:GetSelectedString() + + local DetectedVersion = HackTool:DetectProcessVersion() + bIsSteam = HackTool:GetIsSteamApp() + if bIsSteam == false then + bIsOrigin = HackTool:GetIsOriginApp() + end + + local RefString = nil + + for index,value in ipairs(SupportedVersions) do + + if value[2] ~= "Auto" then + RefString = string.format("%s (%s)",value[1],value[2]) + else + RefString = value[1] + end + + if RefString == vString then + + local VersionFound = false + + local DetectType = 0 + local Functions = 0 + + if string.find(value[4],":") ~= nil then + RequreTarget = string.sub(value[4],1,string.find(value[4],":")-1) + Functions = string.sub(value[4],string.find(value[4],":")+1) + else + Functions = value[4] + end + + local LastPos = 0 + local ArgCount = 0 + + while LastPos ~= nil do + ArgCount = ArgCount + 1 + if ArgCount == 1 then + strConfigureFunction = string.sub(Functions,LastPos,string.find(Functions,";",LastPos+1)-1) + elseif ArgCount == 2 then + strEnableFunction = string.sub(Functions,LastPos+1,string.find(Functions,";",LastPos+1)-1) + elseif ArgCount == 3 then + strPeriodicFunction = string.sub(Functions,LastPos+1,string.find(Functions,";",LastPos+1)-1) + elseif ArgCount == 4 then + strDisableFunction = string.sub(Functions,LastPos+1,string.find(Functions,";",LastPos+1)) + if string.find(strDisableFunction,";") then strDisableFunction = string.sub(strDisableFunction,1,string.len(strDisableFunction)-1) end + end + LastPos = string.find(Functions,";",LastPos+1) + end +::configureretry:: + local ConfigureSuccess = false + local EnableSuccess = false + + if strConfigureFunction ~= nil then + if _G[strConfigureFunction] then + ConfigureFunction = _G[strConfigureFunction] + PluginViewport:SetStatusMessage( "Configuring..." ,true ) + if ConfigureDelay ~= nil and ConfigureDelay > 0 then + print("Delaying signature scan...") + HiResSleep(ConfigureDelay) + end + + if SuspendThread == true then SuspendedThreadID = HackTool:SuspendAttachedThread() end + ConfigureSuccess = ConfigureFunction() + if SuspendThread == true then HackTool:ResumeThread(SuspendedThreadID) end + + end + end + + if ConfigureSuccess == true then + print("Configure Success = true") + if strEnableFunction ~= nil then + if _G[strEnableFunction] then EnableFunction = _G[strEnableFunction] end + end + + if strDisableFunction ~= nil then + if _G[strDisableFunction] then DisableFunction = _G[strDisableFunction] end + end + + if strPeriodicFunction ~= nil then + if _G[strPeriodicFunction] then PeriodicFunction = _G[strPeriodicFunction] end + end + else + print("Configure Success = false") + + if int_FatelConfigEnableError == true then + return true + end + + if SuspendThread == true then HackTool:ResumeThread(SuspendedThreadID) end + + if int_ScanRetryCount < int_ScanRetryMax+1 then + + if HackTool:GetIsValid() == false then + return false + end + + Sleep(50) + print(string.format("Retrying, %d of %d",int_ScanRetryCount,int_ScanRetryMax)) + CleanUp() + int_ScanRetryCount = int_ScanRetryCount + 1 + goto configureretry + else + return false + end + + end + + if value[2] == "Auto" then DetectType = 1 elseif value[2] == "Hybrid" then DetectType = 2 else DetectType = 3 end + + if DetectedVersion ~= "Unknown" then + VersionFound = true + else + VersionFound = false + end + + local VersionString = string.format("%s (%s) -> Detected: %s",value[1],value[2],DetectedVersion) + if bIsSteam == true then VersionString = VersionString .. " (Steam)" + elseif bIsOrigin == true then VersionString = VersionString .. " (Origin)" end + + HackTool:SetProcessVersion(VersionString) + + end + end + + + + if WaitingForProcessStart == true or LastKnownPID ~= HackTool:GetAttachedProcessID() then + if InjectDelay > 0 then + PluginViewport:SetStatusMessage( "Injection delay... waiting for process to stabilise, Please wait...\r\n\r\nPlease note, terminating Flawless Widescreen or the LUA Virtual Machine may result in undefined behaviour." , true ) + local ConfigureEnd = os.clock() + print(string.format("Inject delay: %.0fms, Configure() took: %.0fms, Adjusted Inject delay: %.0fms", InjectDelay, (ConfigureEnd - ConfigureStart)*1000,InjectDelay - (ConfigureEnd - ConfigureStart)*1000)) + ConfigureEnd = os.clock() + HiResSleep(InjectDelay - (ConfigureEnd - ConfigureStart)*1000) + local Difference = os.clock() + print(string.format("Actual delay: %.0fms", (Difference - ConfigureEnd)*1000)) + end + end + + PluginViewport:SetStatusMessage( "Injecting..." ,true ) + + if SuspendThread == true then SuspendedThreadID = HackTool:SuspendAttachedThread() end + EnableFunction() + if SuspendThread == true then HackTool:ResumeThread(SuspendedThreadID) end + + Fix_Timer:SetInterval(WriteInterval) + Fix_Timer:SetEnabled(true) + ForceUpdate() + + return true + +end + +function DisableFix() + + if DisableFunction ~= nil then + if WaitingForProcessStart == false then + DisableFunction() + end + end + + DisableFunction = nil + PeriodicFunction = nil + EnableFunction = nil + ConfigureFunction = nil + + CleanUp() + +end + +function CleanUp() + + HackTool:DeleteCodeCaves() + HackTool:DeleteAllocations() + HackTool:DeleteAddresses() + HackTool:DeletePointerChains() + +end + +function DisplayDetection_ResolutionChanged() + + SyncDisplayDetection() + + if ResolutionChanged ~= nil then + ResolutionChanged() + end + +end + +function Failed_Fix_Timer_Elapsed(Sender,Argument) + + int_CurrentRetryInterval = int_CurrentRetryInterval + 1 + if int_CurrentRetryInterval > int_FailureRetryInterval then + Sender:SetEnabled(false) + int_CurrentRetryInterval = 0 + CheckBox_Enable:SetCheckState(1) + CKEnable_Changed(CheckBox_Enable) + else + PluginViewport:SetStatusMessage( string.format("Configure function call for the attached process failed, retrying in %d seconds...\r\n\r\nLast Error:\r\n%s",int_FailureRetryInterval - int_CurrentRetryInterval,int_LastError),true ) + end + + +end + +function Fix_Timer_Elapsed(Sender,Argument) + + if bFixEnabled == true then + + if HackTool:GetIsValid() == true then + PluginViewport:SetStatusMessage( HackTool:GetProcessSummary() ) + + if DisplayInfo and DisplayGridDetails then + PluginViewport:AppendStatusMessage( DisplayInfo:GetDisplaySummary() ) + if PeriodicFunction ~= nil then PeriodicFunction() end + end + + PluginViewport:RenderStatusMessage() + + else + + if FWS_LoadingState == true then + PluginViewport:SetStatusMessage( "Loading state information..." ,true ) + return + else + + local ProcessFound = false + + if #int_ClassNames == 1 and #int_WindowNames == 1 and int_ClassNames[1] == "*" and int_WindowNames[1] == "*" then + for key,exename in pairs(int_EXENames) do + if HackTool:FindProcess("*",exename,"*") == true then + if HackTool:OpenProcess(PROCESS_ALL_ACCESS) == true then + Fix_Timer:SetEnabled(false) + ProcessFound = true + break + end + end + end + else + + for key,classname in pairs(int_ClassNames) do + for key,windowname in pairs(int_WindowNames) do + if HackTool:FindProcess(windowname,Process_EXEName,classname) == true then + if HackTool:OpenProcess(PROCESS_ALL_ACCESS) == true then + Fix_Timer:SetEnabled(false) + ProcessFound = true + break + end + end + end + if ProcessFound == true then break end + end + end + + if ProcessFound == false then + if WaitingForProcessStart == false then + PluginViewport:SetStatusMessage( "Searching for " .. Process_FriendlyName .. " process, please configure desired settings and launch the game." ,true ) + WaitingForProcessStart = true + Fix_Timer:SetInterval(SearchInterval) + end + else + WindowTool:AttachToWindow(HackTool:GetAttachedHWND()) + + ConfigureStart = os.clock() + if VersionCombo_Changed(VersionCombo) == false then + StartFailureCountdown() + else + WaitingForProcessStart = false + LastKnownPID = HackTool:GetAttachedProcessID() + end + end + + end + + end + + else + DisableFix() + Sender:SetEnabled(false) + Fix_Timer:SetInterval(SearchInterval) + HackTool:CloseProcess() + PluginViewport:SetStatusMessage( Process_FriendlyName .. " Fix disabled - Click \"Fix Enabled\" to enable." , true) + end + +end + +function StartFailureCountdown() + Fix_Timer:SetEnabled(false) + int_CurrentRetryInterval = 0 + Failed_Fix_Timer:SetEnabled(true) + HackTool:CloseProcess() +end + +function ErrorOccurred(error_text,fatel) + + if int_ScanRetryCount > int_ScanRetryMax or fatel ~= nil and fatel == true then + print("Fatel error.") + CheckBox_Enable:SetCheckState(0) + CKEnable_Changed(CheckBox_Enable) + PluginViewport:SetStatusMessage( error_text , true) + int_LastError = error_text + int_FatelConfigEnableError = true + + else + print("Non-fatel error, retrying.") + end + + + return false +end + +function ForceUpdate() + Fix_Timer_Elapsed(Fix_Timer,nil) +end + +function ForcePeriodic() + if PeriodicFunction ~= nil then PeriodicFunction() end +end + +function Write_CodeCave(CodeCaveName) + local CodeCave = HackTool:GetCodeCave(CodeCaveName) + if CodeCave ~= nil then CodeCave:WriteData() end +end + +function Restore_CodeCave(CodeCaveName) + local CodeCave = HackTool:GetCodeCave(CodeCaveName) + if CodeCave ~= nil then CodeCave:Restore() end +end + +function Toggle_CodeCave(CodeCaveName, ToggleBool) + local CodeCave = HackTool:GetCodeCave(CodeCaveName) + if CodeCave ~= nil then + if ToggleBool == true then + CodeCave:WriteData() + else + CodeCave:Restore() + end + + end +end + +function SyncDisplayDetection() + DisplayInfo = DisplayDetection:GetPreferredDisplay() + DisplayGridDetails = DisplayInfo:GetGridSize() + + --block for a while incase the object is invalid + while DisplayInfo == nil or DisplayGridDetails == nil do + DisplayInfo = DisplayDetection:GetPreferredDisplay() + DisplayGridDetails = DisplayInfo:GetGridSize() + end +end + +function Round(what, precision) + return FWSBinds.c_Tools_Round(what,precision) +end + +function GetContextAspectDevisional() + + if fDefaultAspectRatio ~= nil then + return DisplayInfo:GetAspectRatio() / fDefaultAspectRatio + end + + return DisplayInfo:GetAspectRatio() / 1.777777791 +end + +function GetContextFOVMax() + + if fFOVMax ~= nil and fDefaultAspectRatio ~= nil then + local FOVMax = DisplayInfo:GetAdjustedFOV(fFOVMax,fDefaultAspectRatio,0,179) + return FOVMax + end + + return DisplayInfo:GetAdjustedFOV(110,1.777777791,0,179) + +end + +function UpdateFOVCalculator_AdditionalFOV(AllocationName, AdditionalFOV) + + local FOVCalc = HackTool:GetAllocation(AllocationName) + if FOVCalc then + local OffsetAdditionalFOV = FOVCalc["AdditionalFOV"] + if OffsetAdditionalFOV then OffsetAdditionalFOV:WriteFloat(AdditionalFOV) end + end + +end + +function UpdateFOVCalculator_AspectDevisional(AllocationName, AspectDevisional) + + local FOVCalc = HackTool:GetAllocation(AllocationName) + if FOVCalc then + local OffsetAspectDevisional = FOVCalc["AspectDevisional"] + if OffsetAspectDevisional then OffsetAspectDevisional:WriteFloat(AspectDevisional) end + end + +end + +function UpdateFOVCalculator_MaxFOV(AllocationName, MaxFOV) + + local FOVCalc = HackTool:GetAllocation(AllocationName) + if FOVCalc then + local OffsetFOVMaximum = FOVCalc["FOVMaximum"] + if MaxFOV == nil then + if OffsetFOVMaximum then OffsetFOVMaximum:WriteFloat(GetContextFOVMax()) end + else + if OffsetFOVMaximum then OffsetFOVMaximum:WriteFloat(MaxFOV) end + end + end + +end + +function UpdateFOVCalculator(AllocationName, AspectDevisional, AdditionalFOV, MaxFOV) + local FOVCalc = HackTool:GetAllocation(AllocationName) + if FOVCalc then + local OffsetAdditionalFOV = FOVCalc["AdditionalFOV"] + if OffsetAdditionalFOV then OffsetAdditionalFOV:WriteFloat(AdditionalFOV) end + local OffsetAspectDevisional = FOVCalc["AspectDevisional"] + if OffsetAspectDevisional then OffsetAspectDevisional:WriteFloat(AspectDevisional) end + local OffsetFOVMaximum = FOVCalc["FOVMaximum"] + + if MaxFOV == nil then + if OffsetFOVMaximum then OffsetFOVMaximum:WriteFloat(GetContextFOVMax()) end + else + if OffsetFOVMaximum then OffsetFOVMaximum:WriteFloat(MaxFOV) end + end + + + end +end + +function FOVCalculatorSummary(AllocationName, Title, OptionalBool, ShowAdditional) + if OptionalBool ~= nil and OptionalBool == false then return string.format(" (%s FOV) - Disabled",Title) end + + local FOVCalc = HackTool:GetAllocation(AllocationName) + if FOVCalc then + local OffsetOriginalFOV = FOVCalc["OriginalFOV"] + local OffsetFOVResult = FOVCalc["FOVResult"] + local OffsetAdditionalFOV = FOVCalc["AdditionalFOV"] + local OffsetMaxFOV = FOVCalc["FOVMaximum"] + + if OffsetOriginalFOV and OffsetFOVResult and OffsetAdditionalFOV and OffsetMaxFOV then + local Additional = OffsetAdditionalFOV:ReadFloat() + local MaxFOV = OffsetMaxFOV:ReadFloat() + local OutputFOV = OffsetFOVResult:ReadFloat() + + local LimitingIndicator = "" + if (OutputFOV+0.5) > MaxFOV then + LimitingIndicator = "[!!]" + elseif (OutputFOV+2.0) > MaxFOV then + LimitingIndicator = "[!]" + end + + if Additional > 0 or Additional == 0 then + return string.format(" (%s FOV) - In: %.2f, Out: %.2f (+%.2f) %s",Title,OffsetOriginalFOV:ReadFloat(),OutputFOV, Additional, LimitingIndicator) + else + return string.format(" (%s FOV) - In: %.2f, Out: %.2f (%.2f) %s",Title,OffsetOriginalFOV:ReadFloat(),OutputFOV, Additional, LimitingIndicator) + end + + end + + end + + return string.format(" (%s FOV) - Error",Title) +end + +function Toggle_CheckFix(Control) + + local Result = false + + if Control:GetCheckState() > 0 then + Result = true + else + Result = false + end + + ApplyThemeToControl(Control,Theme.FixToggle) + + return Result + +end + +function split (s, delim) + + if delim ~= nil and string.find(s,delim) ~= nil then + local start = 1 + local t = {} + + while true do + local pos = string.find (s, delim, start, true) + if not pos then break end + table.insert (t, string.sub (s, start, pos - 1)) + start = pos + string.len (delim) + end + + table.insert (t, string.sub (s, start)) + return t + else + return {s} + end + +end + +DefaultControls = {} + +DefaultControls.AddHeader = function(ControlName, Label, Pos_X, Pos_Y, Width, Height) + _G[ControlName] = FWSBinds.c_Label() + local tLabel = _G[ControlName] + tLabel:SetRect(Pos_X,Pos_Y,Width,Height) + tLabel:SetBorder(true) + tLabel.Caption:SetCaption( " + " .. Label ) + ApplyThemeToControl(tLabel,Theme.Header) + ContainerChild:RegisterControl(tLabel,ControlName) + return tLabel +end + +DefaultControls.AddWarning = function(ControlName, Label, Pos_X, Pos_Y, Width, Height) + _G[ControlName] = FWSBinds.c_Label() + local tLabel = _G[ControlName] + + if Pos_X == nil then Pos_X = 15 end + if Pos_Y == nil then Pos_Y = 350 end + if Width == nil then Width = 440 end + if Height == nil then Height = 70 end + + tLabel:SetRect(Pos_X,Pos_Y,Width,Height) + tLabel:SetAlignCenter() + tLabel:SetBorder(true) + tLabel.Caption:SetCaption(Label) + ApplyThemeToControl(tLabel,Theme.Warning) + ContainerChild:RegisterControl(tLabel,ControlName) + + local CKWidth = 180 + local CKHeight = 14 + + DefaultControls.AddFixToggle("CK" .. ControlName,"Acknowledge and Ignore","CK" .. ControlName .. "_Changed",Pos_X+(Width/2)-(CKWidth/2),Pos_Y + Height + 8,CKWidth,CKHeight,false) + return tLabel +end + +DefaultControls.AddFixedFOVSlider = function(ControlName, ChangeEvent, Pos_X, Pos_Y, Width, Height, LowValue, HighValue, DefaultValue, Scale) + _G[ControlName] = FWSBinds.c_TrackBar() + local FOVSlider = _G[ControlName] + FOVSlider:SetRect(Pos_X,Pos_Y,Width,Height) + FOVSlider:SetLabel1Text(LowValue) + FOVSlider:SetLabel2Text(HighValue) + FOVSlider:SetLabel1Enabled(true) + FOVSlider:SetLabel2Enabled(true) + + if Scale ~= nil then + FOVSlider:SetTickFrequency(Scale) + FOVSlider:SetRange(LowValue*Scale,HighValue*Scale) + + if DefaultValue ~= nil then + FOVSlider:SetPosition(DefaultValue*Scale) + else + FOVSlider:SetPosition((LowValue + ((HighValue - LowValue) / 2)) * Scale) + end + else + FOVSlider:SetTickFrequency(1) + FOVSlider:SetRange(LowValue,HighValue) + + if DefaultValue ~= nil then + FOVSlider:SetPosition(DefaultValue) + else + FOVSlider:SetPosition(LowValue + ((HighValue - LowValue) / 2)) + end + end + + local tLabel = FOVSlider:GetLabel1() + ApplyThemeToControl(tLabel,Theme.FOVSlider.Labels) + tLabel:SetRect(0,0,50,17) + + local tLabel = FOVSlider:GetLabel2() + ApplyThemeToControl(tLabel,Theme.FOVSlider.Labels) + tLabel:SetRect(0,0,50,17) + + + + FOVSlider.Events:SetLua_ValueChanged(ChangeEvent) + FOVSlider:SetSaveState(true) + ContainerChild:RegisterControl(FOVSlider,ControlName) + + local LabelName = "lbl" .. ControlName + _G[LabelName] = FWSBinds.c_Label() + local lblFOVSlider = _G[LabelName] + lblFOVSlider:SetRect(Pos_X+(Width/2)-(140/2),Pos_Y+35,140,17) + ApplyThemeToControl(lblFOVSlider,Theme.FOVSlider.ValueLabel) + lblFOVSlider.Caption:SetCaption( "Value: 0.00" ) + lblFOVSlider:SetAlignCenter() + ContainerChild:RegisterControl(lblFOVSlider,LabelName) + + if DefaultValue ~= nil then + _G[ChangeEvent](FOVSlider) + end + + return FOVSlider +end + +DefaultControls.AddFOVSlider = function(ControlName, ChangeEvent, Pos_X, Pos_Y, Width, Height, DefaultValue) + _G[ControlName] = FWSBinds.c_TrackBar() + local FOVSlider = _G[ControlName] + FOVSlider:SetRect(Pos_X,Pos_Y,Width,Height) + FOVSlider:SetLabel1Text("Lower") + FOVSlider:SetLabel2Text("Higher") + FOVSlider:SetLabel1Enabled(true) + FOVSlider:SetLabel2Enabled(true) + FOVSlider:SetTickFrequency(15) + FOVSlider:SetRange(0,200) + + local tLabel = FOVSlider:GetLabel1() + ApplyThemeToControl(tLabel,Theme.FOVSlider.Labels) + tLabel:SetRect(0,0,50,17) + + local tLabel = FOVSlider:GetLabel2() + ApplyThemeToControl(tLabel,Theme.FOVSlider.Labels) + tLabel:SetRect(0,0,50,17) + + if DefaultValue ~= nil then + FOVSlider:SetPosition(DefaultValue) + else + FOVSlider:SetPosition(100) + end + + FOVSlider.Events:SetLua_ValueChanged(ChangeEvent) + FOVSlider:SetSaveState(true) + ContainerChild:RegisterControl(FOVSlider,ControlName) + + local LabelName = "lbl" .. ControlName + _G[LabelName] = FWSBinds.c_Label() + local lblFOVSlider = _G[LabelName] + + local LabelWidth = 180 + local LabelHeight = 17 + + lblFOVSlider:SetRect(Pos_X+(Width/2)-(LabelWidth/2),Pos_Y+35,LabelWidth,LabelHeight) + ApplyThemeToControl(lblFOVSlider,Theme.FOVSlider.ValueLabel) + lblFOVSlider.Caption:SetCaption( "Value: 0.00" ) + lblFOVSlider:SetAlignCenter() + ContainerChild:RegisterControl(lblFOVSlider,LabelName) + + if DefaultValue ~= nil then + _G[ChangeEvent](FOVSlider) + end + + return FOVSlider +end + +DefaultControls.AddFixToggle = function(ControlName, Caption, ChangeEvent, Pos_X, Pos_Y, Width, Height, DefaultValue) + + _G[ControlName] = FWSBinds.c_CheckBox() + local CKToggle = _G[ControlName] + CKToggle:SetRect(Pos_X,Pos_Y,Width,Height) + CKToggle.Caption:SetCaption(Caption) + + if DefaultValue ~= nil and DefaultValue == false then + CKToggle:SetCheckState(0) + else + CKToggle:SetCheckState(1) + end + + ApplyThemeToControl(CKToggle,Theme.FixToggle) + + CKToggle.Events:SetLua_CheckStateChanged(ChangeEvent) + CKToggle:SetSaveState(true) + ContainerChild:RegisterControl(CKToggle,ControlName) + return CKToggle +end + +DefaultControls.AddParameterBox = function(ControlName, Caption, ChangeEvent, Pos_X, Pos_Y, Width, Height) + + _G[ControlName] = FWSBinds.c_InputBox() + local EBControl = _G[ControlName] + EBControl:SetRect(Pos_X,Pos_Y,Width,Height) + EBControl:SetBorder(true) + EBControl:SetAlignCenter() + ApplyThemeToControl(EBControl,Theme.ParameterBox) + EBControl.Events:SetLua_TextChanged(ChangeEvent) + EBControl:SetSaveState(true) + EBControl:SetText(Caption) + ContainerChild:RegisterControl(EBControl,ControlName) + return EBControl + +end + +DefaultControls.AddTimer = function (ControlName, TimerID, ElapsedFunction, Interval, Enabled) + + _G[ControlName] = FWSBinds.c_Timer() + local tTimer = _G[ControlName] + tTimer:SetTimerID(TimerID) + tTimer.Events:SetLua_TimerElapsed(ElapsedFunction) + tTimer:SetInterval(Interval) + tTimer:SetEnabled(Enabled) + ContainerChild:RegisterControl(tTimer,ControlName) + return tTimer + +end + +DefaultControls.AddComboBox = function (ControlName,SelectionChangedEvent,Options,Pos_X, Pos_Y, Width, Height) + + _G[ControlName] = FWSBinds.c_ComboBox() + local tComboBox = _G[ControlName] + tComboBox:SetRect(Pos_X,Pos_Y,Width,Height) + + for index,value in ipairs(Options) do + tComboBox:InsertItem(Options[index]) + end + + ApplyThemeToControl(tComboBox,Theme.ComboBox) + + tComboBox:SetSelectedIndex(0) + tComboBox:SetDropDownReadOnly() + tComboBox.Events:SetLua_IndexChanged(SelectionChangedEvent) + tComboBox:SetSaveState(true) + ContainerChild:RegisterControl(tComboBox,ControlName) + + return tComboBox +end + +DefaultControls.AddButton = function(ControlName,Caption,ButtonClickEvent,Pos_X,Pos_Y,Width,Height,StepType) + + _G[ControlName] = FWSBinds.c_Button() + local tButton = _G[ControlName] + + tButton:SetRect(Pos_X,Pos_Y,Width,Height) + + tButton.Caption:SetCaption(Caption) + tButton.Events:SetLua_ButtonClick(ButtonClickEvent) + + ApplyThemeToControl(tButton,Theme.Button) + + if StepType ~= nil then + local SetRect = false + + if StepType == "Next" then + tButton:SetType_NextStep() + SetRect = true + elseif StepType == "Prev" then + tButton:SetType_PrevStep() + SetRect = true + elseif StepType == "Exec" then + tButton:SetType_ExecStep() + SetRect = true + end + + if SetRect == true then + tButton:SetRect(Pos_X,Pos_Y,125,44) + end + end + + ContainerChild:RegisterControl(tButton,ControlName) + return tButton + +end + diff --git a/PluginCache/K4sh/GlobalDependencies/Scripts/StandardTheme.lua b/PluginCache/K4sh/GlobalDependencies/Scripts/StandardTheme.lua new file mode 100644 index 0000000..9b0b663 --- /dev/null +++ b/PluginCache/K4sh/GlobalDependencies/Scripts/StandardTheme.lua @@ -0,0 +1,172 @@ +RGBToHex = FWSBinds.c_Tools_RGBtoHex + +function ApplyThemeToControl(Control,Theme) + + if Theme == nil or Control == nil then return end + + local ControlObject = Control.Color + if ControlObject then + local tTheme = Theme.Color + if tTheme then + if tTheme.Backcolor then ControlObject:SetBackColor(tTheme.Backcolor) end + if tTheme.Forecolor then ControlObject:SetForeColor(tTheme.Forecolor) end + if tTheme.Alpha then ControlObject:SetBackColorAlpha(tTheme.Alpha) end + if Control.GetCheckState then + if tTheme.Checked_Forecolor then + if Control:GetCheckState() == 0 then ControlObject:SetForeColor(tTheme.Checked_Forecolor) end + end + if tTheme.Unchecked_Forecolor then + if Control:GetCheckState() == 1 then ControlObject:SetForeColor(tTheme.Unchecked_Forecolor) end + end + end + end + end + + local ControlObject = Control.Font + if ControlObject then + local tTheme = Theme.Font + if tTheme then + if tTheme.Size then ControlObject:SetFontSize(tTheme.Size) end + if tTheme.Name then ControlObject:SetFontName(tTheme.Name) end + if tTheme.Bold then ControlObject:SetBold(tTheme.Bold) end + if tTheme.Italic then ControlObject:SetItalic(tTheme.Italic) end + if tTheme.Underline then ControlObject:SetUnderline(tTheme.Underline) end + end + end + + local ControlObject = Control.BackgroundImage + if ControlObject then + local tTheme = Theme.BackgroundImage + if tTheme then + if tTheme.Dependency then + local Dependency = ModuleDependencys:GetDependency(tTheme.Dependency) + if Dependency then + ControlObject:SetDependency(Dependency) + ControlObject:SetEnabled(true) + end + end + + if tTheme.Alpha then ControlObject:SetTransparencyLevel(tTheme.Alpha) end + + end + end + +end + + +Theme = {} + +Theme.CheckBox = { + Font = {Size=GUI_DEFAULTFONTSIZE+0.5, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Checked_Forecolor=RGBToHex(255,0,0), Unchecked_Forecolor=COLOR_GREEN} +} + +Theme.Button = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT, Bold=true}, +} + +Theme.FixToggle = { + Font = {Size=GUI_DEFAULTFONTSIZE+0.5, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Checked_Forecolor=RGBToHex(255,0,0), Unchecked_Forecolor=COLOR_GREEN} +} + +Theme.Header = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Backcolor=RGBToHex(255,64,64), Forecolor=COLOR_WHITE, Alpha=100} +} + +Theme.Warning = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Backcolor=RGBToHex(255,32,32), Forecolor=COLOR_WHITE, Alpha=70} +} + +Theme.Label = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT}, + Color = {Backcolor=RGBToHex(255,64,64), Forecolor=COLOR_WHITE, Alpha=100} +} + +Theme.FOVSlider = { + Labels = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Forecolor=COLOR_WHITE} + }, + ValueLabel = { + Font = {Size=GUI_DEFAULTFONTSIZE-0.5, Name=GUI_DEFAULTFONT}, + Color = {Forecolor=COLOR_WHITE} + } +} + +Theme.ComboBox = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT}, + Color = {Forecolor=COLOR_WHITE} +} + +Theme.ParameterBox = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT}, + Color = {Backcolor=RGBToHex(50,50,255), Forecolor=COLOR_WHITE, Alpha=40} +} + +Theme.ContainerHeader = { + Font = {Size=GUI_DEFAULTFONTSIZE, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Backcolor=COLOR_GREEN, Forecolor=COLOR_GREEN, Alpha=60} +} + +Theme.ContainerLabelName = { + Font = {Size=GUI_DEFAULTFONTSIZE-0.25, Name=GUI_DEFAULTFONT, Bold=true}, + Color = {Forecolor=COLOR_WHITE} +} + +Theme.ContainerLabelValue = { + Font = {Size=GUI_DEFAULTFONTSIZE-0.25, Name=GUI_DEFAULTFONT}, + Color = {Forecolor=COLOR_WHITE} +} + +Theme.ContainerLinkLabel = { + Font = {Size=GUI_DEFAULTFONTSIZE-0.5, Name=GUI_DEFAULTFONT}, + Color = {Forecolor=COLOR_WHITE} +} + +Theme.ContainerEditBox = { + Font = {Size=GUI_DEFAULTFONTSIZE-0.5, Name=GUI_DEFAULTFONT}, + Color = {Backcolor=COLOR_WHITE, Forecolor=COLOR_WHITE, Alpha=25} +} + +Theme.MainWindow = { + Color = {Backcolor=COLOR_BLACK}, + BackgroundImage = {Dependency="UI Background", Alpha=45} +} + +Theme.Container = { + Color = {Backcolor=COLOR_WHITE, Alpha=25} +} + +--MainWindow +ApplyThemeToControl(MainWindow,Theme.MainWindow) + +-- Container Window +ApplyThemeToControl(ContainerChild,Theme.Container) + +-- Information Header +ApplyThemeToControl(lbl_InfoHeader,Theme.ContainerHeader) +ApplyThemeToControl(lbl_InfoFilename,Theme.ContainerLabelName) +ApplyThemeToControl(lbl_InfoFilenameVal,Theme.ContainerLabelValue) +ApplyThemeToControl(lbl_Version,Theme.ContainerLabelName) +ApplyThemeToControl(lbl_VersionVal,Theme.ContainerLabelValue) +ApplyThemeToControl(lbl_InfoModType,Theme.ContainerLabelName) +ApplyThemeToControl(lbl_InfoModTypeVal,Theme.ContainerLabelValue) +ApplyThemeToControl(lbl_InfoModName,Theme.ContainerLabelName) +ApplyThemeToControl(lbl_InfoModNameVal,Theme.ContainerLabelValue) +ApplyThemeToControl(lbl_InfoAuthor,Theme.ContainerLabelName) +ApplyThemeToControl(lbl_InfoAuthorVal,Theme.ContainerLabelValue) + +--Description +ApplyThemeToControl(lbl_DescrHeader,Theme.ContainerHeader) +ApplyThemeToControl(eb_Description,Theme.ContainerEditBox) + +--Links and Resources +ApplyThemeToControl(lbl_LinkResourceHeader,Theme.ContainerHeader) +ApplyThemeToControl(link_LinkBlock,Theme.ContainerLinkLabel) + +--Status Window +ApplyThemeToControl(lbl_StatusWindowHeader,Theme.ContainerHeader) +ApplyThemeToControl(StatusWindowEditBox,Theme.ContainerEditBox) \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/ACMirage/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..669bd7e Binary files /dev/null and b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/ACMirage/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..03605e7 Binary files /dev/null and b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/ACMirage/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..ed355ba Binary files /dev/null and b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/ACMirage/Dependencies/Scripts/ACMirage.lua b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Scripts/ACMirage.lua new file mode 100644 index 0000000..4e43a51 --- /dev/null +++ b/PluginCache/K4sh/Modules/ACMirage/Dependencies/Scripts/ACMirage.lua @@ -0,0 +1,252 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true +bChromatic = true +bAspectRatio = true +bAspectFix = true + +--GAME VARS +fFOV = 1.0 +fFOVScale = 1.0 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetfOffsetWidth() / DisplayInfo:GetfOffsetHeight() +Default_Aspect = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "ACMirage.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,50,250,0,1) + FOVSlider:SetTickFrequency(15) + FOVSlider:SetLabel1Text("0.5%") + FOVSlider:SetLabel2Text("2.5%") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Cinematics aspect fix","CKARatioFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKChromaticFix_Enable","Chromatic aberration disable","CKChromaticFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 48 8B ?? ?? ?? 0F ?? ?? 0F ?? ?? ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ACMirage.exe+3837B9C - F3 0F 59 F0 - mulss xmm6,xmm0 + --ACMirage.exe+3837BA0 - EB 08 - jmp ACMirage.exe+3837BAA + --ACMirage.exe+3837BA2 - F3 0F 59 B3 F4 02 00 00 - mulss xmm6,[rbx+000002F4] + --ACMirage.exe+3837BAA - 48 8B 5C 24 40 - mov rbx,[rsp+40] + --ACMirage.exe+3837BAF - 0F 28 C6 - movaps xmm0,xmm6 + end + + local tAddress = HackTool:AddAddress("CHROMATIC") + if HackTool:SignatureScan("80 ?? ?? ?? 75 ?? 49 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ACMirage.exe+254778D - 49 8B 46 30 - mov rax,[r14+30] + --ACMirage.exe+2547791 - 48 8B 48 60 - mov rcx,[rax+60] + --ACMirage.exe+2547795 - 80 79 32 01 - cmp byte ptr [rcx+32],01 + --ACMirage.exe+2547799 - 75 4E - jne ACMirage.exe+25477E9 + --ACMirage.exe+254779B - 49 8B CE - mov rcx,r14 + end + + local tAddress = HackTool:AddAddress("ASPECT") + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? ?? ?? ?? ?? 72 ?? 0F 2F ?? ?? ?? ?? ?? 73 ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ACMirage.exe+380C74C - F3 0F 5E C1 - divss xmm0,xmm1 + --ACMirage.exe+380C750 - 0F 28 D0 - movaps xmm2,xmm0 + --ACMirage.exe+380C753 - F3 0F 5C 05 B9 05 17 01 - subss xmm0,[ACMirage.exe+497CD14] + --ACMirage.exe+380C75B - F3 0F 59 15 E5 07 E3 00 - mulss xmm2,[ACMirage.exe+463CF48] + --ACMirage.exe+380C763 - 0F 54 05 66 CA DD 00 - andps xmm0,[ACMirage.exe+45E91D0] + end + + --local AspectRatios = HackTool:SignatureScanMulti("0F C6 ?? ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? F3 0F ?? ?? ?? ?? ?? ?? EB ?? F3 0F ?? ?? ?? ?? ?? ?? 41 ?? ?? ?? 0F","AspectRatio",PAGE_EXECUTE_READ,0xd,Process_EXEName) + --if AspectRatios ~= 2 then + -- return ErrorOccurred("Could not find aspect ratio injection point, " .. Process_FriendlyName .. + -- " may have updated to a version that is no longer supported.\r\n\r\n" .. + -- "Try selecting a different version and re-enable the fix." ) + --else + -- + -- local tAddress = HackTool:AddAddress("FirstAspectRatio", HackTool:GetAddress( string.format("AspectRatio%d",1) )) + -- print( tAddress:GetInfo(TYPE_ADDRESS) ) + -- + -- tAddress:AcquireAddress(0x4) + -- print( tAddress:GetInfo(TYPE_FLOAT) ) + -- Default_Aspect = tAddress:ReadFloat() + -- tAddress:SetAutoUnprotect(true) + --end + + return true + +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVScale") + Variables:PushFloat("DefaultAspect") + Variables:PushFloat("Aspect") + Variables:Allocate() + Variables["Aspect"]:WriteFloat(fAspectRatio) + Variables["DefaultAspect"]:WriteFloat(fDefaultAspectRatio) + + ResolutionChanged() + + asm = [[ + + (codecave)FOV,FOV_cc: + $$0 $$1,[(allocation)Variables->FOVScale] $ctx=1 + %end% + + (codecave)CHROMATIC,CHROMATIC_cc: + $$0 byte ptr [$$1],1 $ctx=1 + %end% + + (codecave)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->Aspect] $ctx=1 + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("CHROMATIC_cc",bChromatic) + Toggle_CodeCave("ASPECT_cc",bAspectFix) + end + + --if bAspectFix == true then + -- WriteAspectRatio() + --end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + +end + +function FOVSlider_Changed(Sender) + + fFOVScale = Sender:GetPosition() + fFOVScale = (fFOVScale / 100) + lblFOVSlider.Caption:SetCaption( string.format("Scaling: %.2f%%",fFOVScale) ) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["FOVScale"] then + Variables["FOVScale"]:WriteFloat(fFOVScale) + end + +end + +function ResolutionChanged() + + fAspectRatio = DisplayInfo:GetfOffsetWidth() / DisplayInfo:GetfOffsetHeight() + +end + +function Disable_Inject() + + RestoreAspectRatio() + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKChromaticFix_Changed(Sender) + + bChromatic = Toggle_CheckFix(Sender) + Toggle_CodeCave("CHROMATIC_cc",bChromatic) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspectFix = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspectFix) + --if bAspectFix == false then + -- RestoreAspectRatio() + --else + -- WriteAspectRatio() + --end + + ForceUpdate() + +end + +function WriteAspectRatio() + + local AspectRatio = HackTool:GetAddress("FirstAspectRatio") + + if AspectRatio then + AspectRatio:WriteFloat( fAspectRatio ) + end + +end + +function RestoreAspectRatio() + + local AspectRatio = HackTool:GetAddress("FirstAspectRatio") + + if AspectRatio then + AspectRatio:WriteFloat( Default_Aspect ) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/ACV/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/ACV/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..f36f2e9 Binary files /dev/null and b/PluginCache/K4sh/Modules/ACV/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/ACV/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/ACV/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..568d3cb Binary files /dev/null and b/PluginCache/K4sh/Modules/ACV/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/ACV/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/ACV/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a94aad6 Binary files /dev/null and b/PluginCache/K4sh/Modules/ACV/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/ACV/Dependencies/Scripts/ACV.lua b/PluginCache/K4sh/Modules/ACV/Dependencies/Scripts/ACV.lua new file mode 100644 index 0000000..465b303 --- /dev/null +++ b/PluginCache/K4sh/Modules/ACV/Dependencies/Scripts/ACV.lua @@ -0,0 +1,229 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true +bAspectRatio = true +bAspectFix = true + +--GAME VARS +fFOV = 1.0 +FOVScale = 1.0 +fFOVScalingIn = 1.0 +fFOVScalingOut = 1.0 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = 1.777777791 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Assassin's Creed Valhalla" +Process_ClassName = "*" +Process_EXEName = "ACValhalla.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,50,200,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("50%") + FOVSlider:SetLabel2Text("200%") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Cinematics aspect fix","CKARatioFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F3 0F 59 B3 ?? ?? ?? ?? 48 8B 5C 24 ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ACValhalla.exe+87B1BC: F3 0F 59 F0 - mulss xmm6,xmm0 + --ACValhalla.exe+87B1C0: EB 08 - jmp ACValhalla.exe+87B1CA + --ACValhalla.exe+87B1C2: F3 0F 59 B3 F4 02 00 00 - mulss xmm6,[rbx+000002F4] + --ACValhalla.exe+87B1CA: 48 8B 5C 24 40 - mov rbx,[rsp+40] + --ACValhalla.exe+87B1CF: 0F 28 C6 - movaps xmm0,xmm6 + end + + local tAddress = HackTool:AddAddress("Aspect") + + --if HackTool:SignatureScan("F3 0F 59 ?? ?? ?? ?? ?? BA ?? ?? ?? ?? F3 41",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + --ACValhalla.exe+189A498: 0F 28 F8 - movaps xmm7,xmm0 + --ACValhalla.exe+189A49B: 65 48 8B 04 25 58 00 00 00 - mov rax,gs:[00000058] + --ACValhalla.exe+189A4A4: F3 0F 59 3D F0 D5 CB 02 - mulss xmm7,[ACValhalla.exe+4557A9C] + --ACValhalla.exe+189A4AC: BA A4 0C 00 00 - mov edx,00000CA4 + --ACValhalla.exe+189A4B1: F3 41 0F 11 76 20 - movss [r14+20],xmm6 + + if HackTool:SignatureScan("F3 0F 5C ?? ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? 0F 54 ?? ?? ?? ?? ?? 0F 2F ?? ?? ?? ?? ?? 72",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ACValhalla.exe+85426C: F3 0F 5E C1 - divss xmm0,xmm1 + --ACValhalla.exe+854270: 0F 28 D0 - movaps xmm2,xmm0 + --ACValhalla.exe+854273: F3 0F 5C 05 21 38 D0 03 - subss xmm0,[ACValhalla.exe+4557A9C] + --ACValhalla.exe+85427B: F3 0F 59 15 F5 37 D0 03 - mulss xmm2,[ACValhalla.exe+4557A78] + --ACValhalla.exe+854283: 0F 54 05 06 4C CB 03 - andps xmm0,[ACValhalla.exe+4508E90] + end + + + local tAddress = HackTool:AddAddress("BaseAspect") + if HackTool:SignatureScan("AB AA AA 3F CD CC CC 3F 39 8E E3 3F",tAddress,PAGE_READONLY,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:AddSubOffset("AspectRatio",0x8):GetInfo(TYPE_FLOAT) ) + tAddress["AspectRatio"]:SetAutoUnprotect(true) + end + + return true +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVScalingIn") + Variables:PushFloat("FOVScalingOut") + Variables:PushFloat("FOV") + Variables:PushFloat("DefaultAspect") + Variables:PushFloat("Aspect") + Variables:Allocate() + Variables["FOVScalingIn"]:WriteFloat(fFOVScalingIn) + Variables["FOVScalingOut"]:WriteFloat(fFOVScalingOut) + Variables["DefaultAspect"]:WriteFloat(fDefaultAspectRatio) + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + fld dword ptr [$$2] $ctx=1 + fstp dword ptr [(allocation)Variables->FOVScalingIn] + mulss $$1,[(allocation)Variables->FOVScalingOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)Aspect,Aspect_cc: + ;mulss $$1,[(allocation)Variables->DefaultAspect] $ctx=1 + subss $$1,[(allocation)Variables->Aspect] $ctx=1 + jmp %returnaddress% + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("Aspect_cc",bAspectFix) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVScalingIn"] and Variables["FOVScalingOut"] then + fFOVScalingIn = Variables["FOVScalingIn"]:ReadFloat() + fFOVScalingOut = Variables["FOVScalingOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV Scaling In: %.2f, Out : %.2f", fFOVScalingIn, fFOVScalingOut)) + end + + if bAspectFix and Variables["Aspect"] then + local BaseAspect = HackTool:GetAddress("BaseAspect") + if BaseAspect then + fAspectRatio = DisplayInfo:GetfOffsetWidth() / DisplayInfo:GetfOffsetHeight() + Variables["Aspect"]:WriteFloat(fAspectRatio) + --BaseAspect["AspectRatio"]:WriteFloat( fAspectRatio ) + end + end + +end + +function FOVSlider_Changed(Sender) + + fFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f%%",fFOV) ) + + FOVScale = (fFOV / 100) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["FOVScalingOut"] then + Variables["FOVScalingOut"]:WriteFloat(FOVScale) + end + +end + +function ResolutionChanged() + +end + +function Disable_Inject() + + RestoreAspectRatio() + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function RestoreAspectRatio() + + local BaseAspect = HackTool:GetAddress("BaseAspect") + + if BaseAspect then + BaseAspect["AspectRatio"]:WriteFloat( fDefaultAspectRatio ) + end + +end + +function CKARatioFix_Changed(Sender) + + bAspectFix = Toggle_CheckFix(Sender) + Toggle_CodeCave("Aspect_cc",bAspectFix) + if bAspectFix == false then RestoreAspectRatio() end + ForceUpdate() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..8c7de61 Binary files /dev/null and b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..de61b8c Binary files /dev/null and b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..23908fd Binary files /dev/null and b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Scripts/APlagueTaleRequiem.lua b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Scripts/APlagueTaleRequiem.lua new file mode 100644 index 0000000..2e580bd --- /dev/null +++ b/PluginCache/K4sh/Modules/APlagueTaleRequiem/Dependencies/Scripts/APlagueTaleRequiem.lua @@ -0,0 +1,144 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 60 +fDefaultAspectRatio = 1.7777778 +fAdditionalFOV = 0 +fFOV = 60 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "APlagueTaleRequiem_x64.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F 10 87 ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? F3 0F ?? ?? ?? F3 0F 10 87",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(2)) + 25 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..29f7b45 Binary files /dev/null and b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..eb70af2 Binary files /dev/null and b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..d92a860 Binary files /dev/null and b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Scripts/AlanWakeII.lua b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Scripts/AlanWakeII.lua new file mode 100644 index 0000000..6fa0f1f --- /dev/null +++ b/PluginCache/K4sh/Modules/AlanWakeII/Dependencies/Scripts/AlanWakeII.lua @@ -0,0 +1,300 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true + +--GAME VARS +fAdditionalAimFOV = 0 +fAdditionalStoryFOV = 0 +fAdditionalFlashlightBoostFOV = 0 +fAdditionalFlareIgnitedFOV = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "AlanWake2.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOVs fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("StoryFOVSlider","StoryFOVSlider_Changed",35,100,160,35,0,70,0,1) + StoryFOVSlider:SetTickFrequency(5) + StoryFOVSlider:SetLabel1Text("-20") + StoryFOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixedFOVSlider("AimFOVSlider","AimFOVSlider_Changed",35,160,160,35,0,70,0,1) + AimFOVSlider:SetTickFrequency(5) + AimFOVSlider:SetLabel1Text("-20") + AimFOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixedFOVSlider("FlashlightBoostFOVSlider","FlashlightBoostFOVSlider_Changed",35,220,160,35,0,70,0,1) + FlashlightBoostFOVSlider:SetTickFrequency(5) + FlashlightBoostFOVSlider:SetLabel1Text("-20") + FlashlightBoostFOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixedFOVSlider("FlareIgnitedFOVSlider","FlareIgnitedFOVSlider_Changed",35,280,160,35,0,70,0,1) + FlareIgnitedFOVSlider:SetTickFrequency(5) + FlareIgnitedFOVSlider:SetLabel1Text("-20") + FlareIgnitedFOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("C5 FA ?? ?? ?? C5 ?? ?? ?? C5 E2 ?? ?? ?? ?? ?? ?? C5 E2",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --AlanWake2.exe+1AA3ECB - C4 C1 78 28 D2 - vmovaps xmm2,xmm10 + --AlanWake2.exe+1AA3ED0 - 48 8B CE - mov rcx,rsi + --AlanWake2.exe+1AA3ED3 - C5 FA 10 48 28 - vmovss xmm1,[rax+28] + --AlanWake2.exe+1AA3ED8 - C5 F2 5F DA - vmaxss xmm3,xmm1,xmm2 + --AlanWake2.exe+1AA3EDC - C5 E2 5D 1D 60 C2 90 01 - vminss xmm3,xmm3,[AlanWake2.exe+33B0144] + end + + return true + +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("AdditionalAimFOV") + Variables:PushFloat("AdditionalStoryFOV") + Variables:PushFloat("AdditionalFlashlightFOV") + Variables:PushFloat("AdditionalFlareIgnitedFOV") + Variables:Allocate() + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss $$1,[$$2] $ctx=1 + comiss $$1,[Aim] $ctx=1 + je AimFOV + comiss $$1,[Story] $ctx=1 + je StoryFOV + comiss $$1,[Flashlight_boost] $ctx=1 + je FlashLight_boostFOV + comiss $$1,[Flare_ignited] $ctx=1 + je Flare_ignitedFOV + jmp %returnaddress% + + AimFOV: + addss $$1,[(allocation)Variables->AdditionalAimFOV] $ctx=1 + jmp %returnaddress% + + StoryFOV: + addss $$1,[(allocation)Variables->AdditionalStoryFOV] $ctx=1 + jmp %returnaddress% + + FlashLight_boostFOV: + addss $$1,[(allocation)Variables->AdditionalFlashlightFOV] $ctx=1 + jmp %returnaddress% + + Flare_ignitedFOV: + addss $$1,[(allocation)Variables->AdditionalFlareIgnitedFOV] $ctx=1 + jmp %returnaddress% + %end% + + Aim: (float)52.0f + Story: (float)70.0f + Flashlight_boost: (float)65.0f + Flare_ignited: (float)75.0f + + ]] + + RemoveAVXInstructions() + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + RestoreAVXInstructions() + return ErrorOccurred("Assembly compilation failed...") + else + RestoreAVXInstructions() + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_Aim_FOV() + Write_Story_FOV() + Write_Flashlight_Boost_FOV() + Write_Flare_Ignited_FOV() + +end + +function Periodic() + + local fStoryFOVIn = 70 + local fStoryFOVOut = fStoryFOVIn + fAdditionalStoryFOV + local fAimFOVIn = 52 + local fAimFOVOut = fAimFOVIn + fAdditionalAimFOV + local fFlashlightBoostFOVIn= 65 + local fFlashlightBoostFOVOut = fFlashlightBoostFOVIn + fAdditionalFlashlightBoostFOV + local fFlareIgnitedFOVIn = 75 + local fFlareIgnitedFOVOut = fFlareIgnitedFOVIn + fAdditionalFlareIgnitedFOV + + local Variables = HackTool:GetAllocation("Variables") + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nWorld FOV In: %0.f -- FOV Out : %.0f , Aim FOV In: %0.f -- FOV Out : %.0f\r\nFlashlight boost FOV In: %0.f -- FOV Out : %.0f , Flare ignited FOV In: %0.f -- FOV Out : %.0f", fStoryFOVIn, fStoryFOVOut, fAimFOVIn, fAimFOVOut, fFlashlightBoostFOVIn, fFlashlightBoostFOVOut, fFlareIgnitedFOVIn, fFlareIgnitedFOVOut)) + +end + +function AimFOVSlider_Changed(Sender) + + fAdditionalAimFOV = Sender:GetPosition() - 20 + lblAimFOVSlider.Caption:SetCaption( string.format("Aim: %.2f",fAdditionalAimFOV) ) + + if bFOV then + Write_Aim_FOV() + end + + ForceUpdate() + +end + +function StoryFOVSlider_Changed(Sender) + + fAdditionalStoryFOV = Sender:GetPosition() - 20 + lblStoryFOVSlider.Caption:SetCaption( string.format("World: %.2f",fAdditionalStoryFOV) ) + + if bFOV then + Write_Story_FOV() + end + + ForceUpdate() + +end + +function FlashlightBoostFOVSlider_Changed(Sender) + + fAdditionalFlashlightBoostFOV = Sender:GetPosition() - 20 + lblFlashlightBoostFOVSlider.Caption:SetCaption( string.format("Flash light boost: %.2f",fAdditionalFlashlightBoostFOV) ) + + if bFOV then + Write_Flashlight_Boost_FOV() + end + + ForceUpdate() + +end + +function FlareIgnitedFOVSlider_Changed(Sender) + + fAdditionalFlareIgnitedFOV = Sender:GetPosition() - 20 + lblFlareIgnitedFOVSlider.Caption:SetCaption( string.format("Flare ignition: %.2f",fAdditionalFlareIgnitedFOV) ) + + if bFOV then + Write_Flare_Ignited_FOV() + end + + ForceUpdate() + +end + +function Write_Aim_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalAimFOV"] then + Variables["AdditionalAimFOV"]:WriteFloat(fAdditionalAimFOV) + end + +end + +function Write_Story_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalStoryFOV"] then + Variables["AdditionalStoryFOV"]:WriteFloat(fAdditionalStoryFOV) + end + +end + +function Write_Flashlight_Boost_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFlashlightFOV"] then + Variables["AdditionalFlashlightFOV"]:WriteFloat(fAdditionalFlashlightBoostFOV) + end + +end + +function Write_Flare_Ignited_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFlareIgnitedFOV"] then + Variables["AdditionalFlareIgnitedFOV"]:WriteFloat(fAdditionalFlareIgnitedFOV) + end + +end + +function RemoveAVXInstructions() + + local tSuspendedThreadID = HackTool:SuspendAttachedThread() + + local tAddress = HackTool:GetAddress("FOV") + tAddress:WriteByte(0xF3,0) + tAddress:WriteByte(0x0F,1) + + HackTool:ResumeThread(tSuspendedThreadID) + +end + +function RestoreAVXInstructions() + + local tSuspendedThreadID = HackTool:SuspendAttachedThread() + + local tAddress = HackTool:GetAddress("FOV") + tAddress:WriteByte(0xC5,0) + tAddress:WriteByte(0xFA,1) + + HackTool:ResumeThread(tSuspendedThreadID) + +end + + +function ResolutionChanged() + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..b8c5fc0 Binary files /dev/null and b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..4878ef7 Binary files /dev/null and b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..51b9abb Binary files /dev/null and b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Scripts/AloneInTheDarkRemake.lua b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Scripts/AloneInTheDarkRemake.lua new file mode 100644 index 0000000..b504525 --- /dev/null +++ b/PluginCache/K4sh/Modules/AloneInTheDarkRemake/Dependencies/Scripts/AloneInTheDarkRemake.lua @@ -0,0 +1,358 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.778 +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bHUDSafeZone = true +bCinematicsFPSLimit = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "AloneInTheDark-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddHeader("HeaderHUDSZ","HUD safe zone",15,160,210,17) + DefaultControls.AddFixedFOVSlider("HUD","HUDSZSlider_Changed",55,190,125,35,0,40,0,1) + HUD:SetTickFrequency(5) + HUD:SetLabel1Text("0") + HUD:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKCINEMATICSFPSFix_Enable","Cinematics FPS fix (uncapped)","CKCINEMATICSFPSLimitFix_Changed",255,161,190,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("C6 84 ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --AloneInTheDark-Win64-Shipping.exe+361840D - 74 05 - je AloneInTheDark-Win64-Shipping.exe+3618414 + --AloneInTheDark-Win64-Shipping.exe+361840F - E8 5C 30 37 FE - call AloneInTheDark-Win64-Shipping.exe+198B470 + --AloneInTheDark-Win64-Shipping.exe+3618414 - 0F 28 C6 - movaps xmm0,xmm6 + --AloneInTheDark-Win64-Shipping.exe+3618417 - 48 8B 8C 24 20 06 00 00 - mov rcx,[rsp+00000620] + --AloneInTheDark-Win64-Shipping.exe+361841F - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6 ?? ?? ?? ?? ?? 33 ?? ?? 83 ?? ?? 31 ?? ?? 0F B6 ",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + local tAddress = HackTool:AddAddress("ASPECT", HackTool:GetAddress( string.format("ASPECTS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --AloneInTheDark-Win64-Shipping.exe+3213EC2 - F3 0F 10 83 08 02 00 00 - movss xmm0,[rbx+00000208] + --AloneInTheDark-Win64-Shipping.exe+3213ECA - F3 0F 11 47 18 - movss [rdi+18],xmm0 + --AloneInTheDark-Win64-Shipping.exe+3213ECF - 8B 83 18 02 00 00 - mov eax,[rbx+00000218] + --AloneInTheDark-Win64-Shipping.exe+3213ED5 - 89 47 2C - mov [rdi+2C],eax + --AloneInTheDark-Win64-Shipping.exe+3213ED8 - 0F B6 83 1C 02 00 00 - movzx eax,byte ptr [rbx+0000021C] + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + + if HackTool:SignatureScan("F3 ?? ?? ?? ?? 75 ?? E8 ?? ?? ?? ?? 40 ?? ?? ?? 0F 84",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --AloneInTheDark-Win64-Shipping.exe+2EB8F4A - FF D0 - call rax + --AloneInTheDark-Win64-Shipping.exe+2EB8F4C - 48 8B 5C 24 40 - mov rbx,[rsp+40] + --AloneInTheDark-Win64-Shipping.exe+2EB8F51 - 0F 10 00 - movups xmm0,[rax] + --AloneInTheDark-Win64-Shipping.exe+2EB8F54 - 48 8B C7 - mov rax,rdi + --AloneInTheDark-Win64-Shipping.exe+2EB8F57 - 0F 11 07 - movups [rdi],xmm0 + end + + local tAddress = HackTool:AddAddress("CINEMATICFPSLIMIT") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? EB ?? 0F ?? ?? 48 8B ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --AloneInTheDark-Win64-Shipping.exe+379E354 - 3B 05 3E 9C 70 02 - cmp eax,[AloneInTheDark-Win64-Shipping.exe+5EA7F98] + --AloneInTheDark-Win64-Shipping.exe+379E35A - 0F 95 C3 - setne bl + --AloneInTheDark-Win64-Shipping.exe+379E35D - F3 0F 10 04 9F - movss xmm0,[rdi+rbx*4] + --AloneInTheDark-Win64-Shipping.exe+379E362 - EB 03 - jmp AloneInTheDark-Win64-Shipping.exe+379E367 + --AloneInTheDark-Win64-Shipping.exe+379E364 - 0F 28 C6 - movaps xmm0,xmm6 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:PushFloat("HUDSafeZoneDefRight") + Variables:PushFloat("HUDSafeZoneDefBottom") + Variables:PushFloat("HUD_Left") + Variables:PushFloat("HUD_Width") + Variables:PushFloat("tmp") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + Variables["HUDSafeZoneDefRight"]:WriteFloat(1) + Variables["HUDSafeZoneDefBottom"]:WriteFloat(1) + + ResolutionChanged() + + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + fld dword ptr [(allocation)Variables->HUD_Width] + fdiv dword ptr [$$2+8] $ctx=1 + fstp dword ptr [$$2] $ctx=1 + fld dword ptr [(allocation)Variables->HUD_Left] + fstp dword ptr [$$2+0x2c] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + tmp: (float)1.0 + + (codecave:jmp)CINEMATICFPSLIMIT,CINEMATICFPSLIMIT_cc: + $$0 $$1,[FPSLimit] $ctx=1 + jmp %returnaddress% + %end% + + FPSLimit: (float)0f + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + Toggle_CodeCave("CINEMATICFPSLIMIT_cc",bCinematicsFPSLimit) + end + + Write_FOV() + Write_AR() + CalculateHUDScaling() + Write_HUD_Safe_Zone() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV: %.2f, FOV Out: %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function CalculateHUDScaling() + + local Width = DisplayInfo:GetWidth() + + if fHUDSafeZOneLeft ~= 0 then + HUD_With_factor = 1 - ((fHUDSafeZOneLeft * 2) / 100) + HUD_Left_factor = fHUDSafeZOneLeft / 100 + HUD_Width = Width * HUD_With_factor + HUD_Left = Width * HUD_Left_factor + else + HUD_Width = DisplayInfo:GetfOffsetWidth(0,0) + HUD_Left = DisplayInfo:GetiOffsetX(0) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function HUDSZSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + lblHUD.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + CalculateHUDScaling() + Write_HUD_Safe_Zone() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AR() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == true then + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + end + +end + +function Write_HUD_Safe_Zone() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["HUD_Left"] and Variables["HUD_Width"] then + Variables["HUD_Left"]:WriteFloat(HUD_Left) + Variables["HUD_Width"]:WriteFloat(HUD_Width) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Write_AR() + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Write_HUD_Safe_Zone() + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function CKCINEMATICSFPSLimitFix_Changed(Sender) + + bCinematicsFPSLimit = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICFPSLIMIT_cc",bCinematicsFPSLimit) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Avowed/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Avowed/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..ee3522d Binary files /dev/null and b/PluginCache/K4sh/Modules/Avowed/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Avowed/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Avowed/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..5a362fe Binary files /dev/null and b/PluginCache/K4sh/Modules/Avowed/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Avowed/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Avowed/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a1cf717 Binary files /dev/null and b/PluginCache/K4sh/Modules/Avowed/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Avowed/Dependencies/Scripts/Avowed.lua b/PluginCache/K4sh/Modules/Avowed/Dependencies/Scripts/Avowed.lua new file mode 100644 index 0000000..861d30f --- /dev/null +++ b/PluginCache/K4sh/Modules/Avowed/Dependencies/Scripts/Avowed.lua @@ -0,0 +1,252 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Avowed-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Cutscenes pillarboxing fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 83",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Avowed-Win64-Shipping.exe+3396264 - 48 8B 01 - mov rax,[rcx] + --Avowed-Win64-Shipping.exe+3396267 - FF 90 50 07 00 00 - call qword ptr [rax+00000750] + --Avowed-Win64-Shipping.exe+339626D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Avowed-Win64-Shipping.exe+3396272 - 48 83 C4 28 - add rsp,28 + --Avowed-Win64-Shipping.exe+3396276 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT1") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? EB ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Avowed-Win64-Shipping.exe+2A21902 - 0F 2F CA - comiss xmm1,xmm2 + --Avowed-Win64-Shipping.exe+2A21905 - 76 0E - jna "Avowed-Win64-Shipping.exe"+2A21915 + --Avowed-Win64-Shipping.exe+2A21907 - F3 0F 10 83 1C 0B 00 00 - movss xmm0,[rbx+00000B1C] + --Avowed-Win64-Shipping.exe+2A2190F - F3 0F 5E C1 - divss xmm0,xmm1 + --Avowed-Win64-Shipping.exe+2A21913 - EB 03 - jmp "Avowed-Win64-Shipping.exe"+2A21918 + end + + local tAddress = HackTool:AddAddress("ASPECT2") + + if HackTool:SignatureScan("0F ?? ?? 76 ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 76",tAddress,PAGE_EXECUTE_READ,0x18,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Avowed-Win64-Shipping.exe+2A2140C - 0F 2F C2 - comiss xmm0,xmm2 + --Avowed-Win64-Shipping.exe+2A2140F - F3 0F 10 89 3C 0B 00 00 - movss xmm1,[rcx+00000B3C] + --Avowed-Win64-Shipping.exe+2A21417 - F3 0F 59 89 1C 0B 00 00 - mulss xmm1,[rcx+00000B1C] + --Avowed-Win64-Shipping.exe+2A2141F - 76 18 - jna "Avowed-Win64-Shipping.exe"+2A21439 + --Avowed-Win64-Shipping.exe+2A21421 - 0F 28 D1 - movaps xmm2,xmm1 + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8D ?? ?? ?? ?? ?? 48 C1",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Avowed-Win64-Shipping.exe+1F17EF3 - 75 05 - jne "Avowed-Win64-Shipping.exe"+1F17EFA + --Avowed-Win64-Shipping.exe+1F17EF5 - BF 04 00 00 00 - mov edi,00000004 + --Avowed-Win64-Shipping.exe+1F17EFA - 8B 3C 37 - mov edi,[rdi+rsi] + --Avowed-Win64-Shipping.exe+1F17EFD - 48 8B CB - mov rcx,rbx + --Avowed-Win64-Shipping.exe+1F17F00 - E8 EB A0 53 01 - call "Avowed-Win64-Shipping.exe"+3451FF0 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("NewFactor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn], $$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT1,ASPECT1_cc: + %originalcode% + fld dword ptr [$$2+4] $ctx=1 + fmul dword ptr [(allocation)Variables->ScreenRatio] + fstp dword ptr [(allocation)Variables->NewFactor] + $$0 $$1,[(allocation)Variables->NewFactor] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT2,ASPECT2_cc: + fld dword ptr [$$2+4] $ctx=1 + fmul dword ptr [(allocation)Variables->ScreenRatio] + fstp dword ptr [(allocation)Variables->NewFactor] + $$0 $$1,[(allocation)Variables->NewFactor] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT1_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Out : %.2f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT1_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..3411d11 Binary files /dev/null and b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..14dab89 Binary files /dev/null and b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..657d404 Binary files /dev/null and b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Scripts/BanishersGONE.lua b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Scripts/BanishersGONE.lua new file mode 100644 index 0000000..ff753c2 --- /dev/null +++ b/PluginCache/K4sh/Modules/BanishersGONE/Dependencies/Scripts/BanishersGONE.lua @@ -0,0 +1,402 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalOtherFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fDefaultRatio219 = 2.33333 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Banishers-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddHeader("Header_OtherFOV","Other FOV fine adjustment",15,160,210,17) + DefaultControls.AddFixedFOVSlider("FOVOtherSlider","FOVOtherSlider_Changed",55,190,125,35,0,70,0,1) + + FOVOtherSlider:SetTickFrequency(10) + FOVOtherSlider:SetLabel1Text("-20") + FOVOtherSlider:SetLabel2Text("+50") + + DefaultControls.AddHeader("Header_MINFOV","Minimum FOV fine adjustment",15,250,210,17) + DefaultControls.AddFixedFOVSlider("MINFOVSlider","MINFOVSlider_Changed",55,280,125,35,10,80,0,1) + + MINFOVSlider:SetTickFrequency(10) + MINFOVSlider:SetLabel1Text("10") + MINFOVSlider:SetLabel2Text("80") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKMINFOVFix_Enable","Minimum FOV fix","CKMINFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field disable","CKDOFFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration disable","CKFRINGEFix_Changed",255,181,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? C6 84 ?? ?? ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ??",tAddress,PAGE_EXECUTE_READ,0x06,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Banishers-Win64-Shipping.exe+49C438A - 48 8D 54 24 30 - lea rdx,[rsp+30] + --Banishers-Win64-Shipping.exe+49C438F - FF 90 E8 06 00 00 - call qword ptr [rax+000006E8] + --Banishers-Win64-Shipping.exe+49C4395 - F3 0F 10 70 30 - movss xmm6,[rax+30] + --Banishers-Win64-Shipping.exe+49C439A - C6 84 24 F0 07 00 00 00 - mov byte ptr [rsp+000007F0],00 + --Banishers-Win64-Shipping.exe+49C43A2 - 48 8B 8C 24 70 07 00 00 - mov rcx,[rsp+00000770] + end + + local tResultCount = HackTool:SignatureScanMulti("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B ?? 48 8B FA 0F ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ??","ASPECTS",PAGE_EXECUTE_READ,0x53,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find ASPECTS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("ASPECT2", HackTool:GetAddress( string.format("ASPECTS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("F3 0F ?? ?? 08 ?? ?? ?? 0F ?? ?? ?? A8 ?? 74",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Banishers-Win64-Shipping.exe+4A81A5D - F3 41 0F 59 C8 - mulss xmm1,xmm8 + --Banishers-Win64-Shipping.exe+4A81A62 - F3 0F 58 C8 - addss xmm1,xmm0 + --Banishers-Win64-Shipping.exe+4A81A66 - F3 0F 11 8F 08 06 00 00 - movss [rdi+00000608],xmm1 + --Banishers-Win64-Shipping.exe+4A81A6E - 0F B6 42 16 - movzx eax,byte ptr [rdx+16] + --Banishers-Win64-Shipping.exe+4A81A72 - A8 20 - test al,20 + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 41 8B ?? ?? 39 ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Banishers-Win64-Shipping.exe+4A82B41 - 48 8B 05 E0 BC 8D 03 - mov rax,[Banishers-Win64-Shipping.exe+835E828] + --Banishers-Win64-Shipping.exe+4A82B48 - 39 30 - cmp [rax],esi + --Banishers-Win64-Shipping.exe+4A82B4A - 7F 06 - jg Banishers-Win64-Shipping.exe+4A82B52 + --Banishers-Win64-Shipping.exe+4A82B4C - 89 B3 4C 1F 00 00 - mov [rbx+00001F4C],esi + --Banishers-Win64-Shipping.exe+4A82B52 - 41 8B 04 3E - mov eax,[r14+rdi] + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("MinFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalOtherFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushInt("Aspect") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["MinFOV"]:WriteFloat(10) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AdditionalOtherFOV"]:WriteFloat(fAdditionalOtherFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + if bAspect then + Variables["Aspect"]:WriteInt(1) + else + Variables["Aspect"]:WriteInt(0) + end + + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + maxss $$1,[(allocation)Variables->MinFOV] $ctx=1 + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + pushfq + push rbx + mov ebx,[(allocation)Variables->Aspect] + cmp ebx,1 + jne next + + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + + next: + mov ebx,[(allocation)Variables->AspectRatio] + cmp ebx,0x40155555 + jne otherFOV + + fadd dword ptr [(allocation)Variables->AdditionalFOV] + jmp exit + + otherFOV: + fadd dword ptr [(allocation)Variables->AdditionalOtherFOV] + + exit: + pop rbx + popfq + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT2,ASPECT2_cc: + $$0 [(allocation)Variables->AspectRatio],$$2 $ctx=1 + push rbx + mov ebx,[(allocation)Variables->Aspect] + cmp ebx,1 + pop rbx + jne exitAspect + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + + exitAspect: + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + nop dword ptr [rax+rax] + nop dword ptr [rax+rax] + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("ASPECT2_cc",bFixEnabled) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + end + + Write_FOV() + Write_MinFOV() + Write_OtherFOV() + Write_AspectRatio() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function FOVOtherSlider_Changed(Sender) + + fAdditionalOtherFOV = Sender:GetPosition() - 20 + lblFOVOtherSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalOtherFOV) ) + + Write_OtherFOV() + ForceUpdate() + +end + +function MINFOVSlider_Changed(Sender) + + fMinFOV = Sender:GetPosition() + lblMINFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fMinFOV) ) + + Write_MinFOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_OtherFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalOtherFOV"] then + if bFOV == true then + Variables["AdditionalOtherFOV"]:WriteFloat(fAdditionalOtherFOV) + else + Variables["AdditionalOtherFOV"]:WriteFloat(0) + end + end + +end + +function Write_MinFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["MinFOV"] then + if bMinFOV == true then + Variables["MinFOV"]:WriteFloat(fMinFOV) + else + Variables["MinFOV"]:WriteFloat(10) + end + end + +end + +function Write_AspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == false then + Variables["Aspect"]:WriteInt(0) + else + Variables["Aspect"]:WriteInt(1) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFixEnabled) + ForceUpdate() + +end + +function CKMINFOVFix_Changed(Sender) + + bMinFOV = Toggle_CheckFix(Sender) + Write_MinFOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Write_AspectRatio() + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Biomutant/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..35d1241 Binary files /dev/null and b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Biomutant/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..4b7366e Binary files /dev/null and b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Biomutant/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..3dfd5e8 Binary files /dev/null and b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Biomutant/Dependencies/Scripts/Biomutant.lua b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Scripts/Biomutant.lua new file mode 100644 index 0000000..4d818dc --- /dev/null +++ b/PluginCache/K4sh/Modules/Biomutant/Dependencies/Scripts/Biomutant.lua @@ -0,0 +1,133 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Biomutant-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 1500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Auto", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FOV","Additional FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("VerticalFOV") + + if HackTool:SignatureScan("F3 0F 11 83 EC 04 00 00",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV") + Variables:PushFloat("InGameFOV") + Variables:Allocate() + + local asm = [[ + + (codecave:jmp)VerticalFOV,VerticalFOV_cc: + movss xmm0,[rbx+0x000004EC] ; Retrieve in game FOV + movss [(allocation)Variables->InGameFOV],xmm0 ; Store in game FOV + movss xmm0,[rbx+0x000004C8] ; Retrieve Saved FOV + addss xmm0,[(allocation)Variables->FOV] ; Add user FOV value + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"VerticalFOV") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("VerticalFOV_cc",bFOV) + if bFOV then + WriteFOV() + end + end + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["InGameFOV"] then + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nVertical FOV %.2f\r\n", Variables["InGameFOV"]:ReadFloat() ) ) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetScaledFloat(2) - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + if bFixEnabled then + WriteFOV() + end + + ForceUpdate() + +end + +function WriteFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function ResolutionChanged() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..4ef6a3e Binary files /dev/null and b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..3ae5d18 Binary files /dev/null and b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..5aa93e5 Binary files /dev/null and b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Scripts/BlackMythWukong.lua b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Scripts/BlackMythWukong.lua new file mode 100644 index 0000000..b7f9cc6 --- /dev/null +++ b/PluginCache/K4sh/Modules/BlackMythWukong/Dependencies/Scripts/BlackMythWukong.lua @@ -0,0 +1,422 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalCinematicsFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFactor = 0.00872665 +fSharpening = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true +bSharpening = true +bVignetting = true +bFog = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "b1-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + DefaultControls.AddHeader("Header_Sharpening","Image sharpening adjustment",15,165,210,17) + DefaultControls.AddFixedFOVSlider("SharpeningSlider","SharpeningSlider_Changed",55,195,125,35,0,100,0,1) + SharpeningSlider:SetTickFrequency(10) + SharpeningSlider:SetLabel1Text("0") + SharpeningSlider:SetLabel2Text("10") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFOVFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKSHARPENINGFix_Enable","Sharpening fix","CKSHARPENINGFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKVIGNETTINGFix_Enable","Vignetting fix","CKVIGNETTINGFix_Changed",255,201,180,14) + DefaultControls.AddFixToggle("CKFOGGFix_Enable","Fog fix","CKFOGFix_Changed",255,221,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("C6 84 ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+E9F874D - 74 05 - je b1-Win64-Shipping.exe+E9F8754 + --b1-Win64-Shipping.exe+E9F874F - E8 2C FD 27 FE - call b1-Win64-Shipping.exe+CC78480 + --b1-Win64-Shipping.exe+E9F8754 - 0F 28 C6 - movaps xmm0,xmm6 + --b1-Win64-Shipping.exe+E9F8757 - 48 8B 8C 24 C0 08 00 00 - mov rcx,[rsp+000008C0] + --b1-Win64-Shipping.exe+E9F875F - 48 33 CC - xor rcx,rsp + end + + local tResultCount = HackTool:SignatureScanMulti("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 ?? ?? 48 ?? ?? 0F ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ?? 0F 10 ?? ?? 0F 11 ?? ?? F2 0F","ASPECTS",PAGE_EXECUTE_READ,0x53,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find ASPECTs injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + local tAddress = HackTool:AddAddress("ASPECT", HackTool:GetAddress( string.format("ASPECTS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+B5B670D - 89 41 40 - mov [rcx+40],eax + --b1-Win64-Shipping.exe+B5B6710 - 8B 42 44 - mov eax,[rdx+44] + --b1-Win64-Shipping.exe+B5B6713 - 89 41 44 - mov [rcx+44],eax + --b1-Win64-Shipping.exe+B5B6716 - 8B 49 48 - mov ecx,[rcx+48] + --b1-Win64-Shipping.exe+B5B6719 - 33 4A 48 - xor ecx,[rdx+48] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+D6E4FE0 - 48 8B 05 91 BC 11 10 - mov rax,[b1-Win64-Shipping.exe+1D800C78] + --b1-Win64-Shipping.exe+D6E4FE7 - 48 8B CB - mov rcx,rbx + --b1-Win64-Shipping.exe+D6E4FEA - 8B 78 04 - mov edi,[rax+04] + --b1-Win64-Shipping.exe+D6E4FED - E8 2E 86 3B 01 - call b1-Win64-Shipping.exe+EA9D620 + --b1-Win64-Shipping.exe+D6E4FF2 - 48 63 C8 - movsxd rcx,eax + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05 ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+EA98935 - 48 8B 05 6C 0A E3 0E - mov rax,[b1-Win64-Shipping.exe+1D8C93A8] + --b1-Win64-Shipping.exe+EA9893C - 39 30 - cmp [rax],esi + --b1-Win64-Shipping.exe+EA9893E - 7F 06 - jg b1-Win64-Shipping.exe+EA98946 + --b1-Win64-Shipping.exe+EA98940 - 89 B3 AC 1D 00 00 - mov [rbx+00001DAC],esi + --b1-Win64-Shipping.exe+EA98946 - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("SHARPENING") + + if HackTool:SignatureScan("F3 44 ?? ?? ?? ?? 44 0F ?? ?? 73 ?? 45 0F ?? ?? EB",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+D767FBA - 44 0F 28 F8 - movaps xmm15,xmm0 + --b1-Win64-Shipping.exe+D767FBE - 48 8B 05 93 50 0A 10 - mov rax,[b1-Win64-Shipping.exe+1D80D058] + --b1-Win64-Shipping.exe+D767FC5 - F3 44 0F10 60 04 - movss xmm12,[rax+04] + --b1-Win64-Shipping.exe+D767FCB - 44 0F 2F E7 - comiss xmm12,xmm7 + --b1-Win64-Shipping.exe+D767FCF - 73 06 - jae b1-Win64-Shipping.exe+D767FD7 + end + + local tAddress = HackTool:AddAddress("VIGNETTING") + + if HackTool:SignatureScan("8B ?? 83 ?? ?? 7D ?? 89 B3 ?? ?? ?? ?? EB",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+EA989B3 - C7 83 80 1F 00 00 00 00 80 3F - mov [rbx+00001F80],3F800000 + --b1-Win64-Shipping.exe+EA989BD - 48 8B 05 44 FB E2 0E - mov rax,[b1-Win64-Shipping.exe+1D8C8508] + --b1-Win64-Shipping.exe+EA989C4 - 8B 08 - mov ecx,[rax] + --b1-Win64-Shipping.exe+EA989C6 - 83 F9 02 - cmp ecx,02 + --b1-Win64-Shipping.exe+EA989C9 - 7D 08 - jnl b1-Win64-Shipping.exe+EA989D3 + end + + local tAddress = HackTool:AddAddress("FOG") + + if HackTool:SignatureScan("75 ?? B3 ?? EB ?? 32 ?? 48 8B ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+D40D79D - 48 8B 05 A4 08 3A 10 - mov rax,[b1-Win64-Shipping.exe+1D7AE048] + --b1-Win64-Shipping.exe+D40D7A4 - 83 78 04 01 - cmp dword ptr [rax+04],01 + --b1-Win64-Shipping.exe+D40D7A8 - 75 04 - jne b1-Win64-Shipping.exe+D40D7AE + --b1-Win64-Shipping.exe+D40D7AA - B3 01 - mov bl,01 + --b1-Win64-Shipping.exe+D40D7AC - EB 02 - jmp b1-Win64-Shipping.exe+D40D7B0 + end + + return true + +end + +function Enable_Inject() + local NearTo = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables", 0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CinematicsFOVIn") + Variables:PushFloat("CinematicsFOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("Sharpening") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["Sharpening"]:WriteFloat(fSharpening) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + fld dword ptr [rdx+0x44] + fstp dword ptr [(allocation)Variables->AspectRatio] + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)SHARPENING,SHARPENING_cc: + $$0 $$1,[(allocation)Variables->Sharpening] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)VIGNETTING,VIGNETTING_cc: + xor $$1,$$1 $ctx=1 + %end% + + (codecave)FOG,FOG_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("SHARPENING_cc",bSharpening) + Toggle_CodeCave("VIGNETTING_cc",bVignetting) + Toggle_CodeCave("FOG_cc",bFog) + end + + Write_FOV() + Write_Sharpening() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated; %.2f, Out : %.2f", fFOVIn, fCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function CinematicsFOVSlider_Changed(Sender) + + fAdditionalCinematicsFOV = Sender:GetPosition() - 20 + lblCinematicsFOVSlider.Caption:SetCaption( string.format("Cinematics FOV: %.0f",fAdditionalCinematicsFOV) ) + Write_Cinematics_FOV() + ForceUpdate() + +end + +function FRINGESlider_Changed(Sender) + + fFRINGE = Sender:GetPosition() + lblFRINGESlider.Caption:SetCaption( string.format("Value: %.2f",fFRINGE / 100) ) + Write_FRINGE() + ForceUpdate() + +end + +function SharpeningSlider_Changed(Sender) + + fSharpening = Sender:GetPosition() / 10 + lblSharpeningSlider.Caption:SetCaption( string.format("Value: %.2f",fSharpening) ) + Write_Sharpening() + ForceUpdate() + +end + +function Write_Sharpening() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["Sharpening"] then + if bSharpening == true then + Variables["Sharpening"]:WriteFloat(fSharpening) + else + Variables["Sharpening"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + local Variables = HackTool:GetAllocation("Variables") + Toggle_CodeCave("ASPECT_cc",bAspect) + if Variables and Variables["AspectRatio"] and not bAspect then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKSHARPENINGFix_Changed(Sender) + + bSharpening = Toggle_CheckFix(Sender) + Write_Sharpening() + Toggle_CodeCave("SHARPENING_cc",bSharpening) + ForceUpdate() + +end + +function CKVIGNETTINGFix_Changed(Sender) + + bVignetting = Toggle_CheckFix(Sender) + Toggle_CodeCave("VIGNETTING_cc",bVignetting) + ForceUpdate() + +end + +function CKFOGFix_Changed(Sender) + + bFog = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOG_cc",bFog) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..910f565 Binary files /dev/null and b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..ce72194 Binary files /dev/null and b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..ff875d9 Binary files /dev/null and b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Scripts/BladesOfFire.lua b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Scripts/BladesOfFire.lua new file mode 100644 index 0000000..5be6fab --- /dev/null +++ b/PluginCache/K4sh/Modules/BladesOfFire/Dependencies/Scripts/BladesOfFire.lua @@ -0,0 +1,195 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "BladesOfFire.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 200 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F 10 ?? ?? ?? ?? ?? F3 0F 5E ?? ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --BladesOfFire.exe+C0895F - CC - int 3 + --BladesOfFire.exe+C08960 - F3 0F 10 05 60 DD 2E 01 - movss xmm0,[BladesOfFire.exe+1EF66C8] + --BladesOfFire.exe+C08968 - F3 0F 5E 05 08 DF 2E 01 - divss xmm0,[BladesOfFire.exe+1EF6878] + --BladesOfFire.exe+C08970 - F3 0F 59 81 08 01 00 00 - mulss xmm0,[rcx+00000108] + --BladesOfFire.exe+C08978 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("F3 48 ?? ?? ?? F3 0F ?? ?? E8 ?? ?? ?? ?? F3 48 ?? ?? ?? 89 83 ?? ?? ?? ?? EB ?? 89",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --BladesOfFire.exe+FD3BC0 - 8B 83 04 01 00 00 - mov eax,[rbx+00000104] + --BladesOfFire.exe+FD3BC6 - F3 48 0F 2A C0 - cvtsi2ss xmm0,rax + --BladesOfFire.exe+FD3BCB - F3 0F 59 C6 - mulss xmm0,xmm6 + --BladesOfFire.exe+FD3BCF - E8 48 48 0F 00 - call BladesOfFire.exe+10C841C + --BladesOfFire.exe+FD3BD4 - F3 48 0F 2C C0 - cvttss2si rax,xmm0 + end + + return true + +end + +function Enable_Inject() + local NearTo = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + + Variables:Allocate(NearTo) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + %originalcode% + movss xmm6,[(allocation)Variables->ScreenRatio] + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",NearTo) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Out : %.2f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function ResolutionChanged() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..feaa65b Binary files /dev/null and b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..40d2d29 Binary files /dev/null and b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..0db218a Binary files /dev/null and b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Scripts/BrightMemoryInfinite.lua b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Scripts/BrightMemoryInfinite.lua new file mode 100644 index 0000000..b8e5c29 --- /dev/null +++ b/PluginCache/K4sh/Modules/BrightMemoryInfinite/Dependencies/Scripts/BrightMemoryInfinite.lua @@ -0,0 +1,258 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "BrightMemoryInfinite-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddHeader("HeaderHUDSZ","HUD safe zone",15,160,210,17) + DefaultControls.AddFixedFOVSlider("HUD","HUDSZSlider_Changed",55,190,125,35,0,40,0,1) + HUD:SetTickFrequency(5) + HUD:SetLabel1Text("0") + HUD:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("C6 84 ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --BrightMemoryInfinite-Win64-Shipping.exe+2CCE556 - 48 33 C4 - xor rax,rsp + --BrightMemoryInfinite-Win64-Shipping.exe+2CCE559 - 48 89 84 24 40 07 00 00 - mov [rsp+00000740],rax + --BrightMemoryInfinite-Win64-Shipping.exe+2CCE561 - F3 0F 10 B1 3C 02 00 00 - movss xmm6,[rcx+0000023C] + --BrightMemoryInfinite-Win64-Shipping.exe+2CCE569 - 33 C0 - xor eax,eax + --BrightMemoryInfinite-Win64-Shipping.exe+2CCE56B - 0F 57 C9 - xorps xmm1,xmm1 + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + if HackTool:SignatureScan("48 8B ?? ?? ?? 0F ?? ?? 48 ?? ?? 0F ?? ?? 48 83 ?? ?? 5F",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --BrightMemoryInfinite-Win64-Shipping.exe+2571D91 - 0F 10 00 - movups xmm0,[rax] + --BrightMemoryInfinite-Win64-Shipping.exe+2571D94 - 48 8B C7 - mov rax,rdi + --BrightMemoryInfinite-Win64-Shipping.exe+2571D97 - 0F 11 07 - movups [rdi],xmm0 + --BrightMemoryInfinite-Win64-Shipping.exe+2571D9A - 48 83 C4 30 - add rsp,30 + --BrightMemoryInfinite-Win64-Shipping.exe+2571D9E - 5F - pop rdi + end + + + return true +end + +function Enable_Inject() + + local TombRaiderDLL = HackTool:GetModuleAddress("tomb2.dll") + + + local Variables = HackTool:AllocateMemory("Variables",256) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:Allocate(TombRaiderDLL) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteInt(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + test rcx,rcx + jne next + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + next: + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + movss $$2,[(allocation)Variables->FOVOut] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + %originalcode% + $$0 $$1,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",TombRaiderDLL) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + end + + Write_FOV() + Write_HUD_Safe_Zone() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV : %.2f, FOV Out : %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function HUDSZSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + fHUDSafeZoneRight = fHUDSafeZOneLeft + lblHUD.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_HUD_Safe_Zone() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..34b727e Binary files /dev/null and b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..19328b5 Binary files /dev/null and b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..dfdf289 Binary files /dev/null and b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Scripts/BrokenPieces.lua b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Scripts/BrokenPieces.lua new file mode 100644 index 0000000..29c9fe5 --- /dev/null +++ b/PluginCache/K4sh/Modules/BrokenPieces/Dependencies/Scripts/BrokenPieces.lua @@ -0,0 +1,188 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 90 +fDefaultAspectRatio = 1.7777778 +fAdditionalFOV = 0 +fFOV = 90 + +--ControlVars +bFixEnabled = true +bAspectRatio = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "BrokenPieces-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Aspect Ratio fix","CKARatioFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 33 C0 0F 57",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + + -- BrokenPieces-Win64-Shipping.exe+2E90CC6: 48 33 C4 - xor rax,rsp + -- BrokenPieces-Win64-Shipping.exe+2E90CC9: 48 89 84 24 20 06 00 00 - mov [rsp+00000620],rax + -- BrokenPieces-Win64-Shipping.exe+2E90CD1: F3 0F 10 B1 3C 02 00 00 - movss xmm6,[rcx+0000023C] + -- BrokenPieces-Win64-Shipping.exe+2E90CD9: 33 C0 - xor eax,eax + -- BrokenPieces-Win64-Shipping.exe+2E90CDB: 0F 57 C0 - xorps xmm0,xmm0 + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("ARatio") + + if HackTool:SignatureScan("89 41 ?? 8B 41 ?? 33 42 ?? 83 E0 ?? 31 41 ?? 8B 4A ?? 33 4F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + -- BrokenPieces-Win64-Shipping.exe+F1A0A9: 89 41 28 - mov [rcx+28],eax + -- BrokenPieces-Win64-Shipping.exe+F1A0AC: 8B 42 2C - mov eax,[rdx+2C] + -- BrokenPieces-Win64-Shipping.exe+F1A0AF: 89 41 2C - mov [rcx+2C],eax + -- BrokenPieces-Win64-Shipping.exe+F1A0B2: 8B 41 30 - mov eax,[rcx+30] + -- BrokenPieces-Win64-Shipping.exe+F1A0B5: 33 42 30 - xor eax,[rdx+30] + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + + return true +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenAspect") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss xmm6,[rcx+0x00000238] + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ARatio,ARatio_cc: + fld dword ptr [(allocation)Variables->ScreenAspect] + fstp dword ptr [$$1] $ctx=1 + jmp %returnaddress% + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("ARatio_cc",bAspectRatio) + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(2)) + 25 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("ARatio_cc",bAspectRatio) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local ScreenAspect = DisplayInfo:GetAspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables then + Variables["ScreenAspect"]:WriteFloat(ScreenAspect) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..57dc043 Binary files /dev/null and b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..2d4e41f Binary files /dev/null and b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..de510f6 Binary files /dev/null and b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Scripts/BrothersATOTS.lua b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Scripts/BrothersATOTS.lua new file mode 100644 index 0000000..1f882cf --- /dev/null +++ b/PluginCache/K4sh/Modules/BrothersATOTS/Dependencies/Scripts/BrothersATOTS.lua @@ -0,0 +1,267 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 +fAspectFactor = (fAspectRatio) * 13.36499977 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bResolution = true +AdditionalFOV = 1.0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "Brothers-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 1000 +WriteInterval = 500 +SearchInterval = 300 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVAdjustment_Enable","FOV Adjustment","CKFOV_Changed",255,100,180,14) + DefaultControls.AddFixToggle("CKResolution_Enable","Resolution fix","CKResolution_Changed",255,120,180,14) + DefaultControls.AddFixToggle("CKDisableLetterBox_Enable","Aspect ratio fix","CKAspect_Changed",255,140,210,14) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("90") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F3 0F ?? ?? ?? 48 8B ?? 48 8B ?? 4C 8D ?? ?? 48 ?? ?? FF 90",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Brothers-Win64-Shipping.exe+30F92DE - 48 8B 01 - mov rax,[rcx] + --Brothers-Win64-Shipping.exe+30F92E1 - FF 90 C0 07 00 00 - call qword ptr [rax+000007C0] + --Brothers-Win64-Shipping.exe+30F92E7 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --Brothers-Win64-Shipping.exe+30F92EC - 48 8B 0E - mov rcx,[rsi] + --Brothers-Win64-Shipping.exe+30F92EF - 48 8B 01 - mov rax,[rcx] + end + + local tAddress = HackTool:AddAddress("RESHEIGHT") + if HackTool:SignatureScan("44 89 ?? ?? ?? ?? ?? 44 89 ?? ?? ?? ?? ?? 44 89 ?? ?? ?? ?? ?? 88 1D ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Brothers-Win64-Shipping.exe+359C7F0 - 8D 42 FF - lea eax,[rdx-01] + --Brothers-Win64-Shipping.exe+359C7F3 - 44 89 2D 0E 75 7F 04 - mov [Brothers-Win64-Shipping.exe+7D93D08],r13d + --Brothers-Win64-Shipping.exe+359C7FA - 44 89 25 0B 75 7F 04 - mov [Brothers-Win64-Shipping.exe+7D93D0C],r12d + --Brothers-Win64-Shipping.exe+359C801 - 44 89 35 08 75 7F 04 - mov [Brothers-Win64-Shipping.exe+7D93D10],r14d + --Brothers-Win64-Shipping.exe+359C808 - 88 1D 06 75 7F 04 - mov [Brothers-Win64-Shipping.exe+7D93D14],bl + end + + local tAddress = HackTool:AddAddress("ASPECT") + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? EB ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x13,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Brothers-Win64-Shipping.exe+29C6B93 - EB 03 - jmp Brothers-Win64-Shipping.exe+29C6B98 + --Brothers-Win64-Shipping.exe+29C6B95 - 0F 57 C0 - xorps xmm0,xmm0 + --Brothers-Win64-Shipping.exe+29C6B98 - F3 0F 11 83 44 0A 00 00 - movss [rbx+00000A44],xmm0 + --Brothers-Win64-Shipping.exe+29C6BA0 - F3 0F 10 83 5C 0A 00 00 - movss xmm0,[rbx+00000A5C] + --Brothers-Win64-Shipping.exe+29C6BA8 - F3 0F 59 83 44 0A 00 00 - mulss xmm0,[rbx+00000A44] + end + + local tAddress = HackTool:AddAddress("ASPECT2") + if HackTool:SignatureScan("0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 76 ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Brothers-Win64-Shipping.exe+29C668C - 0F 2F C2 - comiss xmm0,xmm2 + --Brothers-Win64-Shipping.exe+29C668F - F3 0F 10 89 5C 0A 00 00 - movss xmm1,[rcx+00000A5C] + --Brothers-Win64-Shipping.exe+29C6697 - F3 0F 59 89 3C 0A 00 00 - mulss xmm1,[rcx+00000A3C] + --Brothers-Win64-Shipping.exe+29C669F - 76 18 - jna Brothers-Win64-Shipping.exe+29C66B9 + --Brothers-Win64-Shipping.exe+29C66A1 - 0F 28 D1 - movaps xmm2,xmm1 + end + + return true + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV_In") + Variables:PushFloat("FOV_Out") + Variables:PushFloat("CompensatedFOV") + Variables:PushInt("Width") + Variables:PushInt("Height") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("AspectFactor") + Variables:Allocate() + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["Width"]:WriteInt(DisplayInfo:GetWidth()) + Variables["Height"]:WriteInt(DisplayInfo:GetHeight()) + Variables["AspectFactor"]:WriteFloat(fAspectFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + fld dword ptr [$$1+0x4] $ctx=1 + fstp dword ptr [(allocation)Variables->FOV_In] + fld dword ptr [$$1] $ctx=1 + fstp dword ptr [(allocation)Variables->CompensatedFOV] + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOV_Out],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)RESHEIGHT,RESHEIGHT_cc: + mov r13d,[(allocation)Variables->Width] + mov r12d,[(allocation)Variables->Height] + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT2,ASPECT2_cc: + $$0 $$1,[(allocation)Variables->AspectFactor] $ctx=1 + jmp %returnaddress% + %end% + + ]] + + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("RESHEIGHT_cc",bResolution) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + end + + if bFOV == true then + WriteFOV() + end + +end + +function Periodic() + + PluginViewport:AppendStatusMessage( "\r\n" ) + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + + if bFOV == true then + PluginViewport:AppendStatusMessage( string.format("FOV In=%.2f, Compensated FOV=%.2f, Out=%.2f", Variables["FOV_In"]:ReadFloat(), Variables["CompensatedFOV"]:ReadFloat(), Variables["FOV_Out"]:ReadFloat() ) ) + end + + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + WriteFOV() + end + + ForceUpdate() + +end + +function CKFOV_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + + if bFOV == true then + WriteFOV() + end + + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKResolution_Changed(Sender) + + bResolution = Toggle_CheckFix(Sender) + Toggle_CodeCave("RESHEIGHT_cc",bResolution) + ForceUpdate() + +end + +function CKAspect_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + ForceUpdate() + +end + +function ResolutionChanged() + + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +end + +function WriteFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..89bc24b Binary files /dev/null and b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..601af75 Binary files /dev/null and b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..2d2c149 Binary files /dev/null and b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Scripts/CloseToTheSun.lua b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Scripts/CloseToTheSun.lua new file mode 100644 index 0000000..874e015 --- /dev/null +++ b/PluginCache/K4sh/Modules/CloseToTheSun/Dependencies/Scripts/CloseToTheSun.lua @@ -0,0 +1,262 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "ctts-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("CC CC F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? 0F ?? ?? 77 ?? F3 0F 10 81 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ctts-Win64-Shipping.exe+11BC6BB - 0F 2F C1 - comiss xmm0,xmm1 + --ctts-Win64-Shipping.exe+11BC6BE - 77 08 - ja ctts-Win64-Shipping.exe+11BC6C8 + --ctts-Win64-Shipping.exe+11BC6C0 - F3 0F 10 81 08 04 00 00 - movss xmm0,[rcx+00000408] + --ctts-Win64-Shipping.exe+11BC6C8 - C3 - ret + --ctts-Win64-Shipping.exe+11BC6C9 - CC - int 3 + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("CC CC CC CC CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x4e,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ctts-Win64-Shipping.exe+1062693 - 89 41 24 - mov [rcx+24],eax + --ctts-Win64-Shipping.exe+1062696 - 8B 42 28 - mov eax,[rdx+28] + --ctts-Win64-Shipping.exe+1062699 - 89 41 28 - mov [rcx+28],eax + --ctts-Win64-Shipping.exe+106269C - 8B 41 2C - mov eax,[rcx+2C] + --ctts-Win64-Shipping.exe+106269F - 33 42 2C - xor eax,[rdx+2C] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("48 ?? ?? ?? ?? ?? ?? 32 ?? 8B ?? ?? 66 C7",tAddress,PAGE_EXECUTE_READ,0x09,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ctts-Win64-Shipping.exe+82BBC9 - 48 8B 05 90 A9 2E 02 - mov rax,[ctts-Win64-Shipping.exe+2B16560] + --ctts-Win64-Shipping.exe+82BBD0 - 32 DB - xor bl,bl + --ctts-Win64-Shipping.exe+82BBD2 - 8B 78 04 - mov edi,[rax+04] + --ctts-Win64-Shipping.exe+82BBD5 - 66 C7 44 24 64 01 01 - mov word ptr [rsp+64],0101 + --ctts-Win64-Shipping.exe+82BBDC - 85 FF - test edi,edi + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + fld dword ptr [$$2] $ctx=1 + fst dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 $$1,0 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_AR() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AR() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == false then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFixEnabled) + Write_FOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Write_AR() + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/DaysGone/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..9505272 Binary files /dev/null and b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/DaysGone/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..5681969 Binary files /dev/null and b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/DaysGone/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..ac7bb96 Binary files /dev/null and b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/DaysGone/Dependencies/Scripts/DaysGone.lua b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Scripts/DaysGone.lua new file mode 100644 index 0000000..f181d67 --- /dev/null +++ b/PluginCache/K4sh/Modules/DaysGone/Dependencies/Scripts/DaysGone.lua @@ -0,0 +1,352 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true +bHUDSafeZone = true +bSaveEverywhere = true + +--GAME VARS +fAdditionalFOV = 0 +fAdditionalFOVVehicle = 0 +fAdditionalFOVOther = 0 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 100 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Days Gone" +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","General FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + FOVSlider:SetTickFrequency(25) + DefaultControls.AddHeader("Header_FOV2","Vehicle FOV fine adjustment",15,160,210,17) + DefaultControls.AddFOVSlider("FOVSliderVehicle","FOVSliderVehicle_Changed",55,190,125,35) + FOVSliderVehicle:SetTickFrequency(25) + DefaultControls.AddHeader("Header_FOV3","Other FOV fine adjustment",245,160,210,17) + DefaultControls.AddFOVSlider("FOVSliderOther","FOVSliderOther_Changed",285,190,125,35) + FOVSliderOther:SetTickFrequency(25) + + DefaultControls.AddHeader("Header_HUD_SZ_LEFT","HUD safe zone left",15,250,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_LEFT","HUDSZLSlider_Changed",55,280,125,35,0,40,0,1) + HUD_SZ_LEFT:SetTickFrequency(5) + HUD_SZ_LEFT:SetLabel1Text("0") + HUD_SZ_LEFT:SetLabel2Text("40") + DefaultControls.AddHeader("Header_HUDSZRIGHT","HUD safe zone right",245,250,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_RIGHT","HUDSZRSlider_Changed",285,280,125,35,0,40,0,1) + HUD_SZ_RIGHT:SetTickFrequency(5) + HUD_SZ_RIGHT:SetLabel1Text("0") + HUD_SZ_RIGHT:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,60,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",325,101,100,14) + DefaultControls.AddFixToggle("CKSaveFix_Enable","Save everywhere","CKSaveFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("CC 48 8B ?? ?? F3 0F 10 80 ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x0d,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --DaysGone.exe+4375A0 - 48 8B 41 28 - mov rax,[rcx+28] + --DaysGone.exe+4375A4 - F3 0F 10 80 68 03 00 00 - movss xmm0,[rax+00000368] + --DaysGone.exe+4375AC - F3 0F 59 41 4C - mulss xmm0,[rcx+4C] + --DaysGone.exe+4375B1 - C3 - ret + --DaysGone.exe+4375B2 - CC - int 3 + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + if HackTool:SignatureScan("48 ?? ?? 48 ?? ?? 66 48 ?? ?? ?? FF ?? 48 8B ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x18,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --DaysGone.exe+1FBA9E3 - 0F 10 00 - movups xmm0,[rax] + --DaysGone.exe+1FBA9E6 - 48 8B C7 - mov rax,rdi + --DaysGone.exe+1FBA9E9 - 0F 11 07 - movups [rdi],xmm0 + --DaysGone.exe+1FBA9EC - 48 83 C4 30 - add rsp,30 + --DaysGone.exe+1FBA9F0 - 5F - pop rdi + end + + local tAddress = HackTool:AddAddress("SAVE") + if HackTool:SignatureScan("83 B9 ?? ?? ?? ?? ?? 7E ?? 0F B6 ?? ?? ?? ?? ?? EB ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --DaysGone.exe+7234DC - 45 32 F6 - xor r14b,r14b + --DaysGone.exe+7234DF - 48 8B D9 - mov rbx,rcx + --DaysGone.exe+7234E2 - 83 B9 D4 06 00 00 00 - cmp dword ptr [rcx+000006D4],00 + --DaysGone.exe+7234E9 - 7E 09 - jle DaysGone.exe+7234F4 + --DaysGone.exe+7234EB - 0F B6 A9 D8 06 00 00 - movzx ebp,byte ptr [rcx+000006D8] + end + + + return true + +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("BaseFOV") + Variables:PushFloat("BaseFOVScale") + Variables:PushFloat("GeneralFOV") + Variables:PushFloat("VehicleFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("FOVVehicleIn") + Variables:PushFloat("FOVVehicleOut") + Variables:PushFloat("FOVOtherIn") + Variables:PushFloat("FOVOtherOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalVehicleFOV") + Variables:PushFloat("AdditionalOtherFOV") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:Allocate() + + --Initialize left, top, right and bottom safe zone (regular values) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + Variables["GeneralFOV"]:WriteFloat(70) + Variables["VehicleFOV"]:WriteFloat(90) + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss xmm15,[rax+0x368] + movss [(allocation)Variables->BaseFOVScale],xmm15 + %originalcode% + movss xmm15,[$$2] $ctx=1 + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + movss [(allocation)Variables->BaseFOV],xmm15 + pushfq + comiss xmm15,[(allocation)Variables->GeneralFOV] ; Test if FOV is general + jne testVehicleFOV + + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + jmp exit + + testVehicleFOV: + comiss xmm15,[(allocation)Variables->VehicleFOV] ; Test if FOV is Vehicle + jne otherFOV + + addss $$1,[(allocation)Variables->AdditionalVehicleFOV] $ctx=1 + jmp exit + + otherFOV: + addss $$1,[(allocation)Variables->AdditionalOtherFOV] $ctx=1 + + exit: + popfq + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + %originalcode% + $$0 $$2,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 ; Will copy all safe zone offsets + $$0 [$$1],$$2 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)SAVE,SAVE_cc: + mov word [$$1],1 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + Toggle_CodeCave("SAVE_cc",bSaveEverywhere) + end + + Write_FOV() + Write_Vehicle_FOV() + Write_Other_FOV() + Write_HUD_Safe_Zone_Left() + Write_HUD_Safe_Zone_Right() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fBaseFOVScale = Variables["BaseFOVScale"]:ReadFloat() + fBaseFOV = Variables["BaseFOV"]:ReadFloat() + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + fVehicleFOVIn = Variables["FOVVehicleIn"]:ReadFloat() + fVehicleFOVOut = Variables["FOVVehicleOut"]:ReadFloat() + fOtherFOVIn = Variables["FOVOtherOut"]:ReadFloat() + fOtherFOVOut = Variables["FOVOtherOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nBase FOV: %0.f, Base FOV Scale: %0.2f\r\nFOV In: %0.f, FOV Out : %.0f", fBaseFOV, fBaseFOVScale, fFOVIn, fFOVOut)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = ((Sender:GetScaledFloat(2)) * 0.7) + 15 + lblFOVSlider.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function FOVSliderVehicle_Changed(Sender) + + fAdditionalFOVVehicle = ((Sender:GetScaledFloat(2)) * 0.7) + 15 + lblFOVSliderVehicle.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOVVehicle) ) + Write_Vehicle_FOV() + ForceUpdate() + +end + +function FOVSliderOther_Changed(Sender) + + fAdditionalFOVOther = ((Sender:GetScaledFloat(2)) * 0.7) + 15 + lblFOVSliderOther.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOVOther) ) + Write_Other_FOV() + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function HUDSZLSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + lblHUD_SZ_LEFT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone_Left() + ForceUpdate() + +end + +function HUDSZRSlider_Changed(Sender) + + fHUDSafeZoneRight = Sender:GetPosition() + lblHUD_SZ_RIGHT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZoneRight) ) + Write_HUD_Safe_Zone_Right() + ForceUpdate() + +end + +function CKSaveFix_Changed(Sender) + + bSaveEverywhere = Toggle_CheckFix(Sender) + Toggle_CodeCave("SAVE_cc",bSaveEverywhere) + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Write_Vehicle_FOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalVehicleFOV"] then + Variables["AdditionalVehicleFOV"]:WriteFloat(fAdditionalFOVVehicle) + end + +end + +function Write_Other_FOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalOtherFOV"] then + Variables["AdditionalOtherFOV"]:WriteFloat(fAdditionalFOVOther) + end + +end + +function Write_HUD_Safe_Zone_Left() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + end + +end + +function Write_HUD_Safe_Zone_Right() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..af59d8c Binary files /dev/null and b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..e7a1a30 Binary files /dev/null and b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..6188cf5 Binary files /dev/null and b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Scripts/DeadIsland2.lua b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Scripts/DeadIsland2.lua new file mode 100644 index 0000000..e406432 --- /dev/null +++ b/PluginCache/K4sh/Modules/DeadIsland2/Dependencies/Scripts/DeadIsland2.lua @@ -0,0 +1,252 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fAdditionalFOV = 0 +fFOV = 0 +fCinematicsFOV = 0 +fAspectRatio = 1.7777778 +fHUDLimit = 0.25 + +--ControlVars +bFixEnabled = true +bFOV = true +bCinematics = true +bHUDLimits = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "DeadIsland-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddHeader("Header_FOV2","Cinematics FOV fine adjustment",15,160,210,17) + DefaultControls.AddFOVSlider("FOVSlider2","CinematicsFOVSlider_Changed",55,190,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCinematicsFix_Enable","Cutscenes AR + FOV fix","CKCinematicsFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKHUDLimits_Enable","HUD Safe zone fix","CKHUDLimits_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("48 ?? ?? ?? 48 ?? ?? 0F 29 ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 33 ??",tAddress,PAGE_EXECUTE_READ,0x0C,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --DeadIsland-Win64-Shipping.exe+16D4D46: 48 8B D9 - mov rbx,rcx + --DeadIsland-Win64-Shipping.exe+16D4D49: 0F 29 74 24 20 - movaps [rsp+20],xmm6 + --DeadIsland-Win64-Shipping.exe+16D4D4E: F3 0F 10 B1 28 35 00 00 - movss xmm6,[rcx+00003528] + --DeadIsland-Win64-Shipping.exe+16D4D56: 33 D2 - xor edx,edx + --DeadIsland-Win64-Shipping.exe+16D4D58: 8B 89 20 38 00 00 - mov ecx,[rcx+00003820] + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("CinematicsFix") + + if HackTool:SignatureScan("74 ?? 8B ?? ?? 48 ?? ?? 89 ?? ?? E8 ?? ?? ?? ?? F3 0F ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x10,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --DeadIsland-Win64-Shipping.exe+16F2186 - 89 46 3C - mov [rsi+3C],eax + --DeadIsland-Win64-Shipping.exe+16F2189 - E8 B2 2B FE FF - call DeadIsland-Win64-Shipping.exe+16D4D40 + --DeadIsland-Win64-Shipping.exe+16F218E - F3 0F 11 46 28 - movss [rsi+28],xmm0 + --DeadIsland-Win64-Shipping.exe+16F2193 - 48 8B 97 08 35 00 00 - mov rdx,[rdi+00003508] + --DeadIsland-Win64-Shipping.exe+16F219A - 48 8B 8A 38 08 00 00 - mov rcx,[rdx+00000838] + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("HUDLimits") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? 8B ?? ?? ?? ?? ?? 89",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --DeadIsland-Win64-Shipping.exe+199DA99: 48 8B 87 F0 01 00 00 - mov rax,[rdi+000001F0] + --DeadIsland-Win64-Shipping.exe+199DAA0: F3 0F 5F C1 - maxss xmm0,xmm1 + --DeadIsland-Win64-Shipping.exe+199DAA4: F3 0F 11 90 AC 00 00 00 - movss [rax+000000AC],xmm2 + --DeadIsland-Win64-Shipping.exe+199DAAC: F3 0F 11 80 A8 00 00 00 - movss [rax+000000A8],xmm0 + --DeadIsland-Win64-Shipping.exe+199DAB4: 48 8B 8F F0 01 00 00 - mov rcx,[rdi+000001F0] + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("FOVCinIn") + Variables:PushFloat("FOVCinOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalCinematicsFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("HUDLimit") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["HUDLimit"]:WriteFloat(fHUDLimit) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)CinematicsFix,CinematicsFix_cc: + mov eax,[(allocation)Variables->AspectRatio] + mov [rsi+0x3C],eax + movss [(allocation)Variables->FOVCinIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalCinematicsFOV] $ctx=1 + movss [(allocation)Variables->FOVCinOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)HUDLimits,HUDLimits_cc: + movss xmm0,[(allocation)Variables->HUDLimit] + movss xmm2,[(allocation)Variables->HUDLimit] + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("CinematicsFix_cc",bCinematics) + Toggle_CodeCave("HUDLimits_cc",bHUDLimits) + end + + Write_FOV() + Write_CinematicsFOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + if fFOVIn < 10 then + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: --, FOV Out : --", fFOVIn, fFOVOut)) + else + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, FOV Out : %.2f", fFOVIn, fFOVOut)) + end + + if bCinematics and Variables["AspectRatio"] then + fAspectRatio = DisplayInfo:GetfOffsetWidth() / DisplayInfo:GetfOffsetHeight() + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + + end +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(3)) + 18.33 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function CinematicsFOVSlider_Changed(Sender) + + fCinematicsFOV = (Sender:GetScaledFloat(3)) + 18.33 + lblFOVSlider2.Caption:SetCaption( string.format("Additional Cinematics FOV : %.2f",fCinematicsFOV) ) + Write_CinematicsFOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Write_CinematicsFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalCinematicsFOV"] then + Variables["AdditionalCinematicsFOV"]:WriteFloat(fCinematicsFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKCinematicsFix_Changed(Sender) + + bCinematics = Toggle_CheckFix(Sender) + Toggle_CodeCave("CinematicsFix_cc",bCinematics) + ForceUpdate() + +end + +function CKHUDLimits_Changed(Sender) + + bHUDLimits = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDLimits_cc",bHUDLimits) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..7b1a1f1 Binary files /dev/null and b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..9e96dda Binary files /dev/null and b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..8ad8b69 Binary files /dev/null and b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Scripts/DeadSpaceRemake.lua b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Scripts/DeadSpaceRemake.lua new file mode 100644 index 0000000..edc0bb4 --- /dev/null +++ b/PluginCache/K4sh/Modules/DeadSpaceRemake/Dependencies/Scripts/DeadSpaceRemake.lua @@ -0,0 +1,167 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 44.9 +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Dead Space.exe;Dead Space unwrapped fixed.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","Additional FOV adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("+0") + FOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 0F 2F ?? ?? ?? ?? ?? 77 ?? 48 8B ?? ?? ?? ?? ?? F3 0F ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x1d,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Dead Space.exe+1ACB628 - 48 8B 83 10 03 00 00 - mov rax,[rbx+00000310] + --Dead Space.exe+1ACB62F - F3 0F 10 40 6C - movss xmm0,[rax+6C] + --Dead Space.exe+1ACB634 - F3 0F 59 83 4C 01 00 00 - mulss xmm0,[rbx+0000014C] + --Dead Space.exe+1ACB63C - 48 83 C4 20 - add rsp,20 + --Dead Space.exe+1ACB640 - 5B - pop rbx + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("DefaultFOV") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["DefaultFOV"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + comiss $$1,[(allocation)Variables->DefaultFOV] $ctx=1 + jb exit ; will not affect inventory store and bench tool + + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + + exit: + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOV) ) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..cfe54c0 Binary files /dev/null and b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..ebc39fe Binary files /dev/null and b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..c36dc8c Binary files /dev/null and b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Scripts/DeathStranding.lua b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Scripts/DeathStranding.lua new file mode 100644 index 0000000..35f1114 --- /dev/null +++ b/PluginCache/K4sh/Modules/DeathStranding/Dependencies/Scripts/DeathStranding.lua @@ -0,0 +1,302 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 90 +fDefaultAspectRatio = 1.7777778 +fAdditionalFOV = 0 +fFOV = 90 + +--ControlVars +bFixEnabled = true +bFOV = true +bFMV = true +bFrameTime = true +bAR = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "DEATH STRANDING DIRECTOR'S CUT" +--Process_WindowName = "Death Stranding" +Process_ClassName = "*" +Process_EXEName = "ds.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 0 +WriteInterval = 0 +SearchInterval = 0 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKMarkersFix_Enable","Markers fix","CKMarkersFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFMVFix_Enable","FMVs fix","CKFMVFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFMVFRTIMEFix_Enable","Cinematics Frametime fix","CKFMVFRTIMEFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + --local tAddress = HackTool:AddAddress("AR2") + + --if HackTool:SignatureScan("39 8E E3 3F 55 55 15 40",tAddress,PAGE_READONLY,0x0,Process_EXEName) == 0 then + --return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + --else + --print( tAddress:GetInfo(TYPE_ADDRESS) ) + --tAddress:AddSubOffset("16x9",0x0) + --tAddress:AddSubOffset("21x9",0x4) + --Default_16x9 = tAddress["16x9"]:ReadFloat() + --Default_21x9 = tAddress["21x9"]:ReadFloat() + --tAddress["16x9"]:SetAutoUnprotect(true) + --tAddress["21x9"]:SetAutoUnprotect(true) + --end + + local tAddress = HackTool:AddAddress("FOV") + + --if HackTool:SignatureScan("73 ?? C5 FA 10 83 ?? ?? ?? ?? 40 38 B3",tAddress,PAGE_EXECUTE_READ,0x0A,Process_EXEName) == 0 then + if HackTool:SignatureScan("E8 6C ?? ?? ?? C5 FA 10 4F ?? C5 F2",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("C5 EA ?? ?? ?? ?? ?? ?? C5 ?? ?? ?? C5 ?? ?? ?? E8 ?? ?? ?? ?? C5 CA 5E",tAddress,PAGE_EXECUTE_READ,0x15,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("AR") + + if HackTool:SignatureScan("C5 D2 5E C2 C5 FA 5C 0D ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x04,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FMV1") + + if HackTool:SignatureScan("8B 84 24 ?? ?? ?? ?? 48 8D 94 24 ?? ?? ?? ?? 2B 84 24 ?? ?? ?? ?? C5 F8",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FMV2") + + if HackTool:SignatureScan("C5 C2 5E 0D ?? ?? ?? ?? C5 FA ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FMVFRTIME1") + + if HackTool:SignatureScan("8B 1D ?? ?? ?? ?? 44 0F B6 ?? ?? ?? ?? ?? 8B 88",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FMVFRTIME2") + + if HackTool:SignatureScan("B8 ?? ?? ?? ?? 3B D8 0F 4F D8 65 48 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAR") + Variables:PushInt("FMVFrameTime") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["DefaultAR"]:WriteFloat(fDefaultAspectRatio) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + ;movss [(allocation)Variables->FOVIn],xmm0 + ;addss xmm0,[(allocation)Variables->AdditionalFOV] + ;movss [(allocation)Variables->FOVOut],xmm0 + %originalcode% + movss xmm15,[rdi+0x50] + movss [(allocation)Variables->FOVIn],xmm15 + addss xmm15,[(allocation)Variables->AdditionalFOV] + movss [(allocation)Variables->FOVOut],xmm15 + movss [rdi+0x50],xmm15 + jmp %returnaddress% + %end% + + (codecave:jmp)FMV1,FMV1_cc: + fild dword ptr [rsp+0x11C] + fmul dword ptr [(allocation)Variables->DefaultAR] + fistp dword ptr [rsp+0x118] + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)FMVFRTIME1,FMVFRTIME1_cc: + %originalcode% + mov [(allocation)Variables->FMVFrameTime],$$1 $context=1 + jmp %returnaddress% + %end% + + (codecave:jmp)FMVFRTIME2,FMVFRTIME2_cc: + mov $$1,[(allocation)Variables->FMVFrameTime] $context=1 + jmp %returnaddress% + %end% + + (codecave)FOV2,FOV2_cc: + vdivss xmm1,xmm6,[(allocation)Variables->DefaultAR] + %end% + + (codecave)FMV2,FMV2_cc: + vdivss xmm1,xmm7,[(allocation)Variables->DefaultAR] + %end% + + (codecave)AR,AR_cc: + vsubss xmm1,xmm0,[(allocation)Variables->DefaultAR] + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bFixEnabled) + Toggle_CodeCave("FMV1_cc",bFMV) + Toggle_CodeCave("FMV2_cc",bFMV) + Toggle_CodeCave("FMVFRTIME1_cc",bFrameTime) + Toggle_CodeCave("FMVFRTIME2_cc",bFrameTime) + Toggle_CodeCave("AR_cc",bAR) + + local tAddress = HackTool:GetAddress("AR2") + if tAddress then + local AspectRatios = HackTool:GetAddress("AR2") + if AspectRatios and AspectRatios["16x9"] then + AspectRatios["16x9"]:WriteFloat(DisplayInfo:GetAspectRatio()) + AspectRatios["21x9"]:WriteFloat(DisplayInfo:GetAspectRatio()) + end + end + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["FMVFrameTime"] and Variables["AdditionalFOV"] then + fFrameTime = Variables["FMVFrameTime"]:ReadInt() + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nGame FOV In : %.0f - FOV Out : %.0f\r\nGame Frametime : %d fps", fFOVIn, fFOVOut, fFrameTime)) + end +end + +function FOVSlider_Changed(Sender) + local Variables = HackTool:GetAllocation("Variables") + + fFOV = (Sender:GetScaledFloat(3)) + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Variables["AdditionalFOV"]:WriteFloat(fFOV) + ForceUpdate() + +end + +function Disable_Inject() + + local AspectRatios = HackTool:GetAddress("AR2") + if AspectRatios and AspectRatios["16x9"] then + AspectRatios["16x9"]:WriteFloat(Default_16x9) + AspectRatios["21x9"]:WriteFloat(Default_21x9) + end + + CleanUp() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKMarkersFix_Changed(Sender) + + bAR = Toggle_CheckFix(Sender) + Toggle_CodeCave("AR_cc",bAR) + ForceUpdate() + +end + +function CKFMVFix_Changed(Sender) + + bFMV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FMV1_cc",bFMV) + Toggle_CodeCave("FMV2_cc",bFMV) + ForceUpdate() + +end + + +function CKFMVFRTIMEFix_Changed(Sender) + + bFrameTime = Toggle_CheckFix(Sender) + Toggle_CodeCave("FMVFRTIME1_cc",bFrameTime) + Toggle_CodeCave("FMVFRTIME2_cc",bFrameTime) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..b120083 Binary files /dev/null and b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..1b4bb2c Binary files /dev/null and b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..8b7b6f0 Binary files /dev/null and b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Scripts/EmpireOfAnts.lua b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Scripts/EmpireOfAnts.lua new file mode 100644 index 0000000..154f5af --- /dev/null +++ b/PluginCache/K4sh/Modules/EmpireOfAnts/Dependencies/Scripts/EmpireOfAnts.lua @@ -0,0 +1,246 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Empire-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 83",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Empire-Win64-Shipping.exe+39E1F14 - 48 8B 01 - mov rax,[rcx] + --Empire-Win64-Shipping.exe+39E1F17 - FF 90 50 07 00 00 - call qword ptr [rax+00000750] + --Empire-Win64-Shipping.exe+39E1F1D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Empire-Win64-Shipping.exe+39E1F22 - 48 83 C4 28 - add rsp,28 + --Empire-Win64-Shipping.exe+39E1F26 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 76 ?? F3 0F ?? ?? ?? ?? ?? ?? 48 83 ?? ?? 5B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Empire-Win64-Shipping.exe+3033DB0 - F3 0F 10 8B 78 0A 00 00 - movss xmm1,[rbx+00000A78] + --Empire-Win64-Shipping.exe+3033DB8 - 0F 2F CA - comiss xmm1,xmm2 + --Empire-Win64-Shipping.exe+3033DBB - F3 0F 11 83 4C 02 00 00 - movss [rbx+0000024C],xmm0 + --Empire-Win64-Shipping.exe+3033DC3 - 76 08 - jna Empire-Win64-Shipping.exe+3033DCD + --Empire-Win64-Shipping.exe+3033DC5 - F3 0F 11 8B 4C 02 00 00 - movss [rbx+0000024C],xmm1 + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Empire-Win64-Shipping.exe+2464132 - 75 05 - jne Empire-Win64-Shipping.exe+2464139 + --Empire-Win64-Shipping.exe+2464134 - BF 04 00 00 00 - mov edi,00000004 + --Empire-Win64-Shipping.exe+2464139 - 8B 3C 37 - mov edi,[rdi+rsi] + --Empire-Win64-Shipping.exe+246413C - 48 8B CB - mov rcx,rbx + --Empire-Win64-Shipping.exe+246413F - E8 DC 5A 66 01 - call Empire-Win64-Shipping.exe+3AC9C20 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["factor"]:WriteFloat(fFactor) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn], $$1 $ctx=1 + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio/fAspectRatio169 + + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/EvilWest/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..05f94a7 Binary files /dev/null and b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/EvilWest/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..15b2273 Binary files /dev/null and b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/EvilWest/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..9fd24f8 Binary files /dev/null and b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/EvilWest/Dependencies/Scripts/EvilWest.lua b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Scripts/EvilWest.lua new file mode 100644 index 0000000..d1f7e4a --- /dev/null +++ b/PluginCache/K4sh/Modules/EvilWest/Dependencies/Scripts/EvilWest.lua @@ -0,0 +1,253 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bCinematics = true +bFOV = true +bCamFOV = true + +--GAME VARS +fDefaultFOV = 90 +fDefaultAspectRatio = 1.7777778 +fAdditionalFOV = 0 +fFOV = 90 +fAdditionalFOVCinematics = 50 +fCinematicsFOV = 50 + + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Evil West " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddHeader("Header_FOVCinematics","Cinematics FOV fine adjustment",15,160,210,17) + DefaultControls.AddFOVSlider("FOVCinematicsSlider","FOVCinematicsSlider_Changed",55,190,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCamFOVFix_Enable","Camera FOV fix","CKCamFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Cinematics Fix","CKARatioFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("AspectRatio") + if HackTool:SignatureScan("8B 42 ?? 89 41 ?? 8B 41 ?? 33 42 ?? 83 E0 ?? 31 41 ?? 8B 4A ?? 33 4B",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + -- HighMoon-Win64-Shipping.exe+2FD25EC: 8B 42 2C - mov eax,[rdx+2C] + -- HighMoon-Win64-Shipping.exe+2FD25EF: 89 41 2C - mov [rcx+2C],eax + -- HighMoon-Win64-Shipping.exe+2FD25F2: 8B 42 30 - mov eax,[rdx+30] + -- HighMoon-Win64-Shipping.exe+2FD25F5: 89 41 30 - mov [rcx+30],eax + -- HighMoon-Win64-Shipping.exe+2FD25F8: 8B 41 34 - mov eax,[rcx+34] + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89 47",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + -- HighMoon-Win64-Shipping.exe+2FE2464: F3 0F 58 83 08 02 00 00 - addss xmm0,[rbx+00000208] + -- HighMoon-Win64-Shipping.exe+2FE246C: EB 08 - jmp HighMoon-Win64-Shipping.exe+2FE2476 + -- HighMoon-Win64-Shipping.exe+2FE246E: F3 0F 10 83 08 02 00 00 - movss xmm0,[rbx+00000208] + -- HighMoon-Win64-Shipping.exe+2FE2476: F3 0F 11 47 18 - movss [rdi+18],xmm0 + -- HighMoon-Win64-Shipping.exe+2FE247B: 8B 83 18 02 00 00 - mov eax,[rbx+00000218] + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("CamFOV") + + if HackTool:SignatureScan("F3 0F 10 87 ?? ?? ?? ?? F3 0F ?? ?? F3 0F ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x0C,Process_EXEName) == 0 then + -- HighMoon-Win64-Shipping.exe+17516AF: F3 0F 10 87 20 04 00 00 - movss xmm0,[rdi+00000420] + -- HighMoon-Win64-Shipping.exe+17516B7: F3 0F 58 03 - addss xmm0,[rbx] + -- HighMoon-Win64-Shipping.exe+17516BB: F3 0F 11 03 - movss [rbx],xmm0 + -- HighMoon-Win64-Shipping.exe+17516BF: 48 8B BC 24 10 01 00 00 - mov rdi,[rsp+00000110] + -- HighMoon-Win64-Shipping.exe+17516C7: 48 8B 9C 24 08 01 00 00 - mov rbx,[rsp+00000108] + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("FOVCinematicsIn") + Variables:PushFloat("FOVCinematicsOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalFOVCinematics") + Variables:PushFloat("ScreenAspect") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AdditionalFOVCinematics"]:WriteFloat(fAdditionalFOVCinematics) + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)CamFOV,CamFOV_cc: + pushf + cmp r12,0 + jne exit + movss [(allocation)Variables->FOVCinematicsIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOVCinematics] $ctx=1 + movss [(allocation)Variables->FOVCinematicsOut],$$2 $ctx=1 + + exit: + popfq + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)AspectRatio,AspectRatio_cc: + fld dword ptr [(allocation)Variables->ScreenAspect] + fstp dword ptr [$$1] $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"AspectFix") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("CamFOV_cc",bCamFOV) + Toggle_CodeCave("AspectRatio_cc",bCinematics) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + fFOVCinematicsIn = Variables["FOVCinematicsIn"]:ReadFloat() + fFOVCinematicsOut = Variables["FOVCinematicsOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f\r\nCinematics FOV In: %0.f, Cinematics FOV Out : %.0f", fFOVIn, fFOVOut, fFOVCinematicsIn, fFOVCinematicsOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(2)) + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function FOVCinematicsSlider_Changed(Sender) + + fCinematicsFOV = (Sender:GetScaledFloat(2)) + 25 + lblFOVCinematicsSlider.Caption:SetCaption( string.format("Additional Cinematics FOV : %.2f",fCinematicsFOV) ) + Write_FOVCinematics() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Write_FOVCinematics() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFOVCinematics"] then + Variables["AdditionalFOVCinematics"]:WriteFloat(fCinematicsFOV) + end + +end + +function ResolutionChanged() + + local ScreenAspect = DisplayInfo:GetAspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables then + Variables["ScreenAspect"]:WriteFloat(ScreenAspect) + end + +end + +function Disable_Inject() + CleanUp() +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKCamFOVFix_Changed(Sender) + + bCamFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("CamFOV_cc",bCamFOV) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bCinematics = Toggle_CheckFix(Sender) + Toggle_CodeCave("AspectRatio_cc",bCinematics) + ForceUpdate() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/Firewatch/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..02dbcdb Binary files /dev/null and b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Firewatch/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..a4af908 Binary files /dev/null and b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Firewatch/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..0ea2a02 Binary files /dev/null and b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Firewatch/Dependencies/Scripts/Firewatch.lua b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Scripts/Firewatch.lua new file mode 100644 index 0000000..5213259 --- /dev/null +++ b/PluginCache/K4sh/Modules/Firewatch/Dependencies/Scripts/Firewatch.lua @@ -0,0 +1,164 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 55 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFOV = 0 +fFOV = 55 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Firewatch.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,55,140,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("55") + FOVSlider:SetLabel2Text("140") + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F 10 80 84 02 00 00",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Firewatch.Matrix4x4f::Invert_Full+B67D - 48 85 C0 - test rax,rax + --Firewatch.Matrix4x4f::Invert_Full+B680 - 74 0D - je Firewatch.Matrix4x4f::Invert_Full+B68F + --Firewatch.Matrix4x4f::Invert_Full+B682 - F3 0F 10 80 84 02 00 00 - movss xmm0,[rax+00000284] + --Firewatch.Matrix4x4f::Invert_Full+B68A - 48 83 C4 28 - add rsp,28 + --Firewatch.Matrix4x4f::Invert_Full+B68E - C3 - ret + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("C3 CC CC F3 0F ?? ?? ?? ?? ?? ?? 66 C7 81 ?? ?? ?? ?? ?? ?? C3 CC",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Firewatch.Camera::SetTemporarySettings+2E - CC - int 3 + --Firewatch.Camera::SetTemporarySettings+2F - CC - int 3 + --Firewatch.Camera::SetFov - F3 0F 11 89 84 02 00 00 - movss [rcx+00000284],xmm1 + --Firewatch.Camera::SetFov+8 - 66 C7 81 25 03 00 00 01 01 - mov word ptr [rcx+00000325],0101 + --Firewatch.Camera::SetFov+11 - C3 - ret + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("FOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOV"]:WriteFloat(fFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV2,FOV2_cc: + $$0 $$2,[(allocation)Variables->FOV] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)FOV,FOV_cc: + $$0 $$1,[(allocation)Variables->FOV] $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() +end + +function FOVSlider_Changed(Sender) + + fFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(fFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/FortSolis/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..840ea47 Binary files /dev/null and b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/FortSolis/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..eff2af3 Binary files /dev/null and b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/FortSolis/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a7fda0a Binary files /dev/null and b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/FortSolis/Dependencies/Scripts/FortSolis.lua b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Scripts/FortSolis.lua new file mode 100644 index 0000000..f148aaf --- /dev/null +++ b/PluginCache/K4sh/Modules/FortSolis/Dependencies/Scripts/FortSolis.lua @@ -0,0 +1,246 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFactor = 0.00872665 +fFOV_Compensated = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +AdditionalFOV = 1.0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "fortsolis.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 2000 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVAdjustment_Enable","FOV Adjustment","CKFOV_Changed",255,100,180,14) + DefaultControls.AddFixToggle("CKDisableLetterBox_Enable","Override aspect limitation","CKAspect_Changed",255,120,180,14) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("90") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("Aspect") + if HackTool:SignatureScan("F2 0F ?? ?? ?? 8B 48 ?? 89 4F ?? 8B ?? ?? 89 47 ?? 8B 43 ?? 89 47 ?? 8B 43 ?? 89 47 ?? 8B 43 ?? 89 47 ?? 8B 43 ?? 89 47 ?? 8B 43 ??",tAddress,PAGE_EXECUTE_READ,0x29,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --fortsolis.exe+3B20451 - 8B 43 44 - mov eax,[rbx+44] + --fortsolis.exe+3B20454 - 89 47 44 - mov [rdi+44],eax + --fortsolis.exe+3B20457 - 8B 43 48 - mov eax,[rbx+48] + --fortsolis.exe+3B2045A - 89 47 48 - mov [rdi+48],eax + --fortsolis.exe+3B2045D - 8B 47 4C - mov eax,[rdi+4C] + end + + local tAddress = HackTool:AddAddress("Aspect2") + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --fortsolis.exe+3CFA754 - 48 8B 01 - mov rax,[rcx] + --fortsolis.exe+3CFA757 - FF 90 28 07 00 00 - call qword ptr [rax+00000728] + --fortsolis.exe+3CFA75D - F3 0F 10 40 30 - movss xmm0,[rax+30] <<== + --fortsolis.exe+3CFA762 - 48 83 C4 28 - add rsp,28 + --fortsolis.exe+3CFA766 - C3 - ret + end + + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV_In") + Variables:PushFloat("FOV_Out") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["DefaultAspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["ScreenRatio"]:WriteFloat(DisplayInfo:GetWidth() / DisplayInfo:GetHeight()) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)Aspect,Aspect_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + $$0 [$$2],$$1 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)Aspect2,Aspect2_cc: + fld dword ptr [$$2] $ctx=1 + fst dword ptr [(allocation)Variables->FOV_In] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->AspectRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + $$0 $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOV_Out],$$1 $ctx=1 + jmp %returnaddress% + %end% + ]] + + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("Aspect_cc",bAspect) + Toggle_CodeCave("Aspect2_cc",bFixEnabled) + end + + if bAspect == true then + WriteAspect() + end + + if bFOV == true then + WriteFOV() + end + +end + +function Periodic() + + PluginViewport:AppendStatusMessage( "\r\n" ) + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFixEnabled == true then + fFOV_In = Variables["FOV_In"]:ReadFloat() + fFOV_Out = Variables["FOV_Out"]:ReadFloat() + fFOV_Compensated = Variables["CompensatedFOV"]:ReadFloat() + if fFOV_Compensated == 0 then + fFOV_Compensated = fFOV_Out + end + PluginViewport:AppendStatusMessage( string.format("FOV In=%.2f, FOV Compensated=%.2f, FOV Out=%.2f", fFOV_In, fFOV_Compensated, fFOV_Out) ) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + WriteFOV() + end + + ForceUpdate() + +end + +function CKFOV_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + WriteFOV() + ForceUpdate() + +end + +function CKAspect_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + + if bAspect == false then + fFOV_Compensated = 0 + end + + WriteAspect() + Toggle_CodeCave("Aspect_cc",bAspect) + ForceUpdate() + +end + +function ResolutionChanged() + + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +end + +function WriteFOV() + + local fAddFOV = 0 + if bFOV == true then + fAddFOV = fAdditionalFOV + end + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAddFOV) + end + +end + +function WriteAspect() + local fAspect = fDefaultAspectRatio + if bAspect == true then + fAspect = fAspectRatio + end + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + Variables["AspectRatio"]:WriteFloat(fAspect) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..50e3c62 Binary files /dev/null and b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..6538a67 Binary files /dev/null and b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..490fbc9 Binary files /dev/null and b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Scripts/GhostOfTsushima.lua b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Scripts/GhostOfTsushima.lua new file mode 100644 index 0000000..71ac29c --- /dev/null +++ b/PluginCache/K4sh/Modules/GhostOfTsushima/Dependencies/Scripts/GhostOfTsushima.lua @@ -0,0 +1,383 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fScaleFOV = 0 + +--ControlVars +bFixEnabled = true +bLetterbox = true +bFOV = true +bHUD = true +bPSN = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "GhostOfTsushima.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV scaling",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,50,200,0,1) + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("0.5") + FOVSlider:SetLabel2Text("2.0") + + DefaultControls.AddHeader("Header_HUD_Scaling","HUD scaling fine adjustment",15,165,210,17) + DefaultControls.AddFixedFOVSlider("HUDScalingSlider","HUDScalingSlider_Changed",55,195,125,35,0,40,0,1) + HUDScalingSlider:SetTickFrequency(5) + HUDScalingSlider:SetLabel1Text("0%") + HUDScalingSlider:SetLabel2Text("40%") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD Scaling fine fix","CKHUDFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKLETTERBOXFix_Enable","Letterbox fix","CKLETTERBOXFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKPSNFix_Enable","PSN check fix","CKPSNFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? C3 CC CC CC CC CC CC CC 48 63 ?? ?? ?? ?? ?? 48 6B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("F3 0F 10 ?? ?? ?? ?? ?? F3 0F 11 ?? ?? ?? ?? ?? F3 0F 59 ?? C3",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.exe+4CDE4E - CC - int 3 + --GhostOfTsushima.exe+4CDE4F - CC - int 3 + --GhostOfTsushima.exe+4CDE50 - F3 0F 10 81 C4 01 00 00 - movss xmm0,[rcx+000001C4] + --GhostOfTsushima.exe+4CDE58 - C3 - ret + --GhostOfTsushima.exe+4CDE59 - CC - int 3 + end + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("HUD") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? BE ?? ?? ?? ?? E8",tAddress,PAGE_EXECUTE_READ,0x0d,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.exe+6CF13A - F3 0F 10 35 C2 F2 A1 00 - movss xmm6,[GhostOfTsushima.D3D12SDKVersion+38D4] + --GhostOfTsushima.exe+6CF142 - BE 80 07 00 00 - mov esi,00000780 + --GhostOfTsushima.exe+6CF147 - E8 44 A2 D3 FF - call GhostOfTsushima.AK::MemoryMgr::StopProfileThreadUsage+C780 + --GhostOfTsushima.exe+6CF14C - 48 8B C8 - mov rcx,rax + --GhostOfTsushima.exe+6CF14F - 48 8B D8 - mov rbx,rax + end + + local tAddress = HackTool:AddAddress("LETTERBOX") + + if HackTool:SignatureScan("FF 90 ?? ?? ?? ?? 84 ?? 74 ?? 45 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.exe+6D3C5E - 48 8B 07 - mov rax,[rdi] + --GhostOfTsushima.exe+6D3C61 - 48 8B CF - mov rcx,rdi + --GhostOfTsushima.exe+6D3C64 - FF 90 10 02 00 00 - call qword ptr [rax+00000210] + --GhostOfTsushima.exe+6D3C6A - 84 C0 - test al,al + --GhostOfTsushima.exe+6D3C6C - 74 30 - je GhostOfTsushima.exe+6D3C9E + end + + local tAddress = HackTool:AddAddress("LETTERBOX_CONTROLLER") + + if HackTool:SignatureScan("74 ?? 38 87 ?? ?? ?? ?? 0F 84 ?? ?? ?? ?? 80 3D",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.exe+6D34FA - 38 05 C8 31 6E 01 - cmp [GhostOfTsushima.exe+1DB66C8],al + --GhostOfTsushima.exe+6D3500 - 74 0C - je GhostOfTsushima.exe+6D350E + --GhostOfTsushima.exe+6D3502 - 38 87 5A 07 00 00 - cmp [rdi+0000075A],al + --GhostOfTsushima.exe+6D3508 - 0F 84 49 03 00 00 - je GhostOfTsushima.exe+6D3857 + --GhostOfTsushima.exe+6D350E - 80 3D C7 AB DA 00 00 - cmp byte ptr [GhostOfTsushima.AmdPowerXpressRequestHighPerformance+3F38],00 + end + + local tAddress = HackTool:AddAddress("LETTERBOX_KEYBOARD") + + if HackTool:SignatureScan("74 ?? 80 BF ?? ?? ?? ?? ?? 0F 84 ?? ?? ?? ?? 80 BF",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.exe+6D350E - 80 3D C7 AB DA 00 00 - cmp byte ptr [GhostOfTsushima.AmdPowerXpressRequestHighPerformance+3F38],00 + --GhostOfTsushima.exe+6D3515 - 74 0D - je GhostOfTsushima.exe+6D3524 + --GhostOfTsushima.exe+6D3517 - 80 BF 5B 07 00 00 00 - cmp byte ptr [rdi+0000075B],00 + --GhostOfTsushima.exe+6D351E - 0F 84 33 03 00 00 - je GhostOfTsushima.exe+6D3857 + --GhostOfTsushima.exe+6D3524 - 80 BF 61070000 00 - cmp byte ptr [rdi+00000761],00 + end + + local tAddress = HackTool:AddAddress("PSN_CHECK_1") + + if HackTool:SignatureScan("FF ?? ?? 48 8B ?? ?? ?? ?? ?? 4C 8B ?? ?? ?? ?? ?? 4D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.AK::MemoryMgr::StopProfileThreadUsage+C145 - 48 8B 08 - mov rcx,[rax] + --GhostOfTsushima.AK::MemoryMgr::StopProfileThreadUsage+C148 - 48 8B 01 - mov rax,[rcx] + --GhostOfTsushima.AK::MemoryMgr::StopProfileThreadUsage+C14B - FF 50 60 - call qword ptr [rax+60] + --GhostOfTsushima.AK::MemoryMgr::StopProfileThreadUsage+C14E - 48 8B 0D 6B 64 58 01 - mov rcx,[GhostOfTsushima.g_pAssertHook+D658] + --GhostOfTsushima.AK::MemoryMgr::StopProfileThreadUsage+C155 - 4C 8B 81 E0 00 00 00 - mov r8,[rcx+000000E0] + end + + local tAddress = HackTool:AddAddress("PSN_CHECK_2") + + if HackTool:SignatureScan("40 ?? 48 ?? ?? ?? 80 79 ?? ?? 48 ?? ?? 75 ?? E8 ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? B9",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tResultCount = HackTool:SignatureScanMulti("48 83 ?? ?? 48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? E8","PSN_CHECK",PAGE_EXECUTE_READ,0x3B,Process_EXEName) + + if tResultCount ~= 4 then + return ErrorOccurred("Could not find PSN_CHECK injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("PSN_CHECK_3", HackTool:GetAddress( string.format("PSN_CHECK%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GhostOfTsushima.AK::WriteBytesCount::SetCount+536F - E8 1C 19 30 00 - call GhostOfTsushima.exe+7BEC70 + --GhostOfTsushima.AK::WriteBytesCount::SetCount+5374 - 48 8D 0D 9D 92 91 01 - lea rcx,[GhostOfTsushima.exe+1DD65F8] + --GhostOfTsushima.AK::WriteBytesCount::SetCount+537B - E8 20 29 08 00 - call GhostOfTsushima.exe+53FC80 + --GhostOfTsushima.AK::WriteBytesCount::SetCount+5380 - 48 8D 0D 19 60 FE 02 - lea rcx,[GhostOfTsushima.exe+34A3380] + --GhostOfTsushima.AK::WriteBytesCount::SetCount+5387 - E8 D4 EF 2D 00 - call GhostOfTsushima.exe+79C340 + end + + return true + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("ScaleFOV") + Variables:PushFloat("HUDAspectRatio") + Variables:PushDouble("RDI") + Variables:PushInt("HUDWidth") + Variables:Allocate() + Variables["ScaleFOV"]:WriteFloat(fScaleFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)HUD,HUD_cc: + movss xmm6,[(allocation)Variables->HUDAspectRatio] + mov esi,[(allocation)Variables->HUDWidth] + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)LETTERBOX,LETTERBOX_cc: + mov [(allocation)Variables->RDI],rdi + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)LETTERBOX_CONTROLLER,LETTERBOX_CONTROLLER_cc: + call isLetterbox ; Determine if letterboxing is involved + jne originalController ; Shortcut original test if so + jmp %returnaddress% + originalController: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)LETTERBOX_KEYBOARD,LETTERBOX_KEYBOARD_cc: + call isLetterbox + jne originalKeyboard + jmp %returnaddress% + originalKeyboard: + %originalcode% + jmp %returnaddress% + %end% + + isLetterbox: + push rax + mov rax,[(allocation)Variables->RDI] + cmp rax,rdi + pop rax + ret + + (codecave)FOV,FOV_cc: + $$0 $$1,[(allocation)Variables->ScaleFOV] $ctx=1 + %end% + + (codecave)PSN_CHECK_1,PSN_CHECK_1_cc: + nop + nop + nop + %end% + + (codecave)PSN_CHECK_2,PSN_CHECK_2_cc: + nop + nop + %end% + + (codecave)PSN_CHECK_3,PSN_CHECK_3_cc: + nop + nop + nop + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("HUD_cc",bHUD) + Toggle_CodeCave("LETTERBOX_cc",bLetterbox) + Toggle_CodeCave("LETTERBOX_CONTROLLER_cc",bLetterbox) + Toggle_CodeCave("LETTERBOX_KEYBOARD_cc",bLetterbox) + Toggle_CodeCave("PSN_CHECK_1_cc",bPSN) + Toggle_CodeCave("PSN_CHECK_2_cc",bPSN) + Toggle_CodeCave("PSN_CHECK_3_cc",bPSN) + end + + Write_FOV() + Write_HUD_Scaling() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDAspectRatio"] and Variables["HUDWidth"] then + local fHUDScalingAspect = Variables["HUDAspectRatio"]:ReadFloat() + local fHUDWidth = Variables["HUDWidth"]:ReadInt() + PluginViewport:AppendStatusMessage( string.format("===== Fix informations =====\r\nHUD scaling aspect : %.2f, HUD computed width : %.0f", fHUDScalingAspect, fHUDWidth)) + end + +end + +function FOVSlider_Changed(Sender) + + fScaleFOV = Sender:GetPosition() / 100 + lblFOVSlider.Caption:SetCaption( string.format("Factor: x%.2f",fScaleFOV) ) + Write_FOV() + ForceUpdate() + +end + +function HUDScalingSlider_Changed(Sender) + + fHUDScaling = Sender:GetPosition() + lblHUDScalingSlider.Caption:SetCaption( string.format("Value: %.0f%%",fHUDScaling) ) + Write_HUD_Scaling() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ScaleFOV"] then + if bFOV == true then + Variables["ScaleFOV"]:WriteFloat(fScaleFOV) + else + Variables["ScaleFOV"]:WriteFloat(0) + end + end + +end + +function Write_HUD_Scaling() + + local width = DisplayInfo:GetWidth() + local height = DisplayInfo:GetHeight() + local HUDLeft = width * (fHUDScaling / 100) + local HUDRight = width * (1 - (fHUDScaling / 100)) + local HUDWidth = HUDRight - HUDLeft + local HUDAspectRatio = HUDWidth / height + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDAspectRatio"] and Variables["HUDWidth"] then + Variables["HUDAspectRatio"]:WriteFloat(HUDAspectRatio) + Variables["HUDWidth"]:WriteInt(HUDWidth) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUD = Toggle_CheckFix(Sender) + Write_HUD_Scaling() + Toggle_CodeCave("HUD_cc",bHUD) + ForceUpdate() + +end + +function CKLETTERBOXFix_Changed(Sender) + + bLetterbox = Toggle_CheckFix(Sender) + Toggle_CodeCave("LETTERBOX_cc",bLetterbox) + Toggle_CodeCave("LETTERBOX_CONTROLLER_cc",bLetterbox) + Toggle_CodeCave("LETTERBOX_KEYBOARD_cc",bLetterbox) + ForceUpdate() + +end + +function CKPSNFix_Changed(Sender) + + bPSN = Toggle_CheckFix(Sender) + Toggle_CodeCave("PSN_CHECK_1_cc",bPSN) + Toggle_CodeCave("PSN_CHECK_2_cc",bPSN) + Toggle_CodeCave("PSN_CHECK_3_cc",bPSN) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..9fb7afa Binary files /dev/null and b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..bd44d89 Binary files /dev/null and b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..e06959a Binary files /dev/null and b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Scripts/Ghostwire.lua b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Scripts/Ghostwire.lua new file mode 100644 index 0000000..375e636 --- /dev/null +++ b/PluginCache/K4sh/Modules/Ghostwire/Dependencies/Scripts/Ghostwire.lua @@ -0,0 +1,228 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 90 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.77778 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "GWT.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + --if HackTool:SignatureScan("F3 0F 10 ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 83",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GWT.exe+D2D566 - F3 0F 58 83 F8 01 00 00 - addss xmm0,[rbx+000001F8] + --GWT.exe+D2D56E - EB 08 - jmp GWT.exe+D2D578 + --GWT.exe+D2D570 - F3 0F 10 83 F8 01 00 00 - movss xmm0,[rbx+000001F8] + --GWT.exe+D2D578 - F3 0F 11 47 18 - movss [rdi+18],xmm0 + --GWT.exe+D2D57D - 8B 83 08 02 00 00 - mov eax,[rbx+00000208] + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("E9 ?? ?? ?? ?? CC CC CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ??",tAddress,PAGE_EXECUTE_READ,0x57,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GWT.exe+D2B069 - 89 41 28 - mov [rcx+28],eax + --GWT.exe+D2B06C - 8B 42 2C - mov eax,[rdx+2C] + --GWT.exe+D2B06F - 89 41 2C - mov [rcx+2C],eax + --GWT.exe+D2B072 - 8B 41 30 - mov eax,[rcx+30] + --GWT.exe+D2B075 - 33 42 30 - xor eax,[rdx+30] + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + if bAspect == false then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + end + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + fld dword ptr [$$2] $ctx=1 + fst dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%0.2f",fAdditionalFOV) ) + + if bFOV == true then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + local Variables = HackTool:GetAllocation("Variables") + + bAspect = Toggle_CheckFix(Sender) + + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + + if bAspect == false then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + end + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..29f0a0e Binary files /dev/null and b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..ecc33b9 Binary files /dev/null and b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..c8deca7 Binary files /dev/null and b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Scripts/GodOfWar.lua b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Scripts/GodOfWar.lua new file mode 100644 index 0000000..71d466b --- /dev/null +++ b/PluginCache/K4sh/Modules/GodOfWar/Dependencies/Scripts/GodOfWar.lua @@ -0,0 +1,231 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 80 +fAdditionalFOV = 0 +fScreenAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fScreenAspectRatio169 = 1.77778 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Gow.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? C6 80 ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 48 83 ?? ??",tAddress,PAGE_EXECUTE_READ,0x0f,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GoW.exe+4CB9F7 - F3 0F 11 80 90 00 00 00 - movss [rax+00000090],xmm0 + --GoW.exe+4CB9FF - C6 80 94 00 00 00 00 - mov byte ptr [rax+00000094],00 + --GoW.exe+4CBA06 - F3 0F 11 83 A8 01 00 00 - movss [rbx+000001A8],xmm0 + --GoW.exe+4CBA0E - 48 83 C4 20 - add rsp,20 + --GoW.exe+4CBA12 - 5B - pop rbx + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("7D ?? F3 0F ?? ?? ?? ?? ?? ?? ?? EB ?? 41 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GoW.exe+991340 - 7D 0B - jnl GoW.exe+99134D + --GoW.exe+991342 - F3 0F 10 B4 86 38 0E D6 00 - movss xmm6,[rsi+rax*4+00D60E38] + --GoW.exe+99134B - EB 04 - jmp GoW.exe+991351 + --GoW.exe+99134D - 41 0F 28 F0 - movaps xmm6,xmm8 + --GoW.exe+991351 - F3 0F 10 05 B3 B8 6D 04 - movss xmm0,[GoW.exe+506CC0C] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("74 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 41 ?? ?? ?? F3 0F ?? ?? ?? ?? EB",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GoW.exe+4116F4 - F3 0F 11 15 60 74 D7 00 - movss [GoW.exe+1188B5C],xmm2 + --GoW.exe+4116FC - 40 84 FF - test dil,dil + --GoW.exe+4116FF - 74 15 - je GoW.exe+411716 + --GoW.exe+411701 - F3 0F 10 05 1F 4C AE 00 - movss xmm0,[GoW.exe+EF6328] + --GoW.exe+411709 - F3 41 0F 5E C6 - divss xmm0,xmm14 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fScreenAspectRatio) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + jne $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + WriteAR() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function WriteAR() +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + WriteAR() + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..bfc4a92 Binary files /dev/null and b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..5f6c9be Binary files /dev/null and b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..84d33a1 Binary files /dev/null and b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Scripts/GodOfWarRagnarok.lua b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Scripts/GodOfWarRagnarok.lua new file mode 100644 index 0000000..7b8991a --- /dev/null +++ b/PluginCache/K4sh/Modules/GodOfWarRagnarok/Dependencies/Scripts/GodOfWarRagnarok.lua @@ -0,0 +1,244 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 80 +fAdditionalFOV = 0 +fScreenAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fScreenAspectRatio169 = 1.77778 +fmenusFOV = 54.42170334 +fMapFOV = 75.00003052 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "GoWR.exe" + + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tResultCount = HackTool:SignatureScanMulti("75 ?? F3 0F ?? ?? ?? ?? ?? ?? C3 48 ?? ?? ?? ?? ?? ?? F3 0F","FOVS",PAGE_EXECUTE_READ,0x02,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find FOVS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("FOV", HackTool:GetAddress( string.format("FOVS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GoWR.exe+729FB0 - A8 01 - test al,01 + --GoWR.exe+729FB2 - 75 09 - jne GoWR.exe+729FBD + --GoWR.exe+729FB4 - F3 0F 10 81 A0 01 00 00 - movss xmm0,[rcx+000001A0] + --GoWR.exe+729FBC - C3 - ret + --GoWR.exe+729FBD - 48 8B 81 80 01 00 00 - mov rax,[rcx+00000180] + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("89 ?? 48 63 ?? ?? ?? ?? ?? F3 41",tAddress,PAGE_EXECUTE_READ,0x09,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GoWR.exe+40F2C7 - 89 02 - mov [rdx],eax + --GoWR.exe+40F2C9 - 48 63 05 70 84 37 03 - movsxd rax,dword ptr [GoWR.exe+3787740] + --GoWR.exe+40F2D0 - F3 41 0F 10 84 80 B0 81 D6 01 - movss xmm0,[r8+rax*4+01D681B0] + --GoWR.exe+40F2DA - C3 - ret + --GoWR.exe+40F2DB - CC - int 3 + end + + local tAddress = HackTool:AddAddress("DOF") --53.86122894 + + if HackTool:SignatureScan("40 22 ?? ?? ?? ?? ?? F3 44 ?? ?? ?? C7 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GoWR.exe+5758C8 - F3 44 0F 10 9E DC 03 00 00 - movss xmm11,[rsi+000003DC] + --GoWR.exe+5758D1 - 0F 28 E8 - movaps xmm5,xmm0 + --GoWR.exe+5758D4 - 40 22 BB E5 02 00 00 - and dil,[rbx+000002E5] one byte that is set to 0 (disabled dof) or 1 + --GoWR.exe+5758DB - F3 44 0F 5E DE - divss xmm11,xmm6 + --GoWR.exe+5758E0 - C7 05 56 E3 FA 01 00 00 80 3F - mov [GoWR.exe+2523C40],3F800000 + end + + return true +end + +function Enable_Inject() + + local tAddress = HackTool:GetAddress("FOV") + local NearTo = HackTool:GetBaseAddress() - tAddress:GetAddress() -- dirty trick to allocate fix nearby code to hack plus an injection delay + local Variables = HackTool:AllocateMemory("Variables",100) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("FOVMenus") + Variables:PushFloat("FOVMap") + Variables:Allocate(NearTo) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fScreenAspectRatio) + Variables["FOVMenus"]:WriteFloat(fmenusFOV) + Variables["FOVMap"]:WriteFloat(fMapFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + ;comiss $$1,[(allocation)Variables->FOVMenus] $ctx=1 + ;jbe shortcutFOV + ;comiss $$1,[(allocation)Variables->FOVMap] $ctx=1 + ;je shortcutFOV + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + shortcutFOV: + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + mov byte ptr [$$2],0 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"FOV",NearTo) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..809b962 Binary files /dev/null and b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..2c5991a Binary files /dev/null and b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..0ef67cb Binary files /dev/null and b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Scripts/GuardiansOfTheGalaxy.lua b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Scripts/GuardiansOfTheGalaxy.lua new file mode 100644 index 0000000..38a200a --- /dev/null +++ b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Scripts/GuardiansOfTheGalaxy.lua @@ -0,0 +1,158 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 + +--ControlVars +bFixEnabled = true +bCSAspectRatio = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Marvel's Guardians of the Galaxy" +Process_ClassName = "ZSystemClass000" +Process_EXEName = "gotg.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKCSAspectFix_Enable","Cutscene Aspect Fix","CKCSAspectFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV Fix","CKFOVFix_Changed",255,101,180,54) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("CSAspectConstrain") + --if HackTool:SignatureScan("F3 48 0F 2A ?? F3 48 0F 2A ?? 0F 28 ?? F3 0F ?? ?? 0F ?? ?? 76 ?? 44",tAddress,PAGE_EXECUTE_READ,0x14,Process_EXEName) == 0 then + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 48 ?? ?? ?? F3 48 ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("0F 28 C1 F3 0F 5C 41 10",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + --if HackTool:SignatureScan("0F 54 05 81 E4 16 02",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + local EXEAddr = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV") + Variables:PushFloat("Aspect") + Variables:Allocate(EXEAddr) + Variables["Aspect"]:WriteFloat(3.2) + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss xmm1,[(allocation)Variables->FOV] + %originalcode% + jmp %returnaddress% + %end% + + (codecave)CSAspectConstrain,CSAspectConstrain_cc: + movss xmm0,[(allocation)Variables->Aspect] + %end% + + ]] + + if HackTool:CompileAssembly(asm,"FOVFix",EXEAddr) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("CSAspectConstrain_cc",bCSAspectRatio) + Toggle_CodeCave("FOV_cc",bFOV) + if bFOV then + WriteFOV() + end + end + + +end + +function Periodic() + + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = ((Sender:GetScaledFloat(1) + 100) / 1.6) + 25 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + WriteFOV() + ForceUpdate() + +end + +function WriteFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKCSAspectFix_Changed(Sender) + + bCSAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("CSAspectConstrain_cc",bCSAspectRatio) + ForceUpdate() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Scripts/GuardiansOfTheGalaxy.lua.sav b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Scripts/GuardiansOfTheGalaxy.lua.sav new file mode 100644 index 0000000..1ab8a3e --- /dev/null +++ b/PluginCache/K4sh/Modules/GuardiansOfTheGalaxy/Dependencies/Scripts/GuardiansOfTheGalaxy.lua.sav @@ -0,0 +1,177 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fInitialFOV = 0 +--ControlVars +bFixEnabled = true +bCSAspectRatio = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Marvel's Guardians of the Galaxy" +Process_ClassName = "ZSystemClass000" +Process_EXEName = "gotg.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKCSAspectFix_Enable","Cutscene Aspect Fix","CKCSAspectFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV Fix","CKFOVFix_Changed",255,101,180,54) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("CSAspectConstrain") + if HackTool:SignatureScan("F3 48 0F 2A ?? F3 48 0F 2A ?? 0F 28 ?? F3 0F ?? ?? 0F ?? ?? 76 ?? 44",tAddress,PAGE_EXECUTE_READ,0x14,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV") + --if HackTool:SignatureScan("0F 28 C1 F3 0F 5C 41 10",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("FF 90 28 02 00 00 48 8B 45",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV") + Variables:PushFloat("InitialFOV") + Variables:Allocate() + Variables["InitialFOV"]:WriteFloat(fInitialFOV) + + + ResolutionChanged() + + local asm = [[ + (codecave)CSAspectConstrain,CSAspectConstrain_cc: + jmp $$1 + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movaps xmm15,xmm1 + addss xmm15,[(allocation)Variables->FOV] + movss [rcx+0x10],xmm15 + + ; second code + ;%originalcode% + ;movss xmm15,xmm1 + ;addss xmm15,[(allocation)Variables->FOV] ; additional FOV to game's locked one + ;movss [rcx+0x10],xmm15 + + ; first code + ;movss [(allocation)Variables->InitialFOV],xmm1 + ;addss xmm1,[(allocation)Variables->FOV] ; additional FOV to game's locked one + ;%originalcode% + jmp %returnaddress% + %end% + ; gotg.exe+8AF680: 0F 28 C1 - movaps xmm0,xmm1 copy FOV from register to another + ; gotg.exe+8AF683: F3 0F 5C 41 10 - subss xmm0,[rcx+10] + + ]] + + if HackTool:CompileAssembly(asm,"FOVFix") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("CSAspectConstrain_cc",bCSAspectRatio) + Toggle_CodeCave("FOV_cc",bFOV) + if bFOV then + WriteFOV() + end + end + + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + local calculatedFOV = 55 + Variables["FOV"]:ReadFloat() + + if Variables and Variables["FOV"] then + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nIn game new : FOV %.2f\r\n", calculatedFOV ) ) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = (Sender:GetScaledFloat(2) * 1.5) + 25 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + WriteFOV() + ForceUpdate() + +end + +function WriteFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKCSAspectFix_Changed(Sender) + + bCSAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("CSAspectConstrain_cc",bCSAspectRatio) + ForceUpdate() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/Gylt/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Gylt/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..ea64a23 Binary files /dev/null and b/PluginCache/K4sh/Modules/Gylt/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Gylt/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Gylt/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..f858059 Binary files /dev/null and b/PluginCache/K4sh/Modules/Gylt/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Gylt/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Gylt/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..1e0a390 Binary files /dev/null and b/PluginCache/K4sh/Modules/Gylt/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Gylt/Dependencies/Scripts/Gylt.lua b/PluginCache/K4sh/Modules/Gylt/Dependencies/Scripts/Gylt.lua new file mode 100644 index 0000000..7d491f4 --- /dev/null +++ b/PluginCache/K4sh/Modules/Gylt/Dependencies/Scripts/Gylt.lua @@ -0,0 +1,152 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true + +--GAME VARS +fFOV = 1.0 +fAdditionalFOV = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Gylt " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("C6 84 ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? ",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Gylt-Win64-Shipping.exe+2C5F916: 48 33 C4 - xor rax,rsp + --Gylt-Win64-Shipping.exe+2C5F919: 48 89 84 24 20 06 00 00 - mov [rsp+00000620],rax + --Gylt-Win64-Shipping.exe+2C5F921: F3 0F 10 B1 3C 02 00 00 - movss xmm6,[rcx+0000023C] + --Gylt-Win64-Shipping.exe+2C5F929: 33 C0 - xor eax,eax + --Gylt-Win64-Shipping.exe+2C5F92B: 0F 57 C9 - xorps xmm1,xmm1 + end + + return true + +end + + + +function Enable_Inject() + + local EXEAddr = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("Aspect") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("Sharpening") + Variables:Allocate(EXEAddr) + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",EXEAddr) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end + + if bAspectFix and Variables["Aspect"] then + fAspectRatio = DisplayInfo:GetfOffsetWidth() / DisplayInfo:GetfOffsetHeight() + Variables["Aspect"]:WriteFloat(fAspectRatio) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..2a31b9d Binary files /dev/null and b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..9dbb2cb Binary files /dev/null and b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a8cd1c9 Binary files /dev/null and b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Scripts/HellBladeII.lua b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Scripts/HellBladeII.lua new file mode 100644 index 0000000..9d4d866 --- /dev/null +++ b/PluginCache/K4sh/Modules/HellBladeII/Dependencies/Scripts/HellBladeII.lua @@ -0,0 +1,390 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fDefaultAspectRatio = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bLensDistortion = true +bLensSoftness = true +bFringe = true +bFilmGrain = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "Hellblade2-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKLENSDISTORTIONFix_Enable","Lens distortion fix","CKLENSDISTORTIONFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKLENSSOFTNESSFix_Enable","Lens softness fix","CKLENSSOFTNESSFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,201,180,14) + DefaultControls.AddFixToggle("CKFILMGRAINFix_Enable","Film grain fix","CKFILMGRAINFix_Changed",255,221,180,14) + +end + +function Configure_SignatureScan() + + print ("test") + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 ?? ?? 48 ?? ?? 4C",tAddress,PAGE_EXECUTE_READ,0x09,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+3451CA4 - 48 8B 01 - mov rax,[rcx] + --Hellblade2-Win64-Shipping.exe+3451CA7 - FF 90 58 07 00 00 - call qword ptr [rax+00000758] + --Hellblade2-Win64-Shipping.exe+3451CAD - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Hellblade2-Win64-Shipping.exe+3451CB2 - 48 83 C4 28 - add rsp,28 + --Hellblade2-Win64-Shipping.exe+3451CB6 - C3 - ret + end + + local tResultCount = HackTool:SignatureScanMulti("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B ?? 48 8B FA 0F ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ??","ASPECTS",PAGE_EXECUTE_READ,0x59,Process_EXEName) + + if tResultCount ~= 3 then + return ErrorOccurred("Could not find ASPECTS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("ASPECT", HackTool:GetAddress( string.format("ASPECTS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+2C63563 - 89 41 44 - mov [rcx+44],eax + --Hellblade2-Win64-Shipping.exe+2C63566 - 8B 42 48 - mov eax,[rdx+48] + --Hellblade2-Win64-Shipping.exe+2C63569 - 89 41 48 - mov [rcx+48],eax + --Hellblade2-Win64-Shipping.exe+2C6356C - 48 8D 42 4C - lea rax,[rdx+4C] + --Hellblade2-Win64-Shipping.exe+2C63570 - 48 83 C1 4C - add rcx,4C + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("75 ?? BF ?? ?? ?? ?? 8B ?? ?? 48 ?? ?? E8",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+1FD54C3 - 75 05 - jne Hellblade2-Win64-Shipping.exe+1FD54CA + --Hellblade2-Win64-Shipping.exe+1FD54C5 - BF 04 00 00 00 - mov edi,00000004 + --Hellblade2-Win64-Shipping.exe+1FD54CA - 8B 3C 37 - mov edi,[rdi+rsi] + --Hellblade2-Win64-Shipping.exe+1FD54CD - 48 8B CB - mov rcx,rbx + --Hellblade2-Win64-Shipping.exe+1FD54D0 - E8 2B 05 55 01 - call Hellblade2-Win64-Shipping.exe+3525A00 + end + + local tAddress = HackTool:AddAddress("LENSDISTORTION") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? F3 41 0F ?? ?? ?? ?? ?? ?? 49 8B ?? ?? ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+200F2AF - 48 8B 05 D2 8A 89 08 - mov rax,[Hellblade2-Win64-Shipping.exe+A8A7D88] + --Hellblade2-Win64-Shipping.exe+200F2B6 - F3 41 0F 10 85 60 22 00 00 - movss xmm0,[r13+00002260] + --Hellblade2-Win64-Shipping.exe+200F2BF - F3 0F 59 40 04 - mulss xmm0,[rax+04] + --Hellblade2-Win64-Shipping.exe+200F2C4 - F3 41 0F 11 87 B8 00 00 00 - movss [r15+000000B8],xmm0 + --Hellblade2-Win64-Shipping.exe+200F2CD - 49 8B 8D 70 22 00 00 - mov rcx,[r13+00002270] + end + + local tAddress = HackTool:AddAddress("LENSSOFTNESS") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 8D ?? ?? ?? ?? F3 41 0F ?? ?? ?? ?? ?? ?? 41",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+200E3ED - F3 41 0F 10 86 18 23 00 00 - movss xmm0,[r14+00002318] + --Hellblade2-Win64-Shipping.exe+200E3F6 - 8B B5 18 01 00 00 - mov esi,[rbp+00000118] + --Hellblade2-Win64-Shipping.exe+200E3FC - F3 0F 59 40 04 - mulss xmm0,[rax+04] + --Hellblade2-Win64-Shipping.exe+200E401 - 8D 1C 73 - lea ebx,[rbx+rsi*2] + --Hellblade2-Win64-Shipping.exe+200E404 - 03 DE - add ebx,esi + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? F3 41 0F ?? ?? ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? E8",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+200D974 - 48 8B 05 F5 A3 89 08 - mov rax,[Hellblade2-Win64-Shipping.exe+A8A7D70] + --Hellblade2-Win64-Shipping.exe+200D97B - F3 0F 10 86 E8 22 00 00 - movss xmm0,[rsi+000022E8] + --Hellblade2-Win64-Shipping.exe+200D983 - F3 0F 59 40 04 - mulss xmm0,[rax+04] + --Hellblade2-Win64-Shipping.exe+200D988 - F3 41 0F 11 87 D8 00 00 00 - movss [r15+000000D8],xmm0 + --Hellblade2-Win64-Shipping.exe+200D991 - 48 8B 9E 28 C2 00 00 - mov rbx,[rsi+0000C228] + end + + local tAddress = HackTool:AddAddress("FILMGRAIN") + + if HackTool:SignatureScan("0F 84 ?? ?? ?? ?? 49 ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 8D ?? ?? ?? ?? ?? 0F B7",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+218DA65 - 48 8B 05 E4 E9 74 08 - mov rax,[Hellblade2-Win64-Shipping.exe+A8DC450] + --Hellblade2-Win64-Shipping.exe+218DA6C - 83 38 00 - cmp dword ptr [rax],00 + --Hellblade2-Win64-Shipping.exe+218DA6F - 0F 84 BF 00 00 00 - je Hellblade2-Win64-Shipping.exe+218DB34 + --Hellblade2-Win64-Shipping.exe+218DA75 - 49 8B CC - mov rcx,r12 + --Hellblade2-Win64-Shipping.exe+218DA78 - E8 53 6D 39 01 - call Hellblade2-Win64-Shipping.exe+35247D0 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushInt("Aspect") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + cmp dword ptr [(allocation)Variables->Aspect],1 + jne regularFOV + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + regularFOV: + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$2,[(allocation)Variables->FOVOut] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)LENSDISTORTION,LENSDISTORTION_cc: + xorps $$1,$$1 $ctx=1 + nop + nop + %end% + + (codecave)LENSSOFTNESS,LENSSOFTNESS_cc: + xorps $$1,$$1 $ctx=1 + nop + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + xorps $$1,$$1 $ctx=1 + nop + nop + %end% + + (codecave)FILMGRAIN,FILMGRAIN_cc: + jmp $$1 + nop + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("LENSDISTORTION_cc",bLensDistortion) + Toggle_CodeCave("LENSSOFTNESS_cc",bLensSoftness) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("FILMGRAIN_cc",bFilmGrain) + end + + Write_FOV() + Write_AspectRatio() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] and Variables["CompensatedFOV"] and Variables["FOVIn"] then + if bAspect == false then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + Variables["CompensatedFOV"]:WriteFloat(fFOVIn) + Variables["Aspect"]:WriteInt(0) + else + Variables["Aspect"]:WriteInt(1) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Write_AspectRatio() + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKLENSDISTORTIONFix_Changed(Sender) + + bLensDistortion = Toggle_CheckFix(Sender) + Toggle_CodeCave("LENSDISTORTION_cc",bLensDistortion) + ForceUpdate() + +end + +function CKLENSSOFTNESSFix_Changed(Sender) + + bLensSoftness = Toggle_CheckFix(Sender) + Toggle_CodeCave("LENSSOFTNESS_cc",bLensSoftness) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKFILMGRAINFix_Changed(Sender) + + bFilmGrain = Toggle_CheckFix(Sender) + Toggle_CodeCave("FILMGRAIN_cc",bFilmGrain) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..04f716c Binary files /dev/null and b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..26fe9e0 Binary files /dev/null and b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..182afa4 Binary files /dev/null and b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Scripts/HogwartsLegacy.lua b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Scripts/HogwartsLegacy.lua new file mode 100644 index 0000000..46be3d6 --- /dev/null +++ b/PluginCache/K4sh/Modules/HogwartsLegacy/Dependencies/Scripts/HogwartsLegacy.lua @@ -0,0 +1,236 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true +bAspectRatio = true +bAspectFix = true +bSharpening = true + +--GAME VARS +fFOV = 1.0 +fAdditionalFOV = 0 +fAspectRatio = 1.777777791 +fSharpening = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Hogwarts Legacy " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("70") + + DefaultControls.AddHeader("Header_Sharp","Sharpening fine adjustment",15,150,210,17) + DefaultControls.AddFOVSlider("SharpSlider","SharpSlider_Changed",55,180,125,35) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Cinematics aspect fix","CKARatioFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKSharpFix_Enable","Tone Mapping Sharpening fix","CKSharpFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("Sharpening") + if HackTool:SignatureScan("EB ?? 48 ?? ?? E8 ?? ?? ?? ?? F3 0F ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ",tAddress,PAGE_EXECUTE_READ,0x17,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HogwartsLegacy.exe+3EDE648: F3 0F 11 44 24 38 - movss [rsp+38],xmm0 + --HogwartsLegacy.exe+3EDE64E: 48 8B 05 D3 DC 27 05 - mov rax,[HogwartsLegacy.exe+915C328] + --HogwartsLegacy.exe+3EDE655: F3 0F 10 78 04 - movss xmm7,[rax+04] + --HogwartsLegacy.exe+3EDE65A: 0F 2F FE - comiss xmm7,xmm6 + --HogwartsLegacy.exe+3EDE65D: 73 05 - jae HogwartsLegacy.exe+3EDE664 + end + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F6 83 ?? ?? ?? ?? ?? 74 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? EB ?? F3 0F ?? ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x1B,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HogwartsLegacy.exe+522F9D5 - F3 0F 10 83 64 02 00 00 - movss xmm0,[rbx+00000264] + --HogwartsLegacy.exe+522F9DD - F3 0F 58 83 18 02 00 00 - addss xmm0,[rbx+00000218] + --HogwartsLegacy.exe+522F9E5 - EB 08 - jmp HogwartsLegacy.exe+522F9EF + --HogwartsLegacy.exe+522F9E7 - F3 0F 10 83 18 02 00 00 - movss xmm0,[rbx+00000218] + --HogwartsLegacy.exe+522F9EF - F3 0F 11 47 18 - movss [rdi+18],xmm0 + --HogwartsLegacy.exe+522F9F4 - 8B 83 28 02 00 00 - mov eax,[rbx+00000228] + end + + local tAddress = HackTool:AddAddress("Aspect") + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0f 28 ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0E,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HogwartsLegacy.exe+4F755F4 - F3 0F 10 83 8C 08 00 00 - movss xmm0,[rbx+0000088C] + --HogwartsLegacy.exe+4F755FC - F3 0F 5E C1 - divss xmm0,xmm1 + --HogwartsLegacy.exe+4F75600 - F3 0F 11 83 94 08 00 00 - movss [rbx+00000894],xmm0 + --HogwartsLegacy.exe+4F75608 - F3 0F 11 83 28 02 00 00 - movss [rbx+00000228],xmm0 + --HogwartsLegacy.exe+4F75610 - 0F 28 74 24 20 - movaps xmm6,[rsp+20] + end + + return true + +end + + + +function Enable_Inject() + + local EXEAddr = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("Aspect") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("Sharpening") + Variables:Allocate(EXEAddr) + + asm = [[ + + (codecave:jmp)Sharpening,Sharpening_cc: + $$0 $$1,[(allocation)Variables->Sharpening] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)Aspect,Aspect_cc: + $$0 $$2,[(allocation)Variables->Aspect] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",EXEAddr) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("Sharpening_cc",bSharpening) + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("Aspect_cc",bAspectFix) + end + + Write_FOV() + Write_Sharpening() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end + + if bAspectFix and Variables["Aspect"] then + fAspectRatio = DisplayInfo:GetfOffsetWidth() / DisplayInfo:GetfOffsetHeight() + Variables["Aspect"]:WriteFloat(fAspectRatio) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKSharpFix_Changed(Sender) + + bSharpening = Toggle_CheckFix(Sender) + Toggle_CodeCave("Sharpening_cc",bSharpening) + ForceUpdate() + +end + +function SharpSlider_Changed(Sender) + + fSharpening = (Sender:GetScaledFloat(2) + 50) / 10 + lblSharpSlider.Caption:SetCaption( string.format("%.2f",fSharpening)) + Write_Sharpening() + ForceUpdate() + +end + +function Write_Sharpening() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["Sharpening"] then + Variables["Sharpening"]:WriteFloat(fSharpening) + end + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("+ %.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function CKARatioFix_Changed(Sender) + + bAspectFix = Toggle_CheckFix(Sender) + Toggle_CodeCave("Aspect_cc",bAspectFix) + ForceUpdate() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..0d8f5f8 Binary files /dev/null and b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..964204f Binary files /dev/null and b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..e4f3fa2 Binary files /dev/null and b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Scripts/HorizonForbiddenWest.lua b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Scripts/HorizonForbiddenWest.lua new file mode 100644 index 0000000..a17022d --- /dev/null +++ b/PluginCache/K4sh/Modules/HorizonForbiddenWest/Dependencies/Scripts/HorizonForbiddenWest.lua @@ -0,0 +1,322 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalWorldFOV = 0 +fAdditionalAimFOV = 0 +fAdditionalCinematicsFOV = 0 +fHUDScaling = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.778 + +--ControlVars +bFixEnabled = true +bFOV = true +bHUD = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "HorizonForbiddenWest.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = false + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_World_FOV","World FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("WorldFOVSlider","WorldFOVSlider_Changed",55,100,125,35,0,60,0,1) + WorldFOVSlider:SetTickFrequency(5) + WorldFOVSlider:SetLabel1Text("0") + WorldFOVSlider:SetLabel2Text("+60") + + DefaultControls.AddHeader("Header_Aim_FOV","Aim FOV fine adjustment",15,160,210,17) + DefaultControls.AddFixedFOVSlider("AimFOVSlider","AimFOVSlider_Changed",55,190,125,35,0,80,0,1) + AimFOVSlider:SetTickFrequency(5) + AimFOVSlider:SetLabel1Text("-20") + AimFOVSlider:SetLabel2Text("+60") + + DefaultControls.AddHeader("Header_Cinematics_FOV","Cinematics FOV fine adjustment",15,250,210,17) + DefaultControls.AddFixedFOVSlider("CinematicsFOVSlider","CinematicsFOVSlider_Changed",55,280,125,35,0,60,0,1) + CinematicsFOVSlider:SetTickFrequency(5) + CinematicsFOVSlider:SetLabel1Text("0") + CinematicsFOVSlider:SetLabel2Text("+60") + + DefaultControls.AddHeader("Header_HUD_Scaling","HUD scaling fine adjustment",15,340,210,17) + DefaultControls.AddFixedFOVSlider("HUDScalingSlider","HUDScalingSlider_Changed",55,370,125,35,0,40,0,1) + HUDScalingSlider:SetTickFrequency(5) + HUDScalingSlider:SetLabel1Text("0%") + HUDScalingSlider:SetLabel2Text("40%") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD Scaling fine fix","CKHUDFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tResultCount = HackTool:SignatureScanMulti("C5 FA 10 81 ?? ?? ?? ?? C3 CC CC CC CC CC CC CC C5 FA 10 81","AOB",PAGE_EXECUTE_READ,0x08,Process_EXEName) + + if tResultCount ~= 8 then + return ErrorOccurred("Could not find AOB injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("CinematicsFOV", HackTool:GetAddress( string.format("AOB%d",4) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HorizonForbiddenWest.exe+99168E - CC - int 3 + --HorizonForbiddenWest.exe+99168F - CC - int 3 + --HorizonForbiddenWest.exe+991690 - C5 FA 10 81 64 02 00 00 - vmovss xmm0,[rcx+00000264] + --HorizonForbiddenWest.exe+991698 - C3 - ret + --HorizonForbiddenWest.exe+991699 - CC - int 3 + end + + local tAddress = HackTool:AddAddress("FOVS") + + if HackTool:SignatureScan("44 39 ?? ?? ?? ?? ?? 74 ?? C5 FA ?? ?? ?? ?? ?? ?? C5 F8",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HorizonForbiddenWest.exe+118CB10 - EB 03 - jmp HorizonForbiddenWest.exe+118CB15 + --HorizonForbiddenWest.exe+118CB12 - 49 8B C1 - mov rax,r9 + --HorizonForbiddenWest.exe+118CB15 - C5 FA 10 80 14 01 00 00 - vmovss xmm0,[rax+00000114] + --HorizonForbiddenWest.exe+118CB1D - 44 39 8B D8 02 00 00 - cmp [rbx+000002D8],r9d + --HorizonForbiddenWest.exe+118CB24 - 74 1A - je HorizonForbiddenWest.exe+118CB40 + end + + local tAddress = HackTool:AddAddress("HUD") + + if HackTool:SignatureScan("48 8B ?? ?? ?? ?? ?? 48 8D ?? ?? ?? ?? ?? 48 8B ?? FF ?? ?? C5 F8 ?? ?? ?? ?? ?? ?? C4",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HorizonForbiddenWest.exe+143162F - C5 FA 10 3D 09 49 58 00 - vmovss xmm7,[HorizonForbiddenWest.exe+19B5F40] + --HorizonForbiddenWest.exe+1431637 - EB 05 - jmp HorizonForbiddenWest.exe+143163E + --HorizonForbiddenWest.exe+1431639 - C4 C1 78 28 F8 - vmovaps xmm7,xmm8 + --HorizonForbiddenWest.exe+143163E - 48 8B 0D 2B 52 F0 00 - mov rcx,[HorizonForbiddenWest.exe+2336870] + --HorizonForbiddenWest.exe+1431645 - 48 8D 15 94 2B 3E 00 - lea rdx,[HorizonForbiddenWest.exe+18141E0] + --HorizonForbiddenWest.exe+143164C - 48 8B 01 - mov rax,[rcx] + --HorizonForbiddenWest.exe+143164F - FF 50 70 - call qword ptr [rax+70] + end + + return true + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("WorldFOV") + Variables:PushFloat("WorldFOVIn") + Variables:PushFloat("WorldFOVOut") + Variables:PushFloat("AimFOVIn") + Variables:PushFloat("AimFOVOut") + Variables:PushFloat("CinematicsFOVIn") + Variables:PushFloat("CinematicsFOVOut") + Variables:PushFloat("AdditionalWorldFOV") + Variables:PushFloat("AdditionalAimFOV") + Variables:PushFloat("AdditionalCinematicsFOV") + Variables:PushFloat("HUDAspectRatio") + Variables:Allocate() + Variables["WorldFOV"]:WriteFloat(70) + Variables["WorldFOVIn"]:WriteFloat(fDefaultFOV) + Variables["WorldFOVOut"]:WriteFloat(fDefaultFOV) + Variables["AimFOVIn"]:WriteFloat(fDefaultFOV) + Variables["AimFOVOut"]:WriteFloat(fDefaultFOV) + Variables["CinematicsFOVIn"]:WriteFloat(fDefaultFOV) + Variables["CinematicsFOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalWorldFOV"]:WriteFloat(fAdditionalWorldFOV) + Variables["AdditionalAimFOV"]:WriteFloat(fAdditionalAimFOV) + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOVS,FOVS_cc: + comiss xmm0,[(allocation)Variables->WorldFOV] + je worldFOV + movss [(allocation)Variables->AimFOVIn],xmm0 + addss xmm0,[(allocation)Variables->AdditionalAimFOV] + movss [(allocation)Variables->AimFOVOut],xmm0 + jmp exitFOVS + worldFOV: + movss [(allocation)Variables->WorldFOVIn],xmm0 + addss xmm0,[(allocation)Variables->AdditionalWorldFOV] + movss [(allocation)Variables->WorldFOVOut],xmm0 + exitFOVS: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)CinematicsFOV,CinematicsFOV_cc: + test r13,r13 + jne exit + movss [(allocation)Variables->CinematicsFOVIn],xmm0 + addss xmm0,[(allocation)Variables->AdditionalCinematicsFOV] + movss [(allocation)Variables->CinematicsFOVOut],xmm0 + exit: + %originalcode% + %end% + + (codecave:jmp)HUD,HUD_cc: + movss xmm7,[(allocation)Variables->HUDAspectRatio] + %originalcode% + jmp %returnaddress% + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("CinematicsFOV_cc",bFOV) + Toggle_CodeCave("FOVS_cc",bFOV) + Toggle_CodeCave("HUD_cc",bHUD) + end + + Write_FOV() + Write_HUD_Scaling() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["CinematicsFOVIn"] and Variables["AdditionalWorldFOV"] then + local fWorldFOVIn = Variables["WorldFOVIn"]:ReadFloat() + local fWorldFOVOut = Variables["WorldFOVOut"]:ReadFloat() + local fAimFOVIn = Variables["AimFOVIn"]:ReadFloat() + local fAimFOVOut = Variables["AimFOVOut"]:ReadFloat() + local fCinematicsFOVIn = Variables["CinematicsFOVIn"]:ReadFloat() + local fCinematicsFOVOut = Variables["CinematicsFOVOut"]:ReadFloat() + local HUDScalingAspect = Variables["HUDAspectRatio"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("===== Fix informations =====\r\n(World) FOV In: %.2f, FOV Out: %.2f -- (Aim) FOV In: %.2f, FOV Out: %.2f -- (Cinematics) FOV In: %.2f, FOV Out: %.2f\r\nHUD scaling aspect : %.2f", fWorldFOVIn, fWorldFOVOut, fAimFOVIn, fAimFOVOut, fCinematicsFOVIn, fCinematicsFOVOut, HUDScalingAspect)) + end + +end + +function WorldFOVSlider_Changed(Sender) + + fAdditionalWorldFOV = Sender:GetPosition() + lblWorldFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalWorldFOV) ) + Write_FOV() + ForceUpdate() + +end + +function AimFOVSlider_Changed(Sender) + + fAdditionalAimFOV = Sender:GetPosition() - 20 + lblAimFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalAimFOV) ) + Write_FOV() + ForceUpdate() + +end + +function CinematicsFOVSlider_Changed(Sender) + + fAdditionalCinematicsFOV = Sender:GetPosition() + lblCinematicsFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalCinematicsFOV) ) + Write_FOV() + ForceUpdate() + +end + +function HUDScalingSlider_Changed(Sender) + + fHUDScaling = Sender:GetPosition() + lblHUDScalingSlider.Caption:SetCaption( string.format("Value: %.0f%%",fHUDScaling) ) + Write_HUD_Scaling() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalWorldFOV"] then + if bFOV == true then + Variables["AdditionalWorldFOV"]:WriteFloat(fAdditionalWorldFOV) + Variables["AdditionalAimFOV"]:WriteFloat(fAdditionalAimFOV) + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + else + Variables["AdditionalWorldFOV"]:WriteFloat(0) + Variables["AdditionalAimFOV"]:WriteFloat(0) + Variables["AdditionalCinematicsFOV"]:WriteFloat(0) + end + end + +end + +function Write_HUD_Scaling() + + local width = DisplayInfo:GetWidth() + local height = DisplayInfo:GetHeight() + local HUDLeft = width * (fHUDScaling / 100) + local HUDRight = width * (1 - (fHUDScaling / 100)) + local HUDWidth = HUDRight - HUDLeft + local HUDAspectRatio = HUDWidth / height + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDAspectRatio"] then + Variables["HUDAspectRatio"]:WriteFloat(HUDAspectRatio) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("CinematicsFOV_cc",bFOV) + Toggle_CodeCave("FOVS_cc",bFOV) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUD = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("HUD_cc",bHUD) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..532e2fa Binary files /dev/null and b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..55afeea Binary files /dev/null and b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..e0e46f0 Binary files /dev/null and b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Scripts/HorizonZeroDawn.lua b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Scripts/HorizonZeroDawn.lua new file mode 100644 index 0000000..eaad534 --- /dev/null +++ b/PluginCache/K4sh/Modules/HorizonZeroDawn/Dependencies/Scripts/HorizonZeroDawn.lua @@ -0,0 +1,432 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bAspectRatio = true +Aspect_Changed = false +bDOF = true +bFOV = true +bHUDScale = true +FOVValue = 90 +HUDScaleValue = 1 +dummyValue = 15 +DefaultScaleValue = 1 +Default_AspectRatio = 1.777777791 +AspectRatioScale = 1 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Horizon Zero Dawn: Complete Edition" +Process_ClassName = "*" +Process_EXEName = "HorizonZeroDawn.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 1500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Manual", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,40,160,0,1) + FOVSlider:SetTickFrequency(15) + FOVSlider:SetLabel1Text("40") + FOVSlider:SetLabel2Text("160") + + DefaultControls.AddHeader("Header_HUDScale","HUD Scale Multiplier adjustment",15,155,210,17) + + DefaultControls.AddFixedFOVSlider("HUDScaleSlider","HUDScaleSlider_Changed",55,175,125,35,40,160,0,1) + HUDScaleSlider:SetTickFrequency(15) + HUDScaleSlider:SetLabel1Text("0.4") + HUDScaleSlider:SetLabel2Text("1.6") + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKAspectFix_Enable","Aspect Fix","CKAspectFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("FOV_Enable","FOV adjustment fix","FOV_Changed",255,121,180,14) + DefaultControls.AddFixToggle("HUDScale_Enable","HUD Scale adjustment fix","HUDScale_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Remove DOF","CKDOFFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("74 64 41 83 F8 01",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("AspectRatio") + + + if HackTool:SignatureScan("99 99 A9 3F 39 8E E3 3F 00 00",tAddress,PAGE_READONLY,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + tAddress:AddSubOffset("ARatio",0x4) + + Default_AspectRatio = tAddress["ARatio"]:ReadFloat() + + tAddress["ARatio"]:SetAutoUnprotect(true) + + Aspect_Defaults = true + end + + local tAddress = HackTool:AddAddress("AspectRatio2") + + if HackTool:SignatureScan("F3 0F 10 8B ?? ?? ?? ?? 0F 57 D2 F3 0F 59",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("AspectRatio3") + + if HackTool:SignatureScan("F3 0F 10 80 80 2F 00 00",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("AspectRatio4") + + if HackTool:SignatureScan("F3 0F 10 80 84 2F 00 00",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("AspectRatio5") + + if HackTool:SignatureScan("F3 45 0F 11 85 ?? ?? ?? ?? 0F 84",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("AspectRatio6") + + if HackTool:SignatureScan("F3 45 0F 11 85 ?? ?? ?? ?? 44 0F",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F 2A 88 ?? ?? ?? ?? 0F 28 C1",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("HUDScale") + + if HackTool:SignatureScan("F3 0F 5E 05 ?? ?? ?? ?? F3 0F 5D C8 41 0F",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("HUDScale2") + + if HackTool:SignatureScan("8B 88 90 01 00 00 41 89 8D",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV") + Variables:PushFloat("HUDScale") + Variables:PushFloat("DUMMYValue") + Variables:PushFloat("ScaleValue") + Variables:PushFloat("AspectRatioScale") + Variables:PushFloat("DefaultAspectRatio") + Variables:Allocate() + + Variables["DUMMYValue"]:WriteFloat(dummyValue) + Variables["ScaleValue"]:WriteFloat(DefaultScaleValue) + Variables["DefaultAspectRatio"]:WriteFloat(Default_AspectRatio) + + local AspectRatio = DisplayInfo:GetAspectRatio() + AspectRatioScale = Default_AspectRatio / AspectRatio + + Variables["AspectRatioScale"]:WriteFloat(AspectRatioScale) + + WriteFOV() + WriteHUDScale() + + local asm = [[ + + + (codecave:jmp)AspectRatio2,AspectRatio2_cc: + movss xmm1,[(allocation)Variables->AspectRatioScale] + jmp %returnaddress% + %end% + + (codecave:jmp)AspectRatio3,AspectRatio3_cc: + movss xmm0,[(allocation)Variables->AspectRatioScale] + jmp %returnaddress% + %end% + + (codecave:jmp)AspectRatio4,AspectRatio4_cc: + movss xmm0,[(allocation)Variables->ScaleValue] + jmp %returnaddress% + %end% + + (codecave:jmp)AspectRatio5,AspectRatio5_cc: + movss xmm8,[(allocation)Variables->ScaleValue] + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)AspectRatio6,AspectRatio6_cc: + movss xmm8,[(allocation)Variables->DefaultAspectRatio] + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)FOV,FOV_cc: + movss xmm1,[(allocation)Variables->FOV] + cvtps2dq xmm1,xmm1 + movss [rax+00000340],xmm1 + %originalcode% + jmp %returnaddress% + %end% + + ; HorizonZeroDawn.exe+119438F: 0F 57 C9 - xorps xmm1,xmm1 + ; ---------- INJECTING HERE ---------- + ; HorizonZeroDawn.exe+1194392: F3 0F 2A 88 54 01 00 00 - cvtsi2ss xmm1,[rax+00000154] + ; ---------- DONE INJECTING ---------- + ; HorizonZeroDawn.exe+119439A: 0F 28 C1 - movaps xmm0,xmm1 + + (codecave:jmp)HUDScale,HUDScale_cc: + %originalcode% + movss xmm0,[(allocation)Variables->DUMMYValue] + movss xmm1,[(allocation)Variables->HUDScale] + jmp %returnaddress% + %end% + + ; HorizonZeroDawn.exe+13C78C0: F3 0F 5E 05 54 ED 6D 00 - divss xmm0,[HorizonZeroDawn.exe+1AA661C] + ; ---------- INJECTING HERE ---------- + ; HorizonZeroDawn.exe+13C78C8: F3 0F 5D C8 - minss xmm1,xmm0 + ; ---------- DONE INJECTING ---------- + ; HorizonZeroDawn.exe+13C78CC: 41 0F 2E 8D 7C 04 00 00 - ucomiss xmm1,[r13+0000047C] + + + (codecave:jmp)HUDScale2,HUDScale2_cc: + mov ecx,[(allocation)Variables->ScaleValue] + jmp %returnaddress% + %end% + + ; HorizonZeroDawn.exe+13C78FF: 48 8B 05 0A 4F D8 05 - mov rax,[HorizonZeroDawn.exe+714C810] + ; ---------- INJECTING HERE ---------- + ; HorizonZeroDawn.exe+13C7906: 8B 88 90 01 00 00 - mov ecx,[rax+00000190] + ; ---------- DONE INJECTING ---------- + ; HorizonZeroDawn.exe+13C790C: 41 89 8D 80 04 00 00 - mov [r13+00000480],ecx + + (codecave)DOF,DOF_cc: + jmp $$1 $ctx=1 + %end% + + ; HorizonZeroDawn.exe+71DC38: 45 85 C0 - test r8d,r8d + ; ---------- INJECTING HERE ---------- + ; HorizonZeroDawn.exe+71DC3B: 74 64 - je HorizonZeroDawn.exe+71DCA1 + ; ---------- DONE INJECTING ---------- + ; HorizonZeroDawn.exe+71DC3D: 41 83 F8 01 - cmp r8d,01 + + + ]] + + if HackTool:CompileAssembly(asm,"FOV") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("AspectRatio2_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio3_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio4_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio5_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio6_cc",bAspectRatio) + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("HUDScale_cc",bHUDScale) + Toggle_CodeCave("HUDScale2_cc",bHUDScale) + + if bAspectRatio then + WriteAspectRatio() + end + end + +end + +function Periodic() + + local AspectRatio = HackTool:GetAddress("AspectRatio") + local Variables = HackTool:GetAllocation("Variables") + + if AspectRatio and AspectRatio["ARatio"] then + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nCutscenes aspect ratio %.2f\r\n", AspectRatio["ARatio"]:ReadFloat() ) ) + end + +end + +function Disable_Inject() + + RestoreAspectDefault() + CleanUp() + +end + +function CKDOFFix_Changed(Sender) + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) +end + +function CKAspectFix_Changed(Sender) + bAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("AspectRatio2_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio3_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio4_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio5_cc",bAspectRatio) + Toggle_CodeCave("AspectRatio6_cc",bAspectRatio) + + if bAspectRatio == true then + WriteAspectRatio() + else + RestoreAspectDefault() + end + + ForceUpdate() +end + +function WriteAspectRatio() + + local AspectRatio = HackTool:GetAddress("AspectRatio") + + if AspectRatio and AspectRatio["ARatio"] then + AspectRatio["ARatio"]:WriteFloat(DisplayInfo:GetAspectRatio()) + end + +end + +function RestoreAspectDefault() + + local AspectRatio = HackTool:GetAddress("AspectRatio") + if AspectRatio and AspectRatio["ARatio"] and Aspect_Defaults == true then + AspectRatio["ARatio"]:WriteFloat(Default_AspectRatio) + + print("Restored AspectRatio defaults") + end + + Aspect_Changed = false + +end + +function FOV_Changed(Sender) + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + + if bFOV then + local FOV = FOVSlider:GetPosition() + FOVValue = FOV + end + WriteFOV() + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + local FOV = Sender:GetPosition() + local Variables = HackTool:GetAllocation("Variables") + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",FOV) ) + + if bFOV then + FOVValue = FOV + WriteFOV() + end + + ForceUpdate() + +end + +function HUDScale_Changed(Sender) + + bHUDScale = Toggle_CheckFix(Sender) + bHUDScale2 = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDScale_cc",bHUDScale) + Toggle_CodeCave("HUDScale2_cc",bHUDScale) + + WriteHUDScale() + ForceUpdate() + +end + +function HUDScaleSlider_Changed(Sender) + local HUDScale = Sender:GetPosition() + HUDScale = HUDScale / 100 + lblHUDScaleSlider.Caption:SetCaption( string.format("Value : %.2f",(HUDScale))) + + if bHUDScale then + HUDScaleValue = HUDScale + WriteHUDScale() + end + + ForceUpdate() +end + +function WriteFOV() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(FOVValue) + end + +end + +function WriteHUDScale() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDScale"] then + Variables["HUDScale"]:WriteFloat(HUDScaleValue) + end + +end + +function ResolutionChanged() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..61ed967 Binary files /dev/null and b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..84a7ba1 Binary files /dev/null and b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..23de3d9 Binary files /dev/null and b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Scripts/HouseOfAshes.lua b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Scripts/HouseOfAshes.lua new file mode 100644 index 0000000..39d6fec --- /dev/null +++ b/PluginCache/K4sh/Modules/HouseOfAshes/Dependencies/Scripts/HouseOfAshes.lua @@ -0,0 +1,218 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bAspect = true +bFOV = true + +--GAME VARS +fDefaultFOV = 0 +fAspectRatio = 0 +fAdditionalFOV = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "House of Ashes " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("+0") + FOVSlider:SetLabel2Text("+70") + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Aspect Ratio fix","CKARatioFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + --if HackTool:SignatureScan("E8 ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? EB ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 0F 2F ?? ?? ?? ?? ?? 77 ?? 48 8B ?? ?? ?? ?? ?? F3 0F ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HouseOfAshes-Win64-Shipping.exe+366DB4F - F3 0F5E C1 - divss xmm0,xmm1 + --HouseOfAshes-Win64-Shipping.exe+366DB53 - E8 0DF06701 - call HouseOfAshes-Win64-Shipping.exe+4CECB65 + --HouseOfAshes-Win64-Shipping.exe+366DB58 - F3 0F59 05 881F7002 - mulss xmm0,[HouseOfAshes-Win64-Shipping.exe+5D6FAE8] + --HouseOfAshes-Win64-Shipping.exe+366DB60 - EB 03 - jmp HouseOfAshes-Win64-Shipping.exe+366DB65 + --HouseOfAshes-Win64-Shipping.exe+366DB62 - 0F57 C0 - xorps xmm0,xmm0 + end + + local tAddress = HackTool:AddAddress("AspectFix1") + + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F 11 ?? ?? ?? ?? ?? F3 0F 11 ?? ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0E,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HouseOfAshes-Win64-Shipping.exe+366DB7A - F3 0F10 83 3C080000 - movss xmm0,[rbx+0000083C] + --HouseOfAshes-Win64-Shipping.exe+366DB82 - F3 0F5E C1 - divss xmm0,xmm1 + --HouseOfAshes-Win64-Shipping.exe+366DB86 - F3 0F11 83 44080000 - movss [rbx+00000844],xmm0 + --HouseOfAshes-Win64-Shipping.exe+366DB8E - F3 0F11 83 18020000 - movss [rbx+00000218],xmm0 + --HouseOfAshes-Win64-Shipping.exe+366DB96 - 0F28 74 24 20 - movaps xmm6,[rsp+20] + end + + local tAddress = HackTool:AddAddress("AspectFix2") + + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F ?? ?? E8 ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --HouseOfAshes-Win64-Shipping.exe+366DB39 - F3 0F11 83 64080000 - movss [rbx+00000864],xmm0 + --HouseOfAshes-Win64-Shipping.exe+366DB41 - 76 1F - jna HouseOfAshes-Win64-Shipping.exe+366DB62 + --HouseOfAshes-Win64-Shipping.exe+366DB43 - F3 0F10 83 3C080000 - movss xmm0,[rbx+0000083C] + --HouseOfAshes-Win64-Shipping.exe+366DB4B - F3 0F58 C9 - addss xmm1,xmm1 + --HouseOfAshes-Win64-Shipping.exe+366DB4F - F3 0F5E C1 - divss xmm0,xmm1 + end + + return true +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] and bFOV then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("AspectRatio") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + cmp r15,0 ; will not affect main menu + je exit + + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + + exit: + jmp %returnaddress% + %end% + + (codecave:jmp)AspectFix1,AspectFix1_cc: + movss $$2,[(allocation)Variables->AspectRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ; following code will compensate widers aspect ratios for FOV + (codecave:jmp)AspectFix2,AspectFix2_cc: + movss xmm15,[$$2+4] $ctx=1 + mulss xmm15,[(allocation)Variables->AspectRatio] + movss $$1,xmm15 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("AspectFix1_cc",bAspect) + Toggle_CodeCave("AspectFix2_cc",bAspect) + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("AspectFix1_cc",bAspect) + Toggle_CodeCave("AspectFix2_cc",bAspect) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("%.0f",fAdditionalFOV) ) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function ResolutionChanged() + + local fAspectRatio = DisplayInfo:GetAspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + +end + +function Disable_Inject() + CleanUp() +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..713cd4c Binary files /dev/null and b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..41fb1de Binary files /dev/null and b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..0dfa094 Binary files /dev/null and b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Scripts/IAMJesusChrist.lua b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Scripts/IAMJesusChrist.lua new file mode 100644 index 0000000..01dbec6 --- /dev/null +++ b/PluginCache/K4sh/Modules/IAMJesusChrist/Dependencies/Scripts/IAMJesusChrist.lua @@ -0,0 +1,260 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Level1.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 0F ?? ?? 8B 83 ?? ?? ?? ?? 89 ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ASC-Win64-Shipping.exe+42E671F - 0F 29 45 F0 - movaps [rbp-10],xmm0 + --ASC-Win64-Shipping.exe+42E6723 - F3 0F 10 07 - movss xmm0,[rdi] + --ASC-Win64-Shipping.exe+42E6727 - F2 0F 11 4D 00 - movsd [rbp+00],xmm1 <<== + --ASC-Win64-Shipping.exe+42E672C - 0F 28 CF - movaps xmm1,xmm7 + --ASC-Win64-Shipping.exe+42E672F - 48 89 74 24 30 - mov [rsp+30],rsi + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("C3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B F9 48 ?? ?? 0F ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x5f,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Level1.exe+187FF5D - 89 41 40 - mov [rcx+40],eax + --Level1.exe+187FF60 - 8B 42 44 - mov eax,[rdx+44] + --Level1.exe+187FF63 - 89 41 44 - mov [rcx+44],eax + --Level1.exe+187FF66 - 8B 41 48 - mov eax,[rcx+48] + --Level1.exe+187FF69 - 33 42 48 - xor eax,[rdx+48] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 8B ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 8D ?? ?? ?? ?? ?? 48 8D ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Level1.exe+3EDBD93 - 90 - nop + --Level1.exe+3EDBD94 - CC - int 3 + --Level1.exe+3EDBD95 - 8B 77 04 - mov esi,[rdi+04] + --Level1.exe+3EDBD98 - 48 8B CB - mov rcx,rbx + --Level1.exe+3EDBD9B - E8 50 D4 80 03 - call Level1.exe+76E91F0 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$2,[(allocation)Variables->FOVOut] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 $$1,0 $ctx=1 + jmp %returnaddress% + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_Aspect() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_Aspect() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == true then + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFixEnabled) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Write_Aspect() + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..ebaa4aa Binary files /dev/null and b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..de7ce22 Binary files /dev/null and b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..efd0750 Binary files /dev/null and b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Scripts/IndianaJonesTGC.lua b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Scripts/IndianaJonesTGC.lua new file mode 100644 index 0000000..d33b569 --- /dev/null +++ b/PluginCache/K4sh/Modules/IndianaJonesTGC/Dependencies/Scripts/IndianaJonesTGC.lua @@ -0,0 +1,358 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 90 +fAdditionalWorldFOV = 0 +fAdditionalCinematicsFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fDefaultAspectRatio = 1.77777779 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bWorldFOV = true +bCinematicsFOV = true +bCinematicsFPS = true +bCinematicsFrameGen = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheGreatCircle.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_World_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("WorldFOVSlider","WorldFOVSlider_Changed",55,100,125,35,0,70,0,1) + WorldFOVSlider:SetTickFrequency(10) + DefaultControls.AddHeader("Header_Cinematics_FOV","Cinematics FOV fine adjustment",15,160,210,17) + DefaultControls.AddFixedFOVSlider("CinematicsFOVSlider","CinematicsFOVSlider_Changed",55,190,125,35,0,70,0,1) + CinematicsFOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKWORLDFOVFix_Enable","World FOV fix","CKWorldFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCINEMATICSFOVFix_Enable","Cinematics FOV fix","CKCinematicsFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Cinematics depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKCINEMATICSFPSFix_Enable","Cinematics frametime fix","CKCINEMATICSFPSFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKCINEMATICSFRAMEGENFix_Enable","Cinematics frame generation fix","CKCINEMATICSFRAMEGENFix_Changed",255,181,220,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("WORLDFOV") + + if HackTool:SignatureScan("F3 44 ?? ?? ?? ?? 48 8B ?? ?? ?? 4C ?? ?? 49 0F ?? ?? ?? ?? ?? ?? 4C 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheGreatCircle.exe+18E7184 - 0F 84 5E 0A 00 00 - je TheGreatCircle.exe+18E7BE8 + --TheGreatCircle.exe+18E718A - 48 8B 05 FF 22 46 02 - mov rax,[TheGreatCircle.exe+3D49490] + --TheGreatCircle.exe+18E7191 - F3 44 0F 10 58 0C - movss xmm11,[rax+0C] + --TheGreatCircle.exe+18E7197 - 48 8B 44 24 68 - mov rax,[rsp+68] + --TheGreatCircle.exe+18E719C - 4C 8B 00 - mov r8,[rax] + end + + local tAddress = HackTool:AddAddress("CINEMATICSFOV") + + if HackTool:SignatureScan("F3 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? E8 ?? ?? ?? ?? F3 0F ?? ?? E8",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheGreatCircle.exe+1E210AA - 74 08 - je TheGreatCircle.exe+1E210B4 + --TheGreatCircle.exe+1E210AC - F3 0F 59 1D 0C AC AB 01 - mulss xmm3,[TheGreatCircle.exe+38DBCC0] + --TheGreatCircle.exe+1E210B4 - F3 0F 11 18 - movss [rax],xmm3 + --TheGreatCircle.exe+1E210B8 - F3 0F 59 1D 04 A5 AB 01 - mulss xmm3,[TheGreatCircle.exe+38DB5C4] + --TheGreatCircle.exe+1E210C0 - 0F 28 C3 - movaps xmm0,xmm3 + end + + local tAddress = HackTool:AddAddress("DOFS") + + if HackTool:SignatureScan("75 ?? 48 8B ?? ?? 80 B8 ?? ?? ?? ?? ?? 75 ?? 83 ?? ?? 75 ?? EB ?? C7 87",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + local DOF_1 = HackTool:AddAddress("DOF_1", tAddress) + local DOF_2 = HackTool:AddAddress("DOF_2", tAddress) + DOF_2:OffsetAddress(0x0D) + + print( DOF_1:GetInfo(TYPE_ADDRESS) ) + print( DOF_2:GetInfo(TYPE_ADDRESS) ) + --TheGreatCircle.exe+C800A7 - 80 BF 79 02 00 00 00 - cmp byte ptr [rdi+00000279],00 + --TheGreatCircle.exe+C800AE - 88 87 C5 02 00 00 - mov [rdi+000002C5],al + --TheGreatCircle.exe+C800B4 - 75 14 - jne TheGreatCircle.exe+C800CA <-- here + --TheGreatCircle.exe+C800B6 - 48 8B 47 38 - mov rax,[rdi+38] + --TheGreatCircle.exe+C800BA - 80 B8 93 05 00 00 00 - cmp byte ptr [rax+00000593],00 + --TheGreatCircle.exe+C800C1 - 75 07 - jne TheGreatCircle.exe+C800CA <-- and here + --TheGreatCircle.exe+C800C3 - 83 F9 02 - cmp ecx,02 + --TheGreatCircle.exe+C800C6 - 75 13 - jne TheGreatCircle.exe+C800DB + end + + local tAddress = HackTool:AddAddress("CINEMATICSFPS") + + if HackTool:SignatureScan("75 ?? 48 8B ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? 39 ?? ?? 77",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --TheGreatCircle.exe+184A5BC - 48 8B 41 28 - mov rax,[rcx+28] + --TheGreatCircle.exe+184A5C0 - 48 39 98 08 03 00 00 - cmp [rax+00000308],rbx + --TheGreatCircle.exe+184A5C7 - 75 1C - jne TheGreatCircle.exe+184A5E5 + --TheGreatCircle.exe+184A5C9 - 48 8B 80 00 03 00 00 - mov rax,[rax+00000300] + --TheGreatCircle.exe+184A5D0 - 48 85 C0 - test rax,rax + end + + local tAddress = HackTool:AddAddress("CINEMATICSFRAMEGEN") + + if HackTool:SignatureScan("38 ?? ?? 0F 85 ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? 39 ?? ?? 74 ?? 33",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --TheGreatCircle.exe+D2980A - 38 5F 5A - cmp [rdi+5A],bl + --TheGreatCircle.exe+D2980D - 0F 85 03 03 00 00 - jne TheGreatCircle.exe+D29B16 + --TheGreatCircle.exe+D29813 - 38 5F 5B - cmp [rdi+5B],bl + --TheGreatCircle.exe+D29816 - 0F 85 FA 02 00 00 - jne TheGreatCircle.exe+D29B16 + --TheGreatCircle.exe+D2981C - 48 8B 05 4D F0 61 03 - mov rax,[TheGreatCircle.exe+4348870] + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",50) + Variables:PushFloat("WorldFOVIn") + Variables:PushFloat("WorldFOVOut") + Variables:PushFloat("CinematicsFOVIn") + Variables:PushFloat("CinematicsFOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalWorldFOV") + Variables:PushFloat("AdditionalCinematicsFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["WorldFOVIn"]:WriteFloat(fDefaultFOV) + Variables["WorldFOVOut"]:WriteFloat(fDefaultFOV) + Variables["CinematicsFOVIn"]:WriteFloat(fDefaultFOV) + Variables["CinematicsFOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalWorldFOV"]:WriteFloat(fAdditionalWorldFOV) + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + if fAspectRatio <= 2.34 then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)WORLDFOV,WORLDFOV_cc: + %originalcode% + $$0 [(allocation)Variables->WorldFOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalWorldFOV] $ctx=1 + $$0 [(allocation)Variables->WorldFOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + + (codecave:jmp)CINEMATICSFOV,CINEMATICSFOV_cc: + movss [(allocation)Variables->CinematicsFOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->CinematicsFOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalCinematicsFOV] $ctx=1 + movss [(allocation)Variables->CinematicsFOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)CINEMATICSFPS,CINEMATICSFPS_cc: + nop + nop + %end% + + (codecave)CINEMATICSFRAMEGEN,CINEMATICSFRAMEGEN_cc: + $$0 $$2,$$2 $ctx=1 + nop + %end% + + (codecave)DOF_1,DOF_1_cc: + nop + nop + %end% + + (codecave)DOF_2,DOF_2_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("WORLDFOV_cc",bWorldFOV) + Toggle_CodeCave("CINEMATICSFOV_cc",bCinematicsFOV) + Toggle_CodeCave("CINEMATICSFPS_cc",bCinematicsFPS) + Toggle_CodeCave("CINEMATICSFRAMEGEN_cc",bCinematicsFrameGen) + Toggle_CodeCave("DOF_1_cc",bDOF) + Toggle_CodeCave("DOF_2_cc",bDOF) + end + + Write_World_FOV() + Write_Cinematics_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["WorldFOVIn"] and Variables["AdditionalWorldFOV"] then + local fWorldFOVIn = Variables["WorldFOVIn"]:ReadFloat() + local fWorldFOVOut = Variables["WorldFOVOut"]:ReadFloat() + local fCinematicsFOVIn = Variables["CinematicsFOVIn"]:ReadFloat() + local fCinematicsFOVOut = Variables["CinematicsFOVOut"]:ReadFloat() + local fCompensatedCinematicsFOV = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nWorld FOV In: %.2f, Out : %.2f\r\nCinematics FOV In: %.2f, Compensated: %.2f, Out: %.2f", fWorldFOVIn, fWorldFOVOut, fCinematicsFOVIn, fCompensatedCinematicsFOV, fCinematicsFOVOut)) + end + +end + +function WorldFOVSlider_Changed(Sender) + + fAdditionalWorldFOV = Sender:GetPosition() - 20 + lblWorldFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalWorldFOV) ) + + Write_World_FOV() + ForceUpdate() + +end + +function CinematicsFOVSlider_Changed(Sender) + + fAdditionalCinematicsFOV = Sender:GetPosition() - 20 + lblCinematicsFOVSlider.Caption:SetCaption( string.format("Cinematics FOV: %.0f",fAdditionalCinematicsFOV) ) + + Write_Cinematics_FOV() + ForceUpdate() + +end + +function Write_World_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalWorldFOV"] then + if bWorldFOV == true then + Variables["AdditionalWorldFOV"]:WriteFloat(fAdditionalWorldFOV) + else + Variables["AdditionalWorldFOV"]:WriteFloat(0) + end + end + +end + +function Write_Cinematics_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalCinematicsFOV"] then + if bCinematicsFOV == true then + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + else + Variables["AdditionalCinematicsFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKWorldFOVFix_Changed(Sender) + + bWorldFOV = Toggle_CheckFix(Sender) + Write_World_FOV() + Toggle_CodeCave("WORLDFOV_cc",bWorldFOV) + ForceUpdate() + +end + +function CKCinematicsFOVFix_Changed(Sender) + + bCinematicsFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICSFOV_cc",bCinematicsFOV) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_1_cc",bDOF) + Toggle_CodeCave("DOF_2_cc",bDOF) + ForceUpdate() + +end + +function CKCINEMATICSFPSFix_Changed(Sender) + + bCinematicsFPS = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICSFPS_cc",bCinematicsFPS) + ForceUpdate() + +end + +function CKCINEMATICSFRAMEGENFix_Changed(Sender) + + bCinematicsFrameGen = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICSFRAMEGEN_cc",bCinematicsFrameGen) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Jusant/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Jusant/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..9b894b6 Binary files /dev/null and b/PluginCache/K4sh/Modules/Jusant/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Jusant/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Jusant/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..cb4483f Binary files /dev/null and b/PluginCache/K4sh/Modules/Jusant/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Jusant/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Jusant/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..bf9b112 Binary files /dev/null and b/PluginCache/K4sh/Modules/Jusant/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Jusant/Dependencies/Scripts/Jusant.lua b/PluginCache/K4sh/Modules/Jusant/Dependencies/Scripts/Jusant.lua new file mode 100644 index 0000000..cbec63c --- /dev/null +++ b/PluginCache/K4sh/Modules/Jusant/Dependencies/Scripts/Jusant.lua @@ -0,0 +1,273 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "ASC-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 ?? ?? ?? F2 0F ?? ?? ?? 0F ?? ?? 48 89",tAddress,PAGE_EXECUTE_READ,0x04,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ASC-Win64-Shipping.exe+42E671F - 0F 29 45 F0 - movaps [rbp-10],xmm0 + --ASC-Win64-Shipping.exe+42E6723 - F3 0F 10 07 - movss xmm0,[rdi] + --ASC-Win64-Shipping.exe+42E6727 - F2 0F 11 4D 00 - movsd [rbp+00],xmm1 <<== + --ASC-Win64-Shipping.exe+42E672C - 0F 28 CF - movaps xmm1,xmm7 + --ASC-Win64-Shipping.exe+42E672F - 48 89 74 24 30 - mov [rsp+30],rsi + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ASC-Win64-Shipping.exe+48546C4 - 48 8B 01 - mov rax,[rcx] + --ASC-Win64-Shipping.exe+48546C7 - FF 90 08 07 00 00 - call qword ptr [rax+00000708] + --ASC-Win64-Shipping.exe+48546CD - F3 0F 10 40 30 - movss xmm0,[rax+30] <<== + --ASC-Win64-Shipping.exe+48546D2 - 48 83 C4 28 - add rsp,28 + --ASC-Win64-Shipping.exe+48546D6 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B F9 48 ?? ?? 0F ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x59,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ASC-Win64-Shipping.exe+165AA40 - 8B 42 44 - mov eax,[rdx+44] + --ASC-Win64-Shipping.exe+165AA43 - 89 41 44 - mov [rcx+44],eax + --ASC-Win64-Shipping.exe+165AA46 - 8B 42 48 - mov eax,[rdx+48] + --ASC-Win64-Shipping.exe+165AA49 - 89 41 48 - mov [rcx+48],eax + --ASC-Win64-Shipping.exe+165AA4C - 8B 49 4C - mov ecx,[rcx+4C] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("0F 8F ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? 48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0d,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ASC-Win64-Shipping.exe+30FBD84 - 48 8B 05 9D DE 2A 05 - mov rax,[ASC-Win64-Shipping.exe+83A9C28] + --ASC-Win64-Shipping.exe+30FBD8B - 48 8B CB - mov rcx,rbx + --ASC-Win64-Shipping.exe+30FBD8E - 8B 78 04 - mov edi,[rax+04] + --ASC-Win64-Shipping.exe+30FBD91 - E8 DA 7A 80 01 - call ASC-Win64-Shipping.exe+4903870 + --ASC-Win64-Shipping.exe+30FBD96 - 48 63 C8 - movsxd rcx,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + fld dword ptr [rdi] + fst dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + jmp %returnaddress% + %end% + + (codecave:jmp)FOV2,FOV2_cc: + $$0 $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + fld dword ptr [rdx+0x48] + fstp dword ptr [(allocation)Variables->AspectRatio] + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + $$0 $$1,$$2 $ctx=1 + $$0 edi,0 $ctx=1 + jmp %returnaddress% + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("FOV2_cc",bFixEnabled) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("FOV2_cc",bFixEnabled) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + + if bAspect == false then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + end + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Kena/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Kena/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..5f2c553 Binary files /dev/null and b/PluginCache/K4sh/Modules/Kena/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Kena/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Kena/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..28e1bf4 Binary files /dev/null and b/PluginCache/K4sh/Modules/Kena/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Kena/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Kena/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..4d3747a Binary files /dev/null and b/PluginCache/K4sh/Modules/Kena/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Kena/Dependencies/Scripts/Kena.lua b/PluginCache/K4sh/Modules/Kena/Dependencies/Scripts/Kena.lua new file mode 100644 index 0000000..f809113 --- /dev/null +++ b/PluginCache/K4sh/Modules/Kena/Dependencies/Scripts/Kena.lua @@ -0,0 +1,190 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Kena-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Kena-Win64-Shipping.exe+3300AE9 - E8 32 DA 33 FE - call Kena-Win64-Shipping.exe+163E520 + --Kena-Win64-Shipping.exe+3300AEE - 90 - nop + --Kena-Win64-Shipping.exe+3300AEF - 0F 28 C6 - movaps xmm0,xmm6 <<== + --Kena-Win64-Shipping.exe+3300AF2 - 48 8B 8C 24 20 06 00 00 - mov rcx,[rsp+00000620] + --Kena-Win64-Shipping.exe+3300AFA - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Kena-Win64-Shipping.exe+1EE2228 - 7F 6A - jg Kena-Win64-Shipping.exe+1EE2294 + --Kena-Win64-Shipping.exe+1EE222A - 48 8B 05 C7 C1 14 04 - mov rax,[Kena-Win64-Shipping.exe+602E3F8] + --Kena-Win64-Shipping.exe+1EE2231 - 8B 78 04 - mov edi,[rax+04] <<== + --Kena-Win64-Shipping.exe+1EE2234 - 48 8B CB - mov rcx,rbx + --Kena-Win64-Shipping.exe+1EE2237 - E8 24 A8 4A 01 - call Kena-Win64-Shipping.exe+338CA60 + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 $$1,0 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, FOV Out : %.2f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + if bFOV == true then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/LOTF/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/LOTF/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..94510d0 Binary files /dev/null and b/PluginCache/K4sh/Modules/LOTF/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/LOTF/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/LOTF/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..a97d053 Binary files /dev/null and b/PluginCache/K4sh/Modules/LOTF/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/LOTF/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/LOTF/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..89ddcbf Binary files /dev/null and b/PluginCache/K4sh/Modules/LOTF/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/LOTF/Dependencies/Scripts/LOTF.lua b/PluginCache/K4sh/Modules/LOTF/Dependencies/Scripts/LOTF.lua new file mode 100644 index 0000000..176efc6 --- /dev/null +++ b/PluginCache/K4sh/Modules/LOTF/Dependencies/Scripts/LOTF.lua @@ -0,0 +1,262 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalOtherFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.778 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "LOTF2-Win64-Shipping.exe" +-- LOTF2-Win64-Shipping.exe + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field disable","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 48 ?? ?? 48 ?? ?? 4C ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LOTF2-Win64-Shipping.exe+4B08609 - 48 8B 01 - mov rax,[rcx] + --LOTF2-Win64-Shipping.exe+4B0860C - FF 90 88 07 00 00 - call qword ptr [rax+00000788] + --LOTF2-Win64-Shipping.exe+4B08612 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --LOTF2-Win64-Shipping.exe+4B08617 - 48 8B 0E - mov rcx,[rsi] + --LOTF2-Win64-Shipping.exe+4B0861A - 48 8B 01 - mov rax,[rcx] + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 0F ?? ?? 8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6",tAddress,PAGE_EXECUTE_READ,0x08,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LOTF2-Win64-Shipping.exe+479DC54 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --LOTF2-Win64-Shipping.exe+479DC59 - 0F 57 C0 - xorps xmm0,xmm0 + --LOTF2-Win64-Shipping.exe+479DC5C - 8B 83 C0 02 00 00 - mov eax,[rbx+000002C0] + --LOTF2-Win64-Shipping.exe+479DC62 - 89 47 48 - mov [rdi+48],eax + --LOTF2-Win64-Shipping.exe+479DC65 - 0F B6 8B C4 02 00 00 - movzx ecx,byte ptr [rbx+000002C4] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("48 8B ?? 8B ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 ?? ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LOTF2-Win64-Shipping.exe+35D0204 - 48 8B 05 CD 9E 09 05 - mov rax,[LOTF2-Win64-Shipping.exe+866A0D8] + --LOTF2-Win64-Shipping.exe+35D020B - 48 8B CB - mov rcx,rbx + --LOTF2-Win64-Shipping.exe+35D020E - 8B 78 04 - mov edi,[rax+04] + --LOTF2-Win64-Shipping.exe+35D0211 - E8 8A 14 7E 01 - call LOTF2-Win64-Shipping.exe+4DB16A0 + --LOTF2-Win64-Shipping.exe+35D0216 - 48 63 C8 - movsxd rcx,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + fld dword ptr [$$2] $ctx=1 + fstp dword ptr[(allocation)Variables->AspectRatio] + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_AR() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV : %.2f, FOV Out : %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AR() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect ~= true then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Write_AR() + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..4c75d28 Binary files /dev/null and b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..eea0007 Binary files /dev/null and b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a285580 Binary files /dev/null and b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Scripts/LiesOfP.lua b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Scripts/LiesOfP.lua new file mode 100644 index 0000000..304ba78 --- /dev/null +++ b/PluginCache/K4sh/Modules/LiesOfP/Dependencies/Scripts/LiesOfP.lua @@ -0,0 +1,194 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "LOP-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field disable","CKDOFFix_Changed",255,121,180,14) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("90") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E8 ?? ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81",tAddress,PAGE_EXECUTE_READ,0x06,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LOP-Win64-Shipping.exe+3E97FDF - E8 5C AD EF FD - call LOP-Win64-Shipping.exe+1D92D40 + --LOP-Win64-Shipping.exe+3E97FE4 - 90 - nop + --LOP-Win64-Shipping.exe+3E97FE5 - 0F 28 C6 - movaps xmm0,xmm6 + --LOP-Win64-Shipping.exe+3E97FE8 - 48 8B 8C 24 70 06 00 00 - mov rcx,[rsp+00000670] + --LOP-Win64-Shipping.exe+3E97FF0 - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("7E ?? 0F 2F ?? ?? ?? ?? ?? 73 ?? 0F 2F ?? ?? ?? ?? ?? C6",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LOP-Win64-Shipping.exe+29754B4 - 48 8B 05 9D 89 9B 04 - mov rax,[LOP-Win64-Shipping.exe+732DE58] + --LOP-Win64-Shipping.exe+29754BB - 39 78 04 - cmp [rax+04],edi + --LOP-Win64-Shipping.exe+29754BE - 7E 17 - jle LOP-Win64-Shipping.exe+29754D7 + --LOP-Win64-Shipping.exe+29754C0 - 0F 2F B6 78 11 00 00 - comiss xmm6,[rsi+00001178] + --LOP-Win64-Shipping.exe+29754C7 - 73 0E - jae LOP-Win64-Shipping.exe+29754D7 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/LittleHope/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..773635e Binary files /dev/null and b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/LittleHope/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..5f1f7fe Binary files /dev/null and b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/LittleHope/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..d6e37f6 Binary files /dev/null and b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/LittleHope/Dependencies/Scripts/LittleHope.lua b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Scripts/LittleHope.lua new file mode 100644 index 0000000..b9b77a3 --- /dev/null +++ b/PluginCache/K4sh/Modules/LittleHope/Dependencies/Scripts/LittleHope.lua @@ -0,0 +1,220 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bAspect = true +bFOV = true + +--GAME VARS +fDefaultFOV = 0 +fAspectRatio = 0 +fAdditionalFOV = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Little Hope " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("+0") + FOVSlider:SetLabel2Text("+70") + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Aspect Ratio fix","CKARatioFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E8 ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? EB ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + --if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B ?? ?? ?? ?? ?? 89",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LittleHope-Win64-Shipping.exe+375FE3F - F3 0F5E C1 - divss xmm0,xmm1 + --LittleHope-Win64-Shipping.exe+375FE43 - E8 ED0E6B01 - call LittleHope-Win64-Shipping.exe+4E10D35 + --LittleHope-Win64-Shipping.exe+375FE48 - F3 0F59 05 90EE7802 - mulss xmm0,[LittleHope-Win64-Shipping.exe+5EEECE0] + --LittleHope-Win64-Shipping.exe+375FE50 - EB 03 - jmp LittleHope-Win64-Shipping.exe+375FE55 + --LittleHope-Win64-Shipping.exe+375FE52 - 0F57 C0 - xorps xmm0,xmm0 + end + + local tAddress = HackTool:AddAddress("AspectFix1") + + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F 11 ?? ?? ?? ?? ?? F3 0F 11 ?? ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0E,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LittleHope-Win64-Shipping.exe+375FE6A - F3 0F10 83 3C080000 - movss xmm0,[rbx+0000083C] + --LittleHope-Win64-Shipping.exe+375FE72 - F3 0F5E C1 - divss xmm0,xmm1 + --LittleHope-Win64-Shipping.exe+375FE76 - F3 0F11 83 44080000 - movss [rbx+00000844],xmm0 + --LittleHope-Win64-Shipping.exe+375FE7E - F3 0F11 83 18020000 - movss [rbx+00000218],xmm0 + --LittleHope-Win64-Shipping.exe+375FE86 - 0F28 74 24 20 - movaps xmm6,[rsp+20] + end + + local tAddress = HackTool:AddAddress("AspectFix2") + + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F ?? ?? E8 ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --LittleHope-Win64-Shipping.exe+375FE29 - F3 0F11 83 64080000 - movss [rbx+00000864],xmm0 + --LittleHope-Win64-Shipping.exe+375FE31 - 76 1F - jna LittleHope-Win64-Shipping.exe+375FE52 + --LittleHope-Win64-Shipping.exe+375FE33 - F3 0F10 83 3C080000 - movss xmm0,[rbx+0000083C] + --LittleHope-Win64-Shipping.exe+375FE3B - F3 0F58 C9 - addss xmm1,xmm1 + --LittleHope-Win64-Shipping.exe+375FE3F - F3 0F5E C1 - divss xmm0,xmm1 + end + + return true +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] and bFOV then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("AspectRatio") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + push rax + movd eax,xmm1 + cmp eax,0x27BF1AA7 ; will not affect main menu + je exit + + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + + exit: + pop rax + jmp %returnaddress% + %end% + + (codecave:jmp)AspectFix1,AspectFix1_cc: + movss $$2,[(allocation)Variables->AspectRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ; following code will compensate widers aspect ratios for FOV + (codecave:jmp)AspectFix2,AspectFix2_cc: + movss xmm15,[$$2+4] $ctx=1 + mulss xmm15,[(allocation)Variables->AspectRatio] + movss $$1,xmm15 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("AspectFix1_cc",bAspect) + Toggle_CodeCave("AspectFix2_cc",bAspect) + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("AspectFix1_cc",bAspect) + Toggle_CodeCave("AspectFix2_cc",bAspect) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("%.0f",fAdditionalFOV) ) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function ResolutionChanged() + + local fAspectRatio = DisplayInfo:GetAspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + +end + +function Disable_Inject() + CleanUp() +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/LostRecords/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..c2d81d9 Binary files /dev/null and b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/LostRecords/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..626ef6f Binary files /dev/null and b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/LostRecords/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..8ea517b Binary files /dev/null and b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/LostRecords/Dependencies/Scripts/LostRecords.lua b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Scripts/LostRecords.lua new file mode 100644 index 0000000..5bb1874 --- /dev/null +++ b/PluginCache/K4sh/Modules/LostRecords/Dependencies/Scripts/LostRecords.lua @@ -0,0 +1,363 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 80 +fAdditionalFOV = 0 +fAdditionalCinematicsFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fGameAspect = fAspectRatio +fAspectRatio169 = 1.777778 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Bloom&Rage.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 8B ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bloom&Rage.exe+4ED9CB4 - 48 8B 01 - mov rax,[rcx] + --Bloom&Rage.exe+4ED9CB7 - FF 90 30 07 00 00 - call qword ptr [rax+00000730] + --Bloom&Rage.exe+4ED9CBD - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Bloom&Rage.exe+4ED9CC2 - 48 83 C4 28 - add rsp,28 + --Bloom&Rage.exe+4ED9CC6 - C3 - ret + end + + local tAddress = HackTool:AddAddress("CINEMATICSFOV") + + --if HackTool:SignatureScan("F3 0F ?? ?? ?? 0F ?? ?? 8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? 76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? EB",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bloom&Rage.exe+495D6C4 - EB 08 - jmp Bloom&Rage.exe+495D6CE + --Bloom&Rage.exe+495D6C6 - F3 0F 10 83 A8 02 00 00 - movss xmm0,[rbx+000002A8] + --Bloom&Rage.exe+495D6CE - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --Bloom&Rage.exe+495D6D3 - 0F 57 C0 - xorps xmm0,xmm0 + --Bloom&Rage.exe+495D6D6 - 8B 83 B8 02 00 00 - mov eax,[rbx+000002B8] + end + + local tAddress = HackTool:AddAddress("ASPECT_1") + + --if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? 0F 54 ?? ?? ?? ?? ?? 0F 2F ?? ?? ?? ?? ?? 76 ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("E9 ?? ?? ?? ?? 41 ?? ?? ?? 41 ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 44 0F 29",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + local Aspect_2 = HackTool:AddAddress("ASPECT_2", tAddress) + Aspect_2:OffsetAddress(0x3F) + --Bloom&Rage.exe+494BC30 - 0F 5B C9 - cvtdq2ps xmm1,xmm1 + --Bloom&Rage.exe+494BC33 - 66 0F 6E C0 - movd xmm0,eax + --Bloom&Rage.exe+494BC37 - 0F 5B C0 - cvtdq2ps xmm0,xmm0 + --Bloom&Rage.exe+494BC3A - F3 0F 5E C8 - divss xmm1,xmm0 + --Bloom&Rage.exe+494BC3E - 0F 2F CA - comiss xmm1,xmm2 + --Bloom&Rage.exe+494BC41 - 72 0B - jb Bloom&Rage.exe+494BC4E + --Bloom&Rage.exe+494BC43 - 0F 28 D1 - movaps xmm2,xmm1 + --Bloom&Rage.exe+494BC46 - F3 0F 5D 15 4A BA A7 01 - minss xmm2,[Bloom&Rage.exe+63C7698] + --Bloom&Rage.exe+494BC4E - F3 0F 5C CA - subss xmm1,xmm2 + --Bloom&Rage.exe+494BC52 - 0F 54 0D 77 EA 79 01 - andps xmm1,[Bloom&Rage.exe+60EA6D0] + --Bloom&Rage.exe+494BC59 - 0F 2F 0D C0 E9 79 01 - comiss xmm1,[Bloom&Rage.exe+60EA620] + --Bloom&Rage.exe+494BC60 - 76 35 - jna Bloom&Rage.exe+494BC97 + --Bloom&Rage.exe+494BC62 - 48 8D 54 24 20 - lea rdx,[rsp+20] + --Bloom&Rage.exe+494BC67 - 49 8B C8 - mov rcx,r8 + --Bloom&Rage.exe+494BC6A - E8 B1 B3 7E 00 - call Bloom&Rage.exe+5137020 + end + + local tResultCount = HackTool:SignatureScanMulti("F2 0F ?? ?? ?? 8B ?? ?? 89 ?? ?? 41 8B ?? ?? 89 ?? ?? 41 8B","ASPECTS",PAGE_EXECUTE_READ,0x32,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find ASPECTS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + local tAddress = HackTool:AddAddress("CINEMATICSASPECT", HackTool:GetAddress( string.format("ASPECTS%d",2) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bloom&Rage.exe+4CFFAB7 - 89 47 44 - mov [rdi+44],eax + --Bloom&Rage.exe+4CFFABA - 41 8B 46 48 - mov eax,[r14+48] + --Bloom&Rage.exe+4CFFABE - 89 47 48 - mov [rdi+48],eax + --Bloom&Rage.exe+4CFFAC1 - 41 33 4E 4C - xor ecx,[r14+4C] + --Bloom&Rage.exe+4CFFAC5 - 83 E1 01 - and ecx,01 + end + + local tAddress = HackTool:AddAddress("DOF") -- r.DepthOfFieldQuality + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bloom&Rage.exe+368A723 - 75 05 - jne Bloom&Rage.exe+368A72A + --Bloom&Rage.exe+368A725 - BF 04 00 00 00 - mov edi,00000004 + --Bloom&Rage.exe+368A72A - 8B 3C 37 - mov edi,[rdi+rsi] + --Bloom&Rage.exe+368A72D - 48 8B CB - mov rcx,rbx + --Bloom&Rage.exe+368A730 - E8 FB 1E 93 01 - call Bloom&Rage.exe+4FBC630 + end + + local tAddress = HackTool:AddAddress("FRINGE") -- r.SceneColorFringeQuality + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05 ?? ?? ?? ?? 0F 8F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bloom&Rage.exe+4FB8D45 - 48 8B 05 4C 24 B8 03 - mov rax,[Bloom&Rage.exe+8B3B198] + --Bloom&Rage.exe+4FB8D4C - 39 30 - cmp [rax],esi + --Bloom&Rage.exe+4FB8D4E - 7F 06 - jg Bloom&Rage.exe+4FB8D56 + --Bloom&Rage.exe+4FB8D50 - 89 B3 EC 1D 00 00 - mov [rbx+00001DEC],esi + --Bloom&Rage.exe+4FB8D56 - 8B 04 2F - mov eax,[rdi+rbp] + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables", 0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CINEMATICSFOVIn") + Variables:PushFloat("CINEMATICSFOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("GameAspect") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["GameAspect"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword ptr [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)CINEMATICSASPECT,CINEMATICSASPECT_cc: + cmp eax,0x3FAAAAA8 + je next + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + next: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT_1,ASPECT_1_cc: + fld dword ptr [defaultaspect] + fstp dword ptr [(allocation)Variables->GameAspect] ; Only injected to set general aspect ratio 1.777778 + %originalcode% + %end% + + defaultaspect: (float)1.777778 + + (codecave:jmp)ASPECT_2,ASPECT_2_cc: + movss $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + movss [(allocation)Variables->GameAspect],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_1_cc",bAspect) + Toggle_CodeCave("ASPECT_2_cc",bAspect) + Toggle_CodeCave("CINEMATICSASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated: %.2f, Out: %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + + if Variables and Variables["GameAspect"] then + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local gameAspect = Variables["GameAspect"]:ReadFloat() + local AspectDevisional = CurrentAspectRatio / gameAspect + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + local Variables = HackTool:GetAllocation("Variables") + Toggle_CodeCave("ASPECT_1_cc",bAspect) + Toggle_CodeCave("ASPECT_2_cc",bAspect) + Toggle_CodeCave("CINEMATICSASPECT_cc",bAspect) + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["ASPECTCHECKED"]:WriteByte(0) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function Disable_Inject() + + CleanUp() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..0a83fc3 Binary files /dev/null and b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..7e0b278 Binary files /dev/null and b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a5d35ea Binary files /dev/null and b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Scripts/MaidOfSker.lua b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Scripts/MaidOfSker.lua new file mode 100644 index 0000000..466dcca --- /dev/null +++ b/PluginCache/K4sh/Modules/MaidOfSker/Dependencies/Scripts/MaidOfSker.lua @@ -0,0 +1,167 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Maid of Sker.exe" +Process_EngineDLL = "GameAssembly.dll" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("90") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 45 ?? ?? 0F 85 ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? 33",tAddress,PAGE_EXECUTE_READ,0x0,Process_EngineDLL) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --GameAssembly.dll+B33967 - 48 85 F6 - test rsi,rsi + --GameAssembly.dll+B3396A - 0F 84 18 02 00 00 - je GameAssembly.dll+B33B88 + --GameAssembly.dll+B33970 - F3 0F 11 46 4C - movss [rsi+4C],xmm0 + --GameAssembly.dll+B33975 - 45 84 ED - test r13b,r13b + --GameAssembly.dll+B33978 - 0F 85 DF 01 00 00 - jne GameAssembly.dll+B33B5D + end + + return true +end + +function Enable_Inject() + + local DLLAddr = HackTool:GetModuleAddress(Process_EngineDLL) + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + + Variables:Allocate(DLLAddr) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",DLLAddr) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..22ba1d0 Binary files /dev/null and b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..e789bd4 Binary files /dev/null and b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Images/background.jpg b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Images/background.jpg new file mode 100644 index 0000000..5ea99ea Binary files /dev/null and b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Images/background.jpg differ diff --git a/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Scripts/ManOfMedan.lua b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Scripts/ManOfMedan.lua new file mode 100644 index 0000000..13ea32b --- /dev/null +++ b/PluginCache/K4sh/Modules/ManofMedan/Dependencies/Scripts/ManOfMedan.lua @@ -0,0 +1,215 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bAspect = true +bFOV = true + +--GAME VARS +fDefaultFOV = 0 +fAspectRatio = 0 +fAdditionalFOV = 0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Man of Medan " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("+0") + FOVSlider:SetLabel2Text("+70") + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Aspect Ratio fix","CKARatioFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E8 ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? EB ?? 0F",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ManOfMedan-Win64-Shipping.exe+22059DD: 33 C9 - xor ecx,ecx + --ManOfMedan-Win64-Shipping.exe+22059DF: 89 4C 24 20 - mov [rsp+20],ecx + --ManOfMedan-Win64-Shipping.exe+22059E3: F3 41 0F 10 B0 8C 03 00 00 - movss xmm6,[r8+0000038C] + --ManOfMedan-Win64-Shipping.exe+22059EC: 0F 57 C0 - xorps xmm0,xmm0 + --ManOfMedan-Win64-Shipping.exe+22059EF: 0F 2F F0 - comiss xmm6,xmm0 + end + + local tAddress = HackTool:AddAddress("AspectFix1") + + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F 11 ?? ?? ?? ?? ?? F3 0F 11 ?? ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0E,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ManOfMedan-Win64-Shipping.exe+1CBBBCC: F3 0F 10 83 90 08 00 00 - movss xmm0,[rbx+00000890] + --ManOfMedan-Win64-Shipping.exe+1CBBBD4: F3 0F 5E C1 - divss xmm0,xmm1 + --ManOfMedan-Win64-Shipping.exe+1CBBBD8: F3 0F 11 83 98 08 00 00 - movss [rbx+00000898],xmm0 + --ManOfMedan-Win64-Shipping.exe+1CBBBE0: F3 0F 11 83 68 02 00 00 - movss [rbx+00000268],xmm0 + --ManOfMedan-Win64-Shipping.exe+1CBBBE8: 0F 28 74 24 20 - movaps xmm6,[rsp+20] + end + + local tAddress = HackTool:AddAddress("AspectFix2") + + if HackTool:SignatureScan("76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F 59 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? F3 0F 59 ?? ?? ?? ?? ?? EB",tAddress,PAGE_EXECUTE_READ,0x0E,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ManOfMedan-Win64-Shipping.exe+1CBBB91: F3 0F 10 05 2F 93 43 02 - movss xmm0,[ManOfMedan-Win64-Shipping.exe+40F4EC8] + --ManOfMedan-Win64-Shipping.exe+1CBBB99: F3 0F 5E C1 - divss xmm0,xmm1 + --ManOfMedan-Win64-Shipping.exe+1CBBB9D: F3 0F 59 83 90 08 00 00 - mulss xmm0,[rbx+00000890] + --ManOfMedan-Win64-Shipping.exe+1CBBBA5: E8 6B E8 30 01 - call ManOfMedan-Win64-Shipping.exe+2FCA415 + --ManOfMedan-Win64-Shipping.exe+1CBBBAA: F3 0F 59 05 E2 9A 43 02 - mulss xmm0,[ManOfMedan-Win64-Shipping.exe+40F5694] + end + + return true +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] and bFOV then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("AspectRatio") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + ;cmp r15,8 ; will only affect in game FOV + ;jne exit + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + ;exit: + jmp %returnaddress% + %end% + + (codecave:jmp)AspectFix1,AspectFix1_cc: + movss $$2,[(allocation)Variables->AspectRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ; following code will compensate widers aspect ratios for FOV + (codecave:jmp)AspectFix2,AspectFix2_cc: + movss xmm15,[$$2+4] $ctx=1 + mulss xmm15,[(allocation)Variables->AspectRatio] + movss $$1,xmm15 $ctx=1 + ;mulss $$1,xmm15 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("AspectFix1_cc",bAspect) + Toggle_CodeCave("AspectFix2_cc",bAspect) + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("AspectFix1_cc",bAspect) + Toggle_CodeCave("AspectFix2_cc",bAspect) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("%.0f",fAdditionalFOV) ) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function ResolutionChanged() + + local fAspectRatio = DisplayInfo:GetAspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + +end + +function Disable_Inject() + CleanUp() +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..1d9e429 Binary files /dev/null and b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..8278fab Binary files /dev/null and b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..c70ddfa Binary files /dev/null and b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Scripts/MassEffectAndromedaTM.lua b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Scripts/MassEffectAndromedaTM.lua new file mode 100644 index 0000000..4949c3b --- /dev/null +++ b/PluginCache/K4sh/Modules/MassEffectAndromedaTM/Dependencies/Scripts/MassEffectAndromedaTM.lua @@ -0,0 +1,287 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalHUDWidth = 1 +fAdditionalHUDHeight = 1 + +--ControlVars +bFixEnabled = true +bHUDSafeZone = true +bArFix = true +bArFix2 = true +bArFix3 = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "MassEffectAndromeda.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 200 +WriteInterval = 5000 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Manual", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FOV","HUD safe zone adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("HUDWidthSlider","HUD_Width_SafeZone_Changed",55,100,125,35) + DefaultControls.AddFOVSlider("HUDHeightSlider","HUD_Height_SafeZone_Changed",55,160,125,35) + DefaultControls.AddHeader("Ind_fixes","Individual fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKARatio","Aspect ratio","CKARatio_Changed",250,95,180,14) + DefaultControls.AddFixToggle("CKHUD","HUD safe zones","CKHUD_Changed",250,115,180,14) +end + +function Configure_SignatureScan() + local tAddress = HackTool:AddAddress("HUDHeightFix") + if HackTool:SignatureScan("488B88A08700000F28DC",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS)) + end + + local tAddress = HackTool:AddAddress("HUDWidthFix") + if HackTool:SignatureScan("488B88A087000048894D67",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS)) + end + + local tAddress = HackTool:AddAddress("ArFix") + if HackTool:SignatureScan("0F2FB0????????0F92",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS)) + end + + local tAddress = HackTool:AddAddress("ArFix2") + if HackTool:SignatureScan("C780DC00000000000000E86C",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS)) + end + + local tAddress = HackTool:AddAddress("ArFix3") + if HackTool:SignatureScan("C780DC000000398EE33F",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS)) + end + + + return true +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("HUDRender_Width") + Variables:PushFloat("HUDRender_Height") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("AspectRatioZero") + Variables:PushFloat("GameWidth") + Variables:PushFloat("GameHeight") + Variables:PushFloat("AspectRatioPointer") + Variables:Allocate() + + ResolutionChanged() + + local asm = [[ + (codecave:jmp)HUDWidthFix,HUDWidthFix_cc: + mov rcx,[(allocation)Variables->HUDRender_Width] + jmp %returnaddress% + %end% + + ; MassEffectAndromeda.exe+11EE59A: 45 85 FF - test r15d,r15d + ; MassEffectAndromeda.exe+11EE59D: 74 3C - je MassEffectAndromeda.exe+11EE5DB + ; MassEffectAndromeda.exe+11EE59F: 48 8B 05 A2 82 0E 03 - mov rax,[MassEffectAndromeda.exe+42D6848] + ; ---------- INJECTING HERE ---------- + ; MassEffectAndromeda.exe+11EE5A6: 48 8B 88 A0 87 00 00 - mov rcx,[rax+000087A0] + ; ---------- DONE INJECTING ---------- + ; MassEffectAndromeda.exe+11EE5AD: 48 89 4D 67 - mov [rbp+67],rcx + ; MassEffectAndromeda.exe+11EE5B1: F3 0F 10 35 07 FC E7 01 - movss xmm6,[MassEffectAndromeda.exe+306E1C0] + ; MassEffectAndromeda.exe+11EE5B9: F3 0F 5C 75 67 - subss xmm6,[rbp+67] + + (codecave:jmp)HUDHeightFix,HUDHeightFix_cc: + mov rcx,[(allocation)Variables->HUDRender_Width] + movss [(allocation)Variables->GameWidth],xmm4 + movss [(allocation)Variables->GameHeight],xmm0 + jmp %returnaddress% + %end% + + ; MassEffectAndromeda.exe+A824F8: F3 0F 10 35 C0 BC 5E 02 - movss xmm6,[MassEffectAndromeda.exe+306E1C0] + ; MassEffectAndromeda.exe+A82500: 48 8B 05 41 43 85 03 - mov rax,[MassEffectAndromeda.exe+42D6848] + ; MassEffectAndromeda.exe+A82507: 48 8B 3D 62 81 86 03 - mov rdi,[MassEffectAndromeda.exe+42EA670] + ; ---------- INJECTING HERE ---------- + ; MassEffectAndromeda.exe+A8250E: 48 8B 88 A0 87 00 00 - mov rcx,[rax+000087A0] + ; ---------- DONE INJECTING ---------- + ; MassEffectAndromeda.exe+A82515: 0F 28 DC - movaps xmm3,xmm4 + ; MassEffectAndromeda.exe+A82518: 0F 28 D0 - movaps xmm2,xmm0 + ; MassEffectAndromeda.exe+A8251B: 44 0F 28 CE - movaps xmm9,xmm6 + + (codecave:jmp)ArFix,ArFix_cc: + push rbx + mov rbx,[(allocation)Variables->AspectRatioZero] + cmp [(allocation)Variables->AspectRatioPointer],rbx + jne ARFix + mov [(allocation)Variables->AspectRatioPointer],rax + + ARFix: + sub esp, 16 ; allocate space on stack + movdqu dqword [esp], xmm0 ; push xmm0 + sub esp, 16 ; allocate space on stack + movdqu dqword [esp], xmm1 ; push xmm1 + movss xmm0,[(allocation)Variables->GameWidth] + movss xmm1,[(allocation)Variables->GameHeight] + divss xmm0,xmm1 ; calculate aspect ratio based on game window resolution + movss [(allocation)Variables->AspectRatio],xmm0 + movdqu xmm1, dqword [esp] ; pop xmm1 + add esp, 16 ; re-align stack + movdqu xmm0, dqword [esp] ; pop xmm0 + add esp, 16 ; re-align stack + mov rbx,[(allocation)Variables->AspectRatio] + mov [rax+0x000000DC],rbx + pop rbx + comiss xmm6,[rax+0x000000DC] + jmp %returnaddress% + %end% + + ; MassEffectAndromeda.exe+F28B5E: 48 89 05 2B B9 4D 03 - mov [MassEffectAndromeda.exe+4404490],rax + ; MassEffectAndromeda.exe+F28B65: 48 85 C0 - test rax,rax + ; MassEffectAndromeda.exe+F28B68: 74 1F - je MassEffectAndromeda.exe+F28B89 + ; ---------- INJECTING HERE ---------- + ;MassEffectAndromeda.exe+F28B6A: 0F 2F B0 DC 00 00 00 - comiss xmm6,[rax+000000DC] + ; ---------- DONE INJECTING ---------- + ; MassEffectAndromeda.exe+F28B71: 0F 92 C1 - setb cl + ; MassEffectAndromeda.exe+F28B74: 3A 8B 56 F8 01 00 - cmp cl,[rbx+0001F856] + ; MassEffectAndromeda.exe+F28B7A: 88 8B 56 F8 01 00 - mov [rbx+0001F856],cl + + (codecave)ArFix2,ArFix2_cc: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + %end% + + ; MassEffectAndromeda.exe+5BBA4F: 48 8B D3 - mov rdx,rbx + ; MassEffectAndromeda.exe+5BBA52: 48 8B CF - mov rcx,rdi + ; ---------- INJECTING HERE ---------- + ; MassEffectAndromeda.exe+5BBA55: C7 80 DC 00 00 00 00 00 00 00 - mov [rax+000000DC],00000000 + ; ---------- DONE INJECTING ---------- + ; MassEffectAndromeda.exe+5BBA5F: E8 6C 52 FF FF - call MassEffectAndromeda.exe+5B0CD0 + ; MassEffectAndromeda.exe+5BBA64: 48 85 C0 - test rax,rax + + (codecave)ArFix3,ArFix3_cc: + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + %end% + + ; MassEffectAndromeda.exe+5BB9B7: 48 8B 0D E2 09 AF 03 - mov rcx,[MassEffectAndromeda.exe+40AC3A0] + ; MassEffectAndromeda.exe+5BB9BE: E8 ED B9 CE FF - call MassEffectAndromeda.ANTITAMPER_TESTVALUE_CODEMARKER+2120 + ; ---------- INJECTING HERE ---------- + ; MassEffectAndromeda.exe+5BB9C3: C7 80 DC 00 00 00 39 8E E3 3F - mov [rax+000000DC],3FE38E39 (16/9 ratio) + ; ---------- DONE INJECTING ---------- + ; MassEffectAndromeda.exe+5BB9CD: 48 8B 0D DC 0C D1 03 - mov rcx,[MassEffectAndromeda.exe+42CC6B0] + ; MassEffectAndromeda.exe+5BB9D4: 48 8B D3 - mov rdx,rbx + + ]] + + if HackTool:CompileAssembly(asm,"HUDWidthFix") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("HUDWidthFix_cc",bHUDSafeZone) + Toggle_CodeCave("HUDHeightFix_cc",bHUDSafeZone) + Toggle_CodeCave("ArFix_cc",bArFix) + Toggle_CodeCave("ArFix2_cc",bArFix2) + Toggle_CodeCave("ArFix3_cc",bArFix3) + end +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + local HUD_Width_Safe_Zone = (fAdditionalHUDWidth + 75) / 100 + local HUD_Height_Safe_Zone = (fAdditionalHUDHeight + 80) / 100 + + if Variables and Variables["HUDRender_Width"] and Variables["HUDRender_Height"] then + Variables["HUDRender_Width"]:WriteFloat( HUD_Width_Safe_Zone ) + Variables["HUDRender_Height"]:WriteFloat( HUD_Height_Safe_Zone ) + end +end + +function Disable_Inject() + CleanUp() +end + +function ResolutionChanged() +end + +function HUDSafeZone() +end + +function HK_IncreaseFOV() + HUDWidthSlider:OffsetPosition(1) +end + +function HK_DecreaseFOV() + HUDWidthSlider:OffsetPosition(-1) +end + +function HUD_Width_SafeZone_Changed(Sender) + fAdditionalHUDWidth = Sender:GetScaledFloat(4) + fAdditionalHUDWidth = Round(fAdditionalHUDWidth,2) + lblHUDWidthSlider.Caption:SetCaption( string.format("HUD width safe zone : %.2f",(fAdditionalHUDWidth + 75))) + + ForceUpdate() +end + +function HUD_Height_SafeZone_Changed(Sender) + fAdditionalHUDHeight = Sender:GetScaledFloat(6) + fAdditionalHUDHeight = Sender:GetScaledFloat(5) + fAdditionalHUDHeight = Round(fAdditionalHUDHeight,2) + lblHUDHeightSlider.Caption:SetCaption( string.format("HUD height safe zone : %.2f",fAdditionalHUDHeight + 80)) + + ForceUpdate() +end + +function CKARatio_Changed(Sender) + local Variables = HackTool:GetAllocation("Variables") + bArFix = Toggle_CheckFix(Sender) + bArFix2 = Toggle_CheckFix(Sender) + bArFix3 = Toggle_CheckFix(Sender) + Toggle_CodeCave("ArFix_cc",bArFix) + Toggle_CodeCave("ArFix2_cc",bArFix2) + Toggle_CodeCave("ArFix3_cc",bArFix3) +end + +function CKHUD_Changed(Sender) + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDWidthFix_cc",bHUDSafeZone) + Toggle_CodeCave("HUDHeightFix_cc",bHUDSafeZone) +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..a986fbf Binary files /dev/null and b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..20b575f Binary files /dev/null and b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..7cdaa85 Binary files /dev/null and b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Scripts/MetroExodus.lua b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Scripts/MetroExodus.lua new file mode 100644 index 0000000..6b46317 --- /dev/null +++ b/PluginCache/K4sh/Modules/MetroExodus/Dependencies/Scripts/MetroExodus.lua @@ -0,0 +1,306 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalCinematicsFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bCinematicsFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "MetroExodus.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddHeader("Header_FOV2","Cutscenes FOV fine adjustment",15,160,210,17) + DefaultControls.AddFixedFOVSlider("CinematicsFOVSlider","CinematicsFOVSlider_Changed",55,190,125,35,0,60,0,1) + CinematicsFOVSlider:SetTickFrequency(5) + CinematicsFOVSlider:SetLabel1Text("-20") + CinematicsFOVSlider:SetLabel2Text("+40") + + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCinematicsFOVFix_Enable","Cutscenes FOV fix","CKCinematicsFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("3C ?? 0F 86 ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x08,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --MetroExodus.exe+55AF38 - 3C 01 - cmp al,01 + --MetroExodus.exe+55AF3A - 0F 86 65 01 00 00 - jbe MetroExodus.exe+55B0A5 + --MetroExodus.exe+55AF40 - F3 0F 10 15 CC FD F9 00 - movss xmm2,[MetroExodus.exe+14FAD14] + --MetroExodus.exe+55AF48 - F3 0F 10 0D 84 9C 0F 01 - movss xmm1,[MetroExodus.exe+1654BD4] + --MetroExodus.exe+55AF50 - F3 0F 59 0D C8 A0 FA 00 - mulss xmm1,[MetroExodus.exe+1505020] + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? E9 96 ?? ?? ?? 48 8B ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --MetroExodus.exe+55B0A3 - 5E - pop rsi + --MetroExodus.exe+55B0A4 - C3 - ret + --MetroExodus.exe+55B0A5 - F3 0F 10 15 B3 61 E7 00 - movss xmm2,[MetroExodus.exe+13D1260] + --MetroExodus.exe+55B0AD - E9 96 FE FF FF - jmp MetroExodus.exe+55AF48 + --MetroExodus.exe+55B0B2 - 48 8B CB - mov rcx,rbx + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 89 84 ?? ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --MetroExodus.exe+5D0EF1 - 4C 8B FA - mov r15,rdx + --MetroExodus.exe+5D0EF4 - 44 8B 2D A1 EF 07 01 - mov r13d,[MetroExodus.exe+164FE9C] + --MetroExodus.exe+5D0EFB - F3 0F 10 35 B9 EF 07 01 - movss xmm6,[MetroExodus.exe+164FEBC] + --MetroExodus.exe+5D0F03 - F3 0F 10 3D B5 EF 07 01 - movss xmm7,[MetroExodus.exe+164FEC0] + --MetroExodus.exe+5D0F0B - 89 84 24 A0 00 00 00 - mov [rsp+000000A0],eax + end + + local tAddress = HackTool:AddAddress("ASPECT2") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? 48 8D ?? ?? ?? ?? ?? F3 48 ?? ?? ?? 49 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --MetroExodus.exe+DB0C9B - F3 0F 10 15 19 F2 89 00 - movss xmm2,[MetroExodus.exe+164FEBC] + --MetroExodus.exe+DB0CA3 - EB 08 - jmp MetroExodus.exe+DB0CAD + --MetroExodus.exe+DB0CA5 - F3 0F 10 15 0B F2 89 00 - movss xmm2,[MetroExodus.exe+164FEB8] + --MetroExodus.exe+DB0CAD - 0F 57 C0 - xorps xmm0,xmm0 + --MetroExodus.exe+DB0CB0 - 48 8D 35 B9 00 53 00 - lea rsi,[MetroExodus.exe+12E0D70] + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CinematicsFOVIn") + Variables:PushFloat("CinematicsFOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalCinematicsFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["CinematicsFOVIn"]:WriteFloat(fDefaultFOV) + Variables["CinematicsFOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)FOV2,FOV2_cc: + %originalcode% + $$0 [(allocation)Variables->CinematicsFOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalCinematicsFOV] $ctx=1 + $$0 [(allocation)Variables->CinematicsFOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT2,ASPECT2_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bCinematicsFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + end + + Write_FOV() + Write_CinematicsFOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fCinematicsFOVIn = Variables["CinematicsFOVIn"]:ReadFloat() + local fCinematicsFOVOut = Variables["CinematicsFOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f\r\nCinematics FOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut, fCinematicsFOVIn, fCinematicsFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function CinematicsFOVSlider_Changed(Sender) + + fAdditionalCinematicsFOV = Sender:GetPosition() - 20 + lblCinematicsFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalCinematicsFOV) ) + + Write_CinematicsFOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_CinematicsFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalCinematicsFOV"] then + if bFOV == true then + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + else + Variables["AdditionalCinematicsFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function CKCinematicsFOVFix_Changed(Sender) + + bCinematicsFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV2_cc",bCinematicsFOV) + Write_CinematicsFOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Mindseye/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..1be9223 Binary files /dev/null and b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Mindseye/Dependencies/Icons/Smallicon.png b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Icons/Smallicon.png new file mode 100644 index 0000000..d9b7d9c Binary files /dev/null and b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Icons/Smallicon.png differ diff --git a/PluginCache/K4sh/Modules/Mindseye/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..1a021c7 Binary files /dev/null and b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Mindseye/Dependencies/Scripts/Mindseye.lua b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Scripts/Mindseye.lua new file mode 100644 index 0000000..d14e05b --- /dev/null +++ b/PluginCache/K4sh/Modules/Mindseye/Dependencies/Scripts/Mindseye.lua @@ -0,0 +1,239 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "MindsEye-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6 8B",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + local Aspect = HackTool:AddAddress("ASPECT", tAddress) + Aspect:OffsetAddress(0x05) + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + if bAspect then + Toggle_CodeCave("FOV_cc",bAspect) + end + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["ASPECTCHECKED"]:WriteByte(0) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio / fAspectRatio169 + + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..d8a6f6d Binary files /dev/null and b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..550c1f7 Binary files /dev/null and b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..5e134b7 Binary files /dev/null and b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Scripts/OutcastANewBeginning.lua b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Scripts/OutcastANewBeginning.lua new file mode 100644 index 0000000..4531257 --- /dev/null +++ b/PluginCache/K4sh/Modules/OutcastANewBeginning/Dependencies/Scripts/OutcastANewBeginning.lua @@ -0,0 +1,382 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bHUDSafeZone = true +bCinematicsFPS = true +bFringe = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "O2-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddHeader("HeaderHUDSZ","HUD safe zone",15,160,210,17) + DefaultControls.AddFixedFOVSlider("HUD","HUDSZSlider_Changed",55,190,125,35,0,40,0,1) + HUD:SetTickFrequency(5) + HUD:SetLabel1Text("0") + HUD:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Cinematics aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFPSFix_Enable","Cinematics FPS fix","CKCINEMATICSFPSFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration fix","CKFRINGEFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,201,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("C6 84 ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+3A0CBDD - 74 05 - je O2-Win64-Shipping.exe+3A0CBE4 + --O2-Win64-Shipping.exe+3A0CBDF - E8 7C 51 3B FE - call O2-Win64-Shipping.exe+1DC1D60 + --O2-Win64-Shipping.exe+3A0CBE4 - 0F 28 C6 - movaps xmm0,xmm6 + --O2-Win64-Shipping.exe+3A0CBE7 - 48 8B 8C 24 20 06 00 00 - mov rcx,[rsp+00000620] + --O2-Win64-Shipping.exe+3A0CBEF - 48 33 CC - xor rcx,rsp + end + + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("76 ?? F3 0F 10 ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x0e,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+336F7D2 - 76 27 - jna O2-Win64-Shipping.exe+336F7FB + --O2-Win64-Shipping.exe+336F7D4 - F3 0F 10 83 DC 07 00 00 - movss xmm0,[rbx+000007DC] + --O2-Win64-Shipping.exe+336F7DC - F3 0F 5E C1 - divss xmm0,xmm1 + --O2-Win64-Shipping.exe+336F7E0 - F3 0F 11 83 E4 07 00 00 - movss [rbx+000007E4],xmm0 + --O2-Win64-Shipping.exe+336F7E8 - F3 0F 11 83 08 02 00 00 - movss [rbx+00000208],xmm0 + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + + if HackTool:SignatureScan("48 8B ?? ?? ?? 0F ?? ?? 48 ?? ?? 0F ?? ?? 48 83 ?? ?? 5F",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+32DA69A - FF D0 - call rax + --O2-Win64-Shipping.exe+32DA69C - 48 8B 5C 24 40 - mov rbx,[rsp+40] + --O2-Win64-Shipping.exe+32DA6A1 - 0F 10 00 - movups xmm0,[rax] + --O2-Win64-Shipping.exe+32DA6A4 - 48 8B C7 - mov rax,rdi + --O2-Win64-Shipping.exe+32DA6A7 - 0F 11 07 - movups [rdi],xmm0 + end + + local tAddress = HackTool:AddAddress("CINEMATICSFPS") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? E8 ?? ?? ?? ?? 8B ?? 48 ?? ?? E8",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+1DA82E1 - F2 0F 5A C8 - cvtsd2ss xmm1,xmm0 + --O2-Win64-Shipping.exe+1DA82E5 - 44 8B CE - mov r9d,esi + --O2-Win64-Shipping.exe+1DA82E8 - F3 0F 11 4F 48 - movss [rdi+48],xmm1 + --O2-Win64-Shipping.exe+1DA82ED - E8 9E 80 FE FF - call O2-Win64-Shipping.exe+1D90390 + --O2-Win64-Shipping.exe+1DA82F2 - 8B D6 - mov edx,esi + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+3A9845A - 48 8B 05 1F 16 8F 02 - mov rax,[O2-Win64-Shipping.exe+6389A80] + --O2-Win64-Shipping.exe+3A98461 - 39 30 - cmp [rax],esi + --O2-Win64-Shipping.exe+3A98463 - 7F 06 - jg O2-Win64-Shipping.exe+3A9846B + --O2-Win64-Shipping.exe+3A98465 - 89 B3 84 10 00 00 - mov [rbx+00001084],esi + --O2-Win64-Shipping.exe+3A9846B - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+3A9845A - 48 8B 05 1F 16 8F 02 - mov rax,[O2-Win64-Shipping.exe+6389A80] + --O2-Win64-Shipping.exe+3A98461 - 39 30 - cmp [rax],esi + --O2-Win64-Shipping.exe+3A98463 - 7F 06 - jg O2-Win64-Shipping.exe+3A9846B + --O2-Win64-Shipping.exe+3A98465 - 89 B3 84 10 00 00 - mov [rbx+00001084],esi + --O2-Win64-Shipping.exe+3A9846B - 8B 04 2F - mov eax,[rdi+rbp] + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:PushFloat("HUDSafeZoneDefRight") + Variables:PushFloat("HUDSafeZoneDefBottom") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + Variables["HUDSafeZoneDefRight"]:WriteFloat(1) + Variables["HUDSafeZoneDefBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + movsd xmm14,[$$2+8] $ctx=1 + ucomisd xmm14,[(allocation)Variables->HUDSafeZoneDefRight] + jne next + $$0 xmm14,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 + $$0 [$$2],xmm14 $ctx=1 + + next: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)CINEMATICSFPS,CINEMATICSFPS_cc: + comiss $$2,[FPSLimit] $ctx=1 + je %returnaddress% + %originalcode% + jmp %returnaddress% + %end% + + FPSLimit: (float)30f + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + Toggle_CodeCave("CINEMATICSFPS_cc",bCinematicsFPS) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_HUD_Safe_Zone() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV: %.2f, FOV Out: %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_HUD_Safe_Zone() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function CKCINEMATICSFPSFix_Changed(Sender) + + bCinematicsFPS = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICSFPS_cc",bCinematicsFPS) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function HUDSZSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + fHUDSafeZoneRight = fHUDSafeZOneLeft + lblHUD.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..95c1a7f Binary files /dev/null and b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..c44d3dd Binary files /dev/null and b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..9ed5b98 Binary files /dev/null and b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Scripts/PacificDrive.lua b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Scripts/PacificDrive.lua new file mode 100644 index 0000000..50b751d --- /dev/null +++ b/PluginCache/K4sh/Modules/PacificDrive/Dependencies/Scripts/PacificDrive.lua @@ -0,0 +1,255 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "PenDriverPro-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,121,180,14) + + DefaultControls.AddHeader("HeaderHUDSZ","HUD safe zone",15,70,210,17) + DefaultControls.AddFixedFOVSlider("HUD","HUDSZSlider_Changed",55,100,125,35,0,40,0,1) + HUD:SetTickFrequency(5) + HUD:SetLabel1Text("0") + HUD:SetLabel2Text("40") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + --if HackTool:SignatureScan("0F 28 ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("F3 0F ?? ?? 89 ?? ?? ?? 8B ?? ?? F3 0F ?? ?? ?? ?? F3 0F ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --PenDriverPro-Win64-Shipping.exe+2D87EC3 - 8B 45 08 - mov eax,[rbp+08] + --PenDriverPro-Win64-Shipping.exe+2D87EC6 - F2 0F 11 44 24 4C - movsd [rsp+4C],xmm0 + --PenDriverPro-Win64-Shipping.exe+2D87ECC - F3 0F 10 07 - movss xmm0,[rdi] + --PenDriverPro-Win64-Shipping.exe+2D87ED0 - 89 44 24 48 - mov [rsp+48],eax + --PenDriverPro-Win64-Shipping.exe+2D87ED4 - 8B 46 08 - mov eax,[rsi+08] + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + + if HackTool:SignatureScan("48 8B ?? ?? ?? 0F ?? ?? 48 ?? ?? 0F ?? ?? 48 83 ?? ?? 5F",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --PenDriverPro-Win64-Shipping.exe+23E782A - FF D0 - call rax + --PenDriverPro-Win64-Shipping.exe+23E782C - 48 8B 5C 24 40 - mov rbx,[rsp+40] + --PenDriverPro-Win64-Shipping.exe+23E7831 - 0F 10 00 - movups xmm0,[rax] + --PenDriverPro-Win64-Shipping.exe+23E7834 - 48 8B C7 - mov rax,rdi + --PenDriverPro-Win64-Shipping.exe+23E7837 - 0F 11 07 - movups [rdi],xmm0 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("MinFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:PushFloat("HUDSafeZoneDefRight") + Variables:PushFloat("HUDSafeZoneDefBottom") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["MinFOV"]:WriteFloat(10) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + Variables["HUDSafeZoneDefRight"]:WriteFloat(1) + Variables["HUDSafeZoneDefBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fstp dword ptr [(allocation)Variables->FOVOut] + movss $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + movsd xmm14,[$$2+8] $ctx=1 + ucomisd xmm14,[(allocation)Variables->HUDSafeZoneDefRight] + jne next + $$0 xmm14,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 + $$0 [$$2],xmm14 $ctx=1 + + next: + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + end + + Write_FOV() + Write_HUD_Safe_Zone() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_HUD_Safe_Zone() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function HUDSZSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + fHUDSafeZoneRight = fHUDSafeZOneLeft + lblHUD.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Returnal/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Returnal/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..fc02d62 Binary files /dev/null and b/PluginCache/K4sh/Modules/Returnal/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Returnal/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Returnal/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..eb6291e Binary files /dev/null and b/PluginCache/K4sh/Modules/Returnal/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Returnal/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Returnal/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..d7481e3 Binary files /dev/null and b/PluginCache/K4sh/Modules/Returnal/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Returnal/Dependencies/Scripts/Returnal.lua b/PluginCache/K4sh/Modules/Returnal/Dependencies/Scripts/Returnal.lua new file mode 100644 index 0000000..670a2d3 --- /dev/null +++ b/PluginCache/K4sh/Modules/Returnal/Dependencies/Scripts/Returnal.lua @@ -0,0 +1,156 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Returnal-Win64-Shipping.exe" +Process_EngineDLL = "Returnal-Engine-Win64-Shipping.dll" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,70,160,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("70") + FOVSlider:SetLabel2Text("160") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("89 ?? ?? ?? 8B ?? ?? C5 FA ?? ?? ?? ?? C5 FA ?? ?? ?? ?? 89 ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EngineDLL) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Returnal-Engine-Win64-Shipping.UCameraModifier::BlueprintModifyCamera+83 - 8B 45 08 - mov eax,[rbp+08] + --Returnal-Engine-Win64-Shipping.UCameraModifier::BlueprintModifyCamera+86 - C5 FB 11 44 24 4C - vmovsd [rsp+4C],xmm0 + --Returnal-Engine-Win64-Shipping.UCameraModifier::BlueprintModifyCamera+8C - C5 FA 10 07 - vmovss xmm0,[rdi] + --Returnal-Engine-Win64-Shipping.UCameraModifier::BlueprintModifyCamera+90 - 89 44 24 48 - mov [rsp+48],eax + --Returnal-Engine-Win64-Shipping.UCameraModifier::BlueprintModifyCamera+94 - 8B 46 08 - mov eax,[rsi+08] + + end + + return true + +end + + +function Enable_Inject() + + local DLLAddr = HackTool:GetModuleAddress(Process_EngineDLL) + local Variables = HackTool:AllocateMemory("Variables",50) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("DefaultFOV") + Variables:PushFloat("FOV") + Variables:Allocate(DLLAddr) -- Make sure variables won't be out of range + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["DefaultFOV"]:WriteFloat(fDefaultFOV) + Variables["FOV"]:WriteFloat(fFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + vmovss xmm0,[(allocation)Variables->FOV] + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",DLLAddr) == nil then -- Make sure injected code won't be out of range + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() +end + +function FOVSlider_Changed(Sender) + + fFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("%.0f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + + fFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("%.0f",fFOV) ) + + if bFOV then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(fFOV) + end + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..a079e54 Binary files /dev/null and b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..1b88238 Binary files /dev/null and b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..fe664fe Binary files /dev/null and b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Scripts/RiseOfTheRonin.lua b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Scripts/RiseOfTheRonin.lua new file mode 100644 index 0000000..f1e5ad9 --- /dev/null +++ b/PluginCache/K4sh/Modules/RiseOfTheRonin/Dependencies/Scripts/RiseOfTheRonin.lua @@ -0,0 +1,200 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS + +--ControlVars +bFixEnabled = true +bCamera = true +bFPS = true +bCinematics = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Ronin.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 1000 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_CAMERA","Camera fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("CAMERASlider","CAMERASlider_Changed",55,100,125,35,0,120,0,1) + CAMERASlider:SetTickFrequency(10) + CAMERASlider:SetLabel1Text("-20") + CAMERASlider:SetLabel2Text("100") + + DefaultControls.AddFixToggle("CKCAMERAFix_Enable","Camera distance fix","CKCAMERAFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKFPSFix_Enable","In game frame fix","CKFPSFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKCINEMATICSFPSFix_Enable","Cutscenes frame fix","CKCINEMATICSFPSFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("CAMERADISTANCE") + + if HackTool:SignatureScan("8B 88 ?? ?? ?? ?? 49 8B ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Ronin.exe+2BC551 - F3 0F 10 15 37 D7 47 04 - movss xmm2,[Ronin.exe+4739C90] + --Ronin.exe+2BC559 - F3 0F 5C CA - subss xmm1,xmm2 + --Ronin.exe+2BC55D - 8B 88 44 02 00 00 - mov ecx,[rax+00000244] + --Ronin.exe+2BC563 - 49 8B 81 C8 03 00 00 - mov rax,[r9+000003C8] + --Ronin.exe+2BC56A - F3 0F 5E 0D 5A DA 47 04 - divss xmm1,[Ronin.exe+4739FCC] + end + + local tAddress = HackTool:AddAddress("FPS") + + if HackTool:SignatureScan("48 ?? ?? 48 89 ?? ?? ?? 48 63 ?? ?? ?? ?? ?? B9 3C 00 00 00",tAddress,PAGE_EXECUTE_READ,0x0f,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Ronin.exe+2A29F2 - 48 89 44 24 10 - mov [rsp+10],rax + --Ronin.exe+2A29F7 - 48 63 05 BE 94 C7 04 - movsxd rax,dword ptr [Ronin.exe+4F1BEBC] + --Ronin.exe+2A29FE - B9 3C 00 00 00 - mov ecx,0000003C + --Ronin.exe+2A2A03 - C7 04 24 1E 00 00 00 - mov [rsp],0000001E + --Ronin.exe+2A2A0A - 89 4C 24 04 - mov [rsp+04],ecx + end + + local tAddress = HackTool:AddAddress("CINEMATICSFRAMERATE") + + if HackTool:SignatureScan("89 97 ?? ?? ?? ?? 89 87 ?? ?? ?? ?? E8 ?? ?? ?? ?? 89 87",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Ronin.exe+2A2AB1 - 8B 87 48 07 00 00 - mov eax,[rdi+00000748] + --Ronin.exe+2A2AB7 - 8B 97 40 07 00 00 - mov edx,[rdi+00000740] + --Ronin.exe+2A2ABD - 89 97 3C 07 00 00 - mov [rdi+0000073C],edx + --Ronin.exe+2A2AC3 - 89 87 44 07 00 00 - mov [rdi+00000744],eax + --Ronin.exe+2A2AC9 - E8 16 FF FF FF - call Ronin.exe+2A29E4 + --Ronin.exe+2A2ACE - 89 87 40 07 00 00 - mov [rdi+00000740],eax + end + + return true + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables", 0) + Variables:PushInt("CameraDistance") + Variables:Allocate() + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)CAMERADISTANCE,CAMERADISTANCE_cc: + $$0 $$1,[(allocation)Variables->CameraDistance] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)CINEMATICSFRAMERATE,CINEMATICSFRAMERATE_cc: + $$0 $$2,0xff $ctx=1 ; Push FPS in cutscenes up to 255 + $$0 eax,$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)FPS,FPS_cc: + $$0 $$1,0xff $ctx=1 ; Push FPS up to 255 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("CAMERADISTANCE_cc",bCamera) + Toggle_CodeCave("FPS_cc",bFPS) + Toggle_CodeCave("CINEMATICSFRAMERATE_cc",bCinematics) + end + + Write_Camera() + +end + +function Periodic() +end + +function CAMERASlider_Changed(Sender) + + fCameraDistance = Sender:GetPosition() - 20 + lblCAMERASlider.Caption:SetCaption( string.format("Camera: %.0f",fCameraDistance) ) + + Write_Camera() + ForceUpdate() + +end + +function Write_Camera() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["CameraDistance"] then + Variables["CameraDistance"]:WriteInt(fCameraDistance) + end + +end + +function CKCAMERAFix_Changed(Sender) + + bCamera = Toggle_CheckFix(Sender) + Write_Camera() + Toggle_CodeCave("CAMERADISTANCE_cc",bCamera) + ForceUpdate() + +end + +function CKFPSFix_Changed(Sender) + + bFPS = Toggle_CheckFix(Sender) + Toggle_CodeCave("FPS_cc",bFPS) + ForceUpdate() + +end + +function CKCINEMATICSFPSFix_Changed(Sender) + + bCinematics = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICSFRAMERATE_cc",bCinematics) + ForceUpdate() + +end + +function Disable_Inject() + + CleanUp() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..b78a025 Binary files /dev/null and b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..02d5da9 Binary files /dev/null and b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..c997094 Binary files /dev/null and b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Scripts/RobocopRogueCity.lua b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Scripts/RobocopRogueCity.lua new file mode 100644 index 0000000..0d0bac4 --- /dev/null +++ b/PluginCache/K4sh/Modules/RobocopRogueCity/Dependencies/Scripts/RobocopRogueCity.lua @@ -0,0 +1,385 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalWeaponFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 +fNullFOV = 1 +fcbAAIndex = 2 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "RoboCop-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_WeaponFOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+70") + + DefaultControls.AddHeader("Header_FOV","Weapon FOV fine adjustment",15,160,210,17) + DefaultControls.AddFixedFOVSlider("WeaponFOVSlider","WeaponFOVSlider_Changed",55,190,125,35,0,90,0,1) + + WeaponFOVSlider:SetTickFrequency(10) + WeaponFOVSlider:SetLabel1Text("-20") + WeaponFOVSlider:SetLabel2Text("+70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKWeaponFOVFix_Enable","Weapon FOV fix","CKWeaponFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field disable","CKDOFFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKAAFix_Enable","Anti aliasing selection","CKAAFix_Changed",255,181,180,14) + + DefaultControls.AddHeader("HeaderAntialiasing","Anti Aliasing Method",15,250,210,17) + AspectScalingOptions = {"Off","FXAA - Fast Approximate Anti-Aliasing","TAA - Temporal Anti-Aliasing","MSAA - Multisample Anti-Aliasing","TSR - Temporal Super-Resolution"} + DefaultControls.AddComboBox("AACombo","AACombo_Changed",AspectScalingOptions,15,275,210,250) + +end + +function Configure_SignatureScan() + + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 48 8B ?? 48 8B ?? 4C 8D ?? ?? 48 8B ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --RoboCop-Win64-Shipping.exe+46A1A84 - 48 8B 01 - mov rax,[rcx] + --RoboCop-Win64-Shipping.exe+46A1A87 - FF 90 28 07 00 00 - call qword ptr [rax+00000728] + --RoboCop-Win64-Shipping.exe+46A1A8D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --RoboCop-Win64-Shipping.exe+46A1A92 - 48 83 C4 28 - add rsp,28 + --RoboCop-Win64-Shipping.exe+46A1A96 - C3 - ret + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? ?? 0F ?? ?? 74 ?? F3 0F ?? ?? E9 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --RoboCop-Win64-Shipping.exe+41219BF - 0F 29 45 F0 - movaps [rbp-10],xmm0 + --RoboCop-Win64-Shipping.exe+41219C3 - F3 0F 10 07 - movss xmm0,[rdi] + --RoboCop-Win64-Shipping.exe+41219C7 - F2 0F 11 4D 00 - movsd [rbp+00],xmm1 + --RoboCop-Win64-Shipping.exe+41219CC - 0F 28 CF - movaps xmm1,xmm7 + --RoboCop-Win64-Shipping.exe+41219CF - 48 89 74 24 30 - mov [rsp+30],rsi + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("75 ?? BF 04 ?? ?? ?? 8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --RoboCop-Win64-Shipping.exe+2E85C94 - BF 04 00 00 00 - mov edi,00000004 + --RoboCop-Win64-Shipping.exe+2E85C99 - 8B 3C 37 - mov edi,[rdi+rsi] + --RoboCop-Win64-Shipping.exe+2E85C9C - 48 8B CB - mov rcx,rbx + --RoboCop-Win64-Shipping.exe+2E85C9F - E8 BC CE 8F 01 - call RoboCop-Win64-Shipping.exe+4782B60 + --RoboCop-Win64-Shipping.exe+2E85CA4 - 0F B7 C8 - movzx ecx,ax + end + + local tAddress = HackTool:AddAddress("ANTIALIASING") + + --if HackTool:SignatureScan("79 ?? 33 ?? EB ?? BF ? ?? ? ?? 3B ?? 0F ?? ?? 65",tAddress,PAGE_EXECUTE_READ,0x06,Process_EXEName) == 0 then + if HackTool:SignatureScan("79 ?? 33 ?? EB ?? BF ?? ?? ?? ?? 3B ?? 0F ?? ?? 65",tAddress,PAGE_EXECUTE_READ,0x06,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --RoboCop-Win64-Shipping.exe+4780CE7 - 33 FF - xor edi,edi + --RoboCop-Win64-Shipping.exe+4780CE9 - EB 0A - jmp RoboCop-Win64-Shipping.exe+4780CF5 + --RoboCop-Win64-Shipping.exe+4780CEB - BF 05 00 00 00 - mov edi,00000005 + --RoboCop-Win64-Shipping.exe+4780CF0 - 3B C7 - cmp eax,edi + --RoboCop-Win64-Shipping.exe+4780CF2 - 0F 4C F8 - cmovl edi,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("WeaponFOVIn") + Variables:PushFloat("WeaponFOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalWeaponFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("NullFOV") + Variables:PushFloat("AntiAliasing") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AdditionalWeaponFOV"]:WriteFloat(fAdditionalWeaponFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["NullFOV"]:WriteFloat(fNullFOV) + Variables["AntiAliasing"]:WriteFloat(fcbAAIndex) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$2,[(allocation)Variables->FOVOut] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)FOV2,FOV2_cc: ; weapon fov + %originalcode% + $$0 [(allocation)Variables->WeaponFOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalWeaponFOV] $ctx=1 + $$0 [(allocation)Variables->WeaponFOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 edi,0 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ANTIALIASING,ANTIALIASING_cc: + $$0 $$1,[(allocation)Variables->AntiAliasing] $ctx=1 + jmp %returnaddress% + %end% + + %end% + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("FOV2_cc",bFixEnabled) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("ANTIALIASING_cc",bAntiAliasing) + end + + Write_FOV() + Write_WeaponFOV() + Write_Aspect() + Write_AntiAliasing() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fWeaponFOVIn = Variables["WeaponFOVIn"]:ReadFloat() + local fWeaponFOVOut = Variables["WeaponFOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In : %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f\r\nWeapon FOV In : %0.2f, FOV In : %0.2f", fFOVIn, fCompensatedFOV, fFOVOut, fWeaponFOVIn, fWeaponFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function WeaponFOVSlider_Changed(Sender) + + fAdditionalWeaponFOV = Sender:GetPosition() - 20 + lblWeaponFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalWeaponFOV) ) + + Write_WeaponFOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_WeaponFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalWeaponFOV"] then + if bFOV == true then + Variables["AdditionalWeaponFOV"]:WriteFloat(fAdditionalWeaponFOV) + else + Variables["AdditionalWeaponFOV"]:WriteFloat(0) + end + end + +end + +function Write_Aspect() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == true then + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + end + +end + +function Write_AntiAliasing() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AntiAliasing"] then + if bAntiAliasing == true then + Variables["AntiAliasing"]:WriteFloat(fcbAAIndex) + else + Variables["AntiAliasing"]:WriteFloat(2) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFixEnabled) + ForceUpdate() + +end + +function CKWeaponFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_WeaponFOV() + Toggle_CodeCave("FOV2_cc",bFixEnabled) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + + ForceUpdate() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == false then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + end + end + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKAAFix_Changed(Sender) + + bAntiAliasing = Toggle_CheckFix(Sender) + Toggle_CodeCave("ANTIALIASING_cc",bAntiAliasing) + ForceUpdate() + +end + +function AACombo_Changed(Sender) + + fcbAAIndex = AACombo:GetSelectedIndex() + Write_AntiAliasing() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..1eb2926 Binary files /dev/null and b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..ae049ee Binary files /dev/null and b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..f24798c Binary files /dev/null and b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Scripts/SWOutlaws.lua b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Scripts/SWOutlaws.lua new file mode 100644 index 0000000..0a6ba4b --- /dev/null +++ b/PluginCache/K4sh/Modules/SWOutlaws/Dependencies/Scripts/SWOutlaws.lua @@ -0,0 +1,191 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +--ControlVars +bFixEnabled = true +bAspect=true +bDOF = true +bFrameGen = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Outlaws.exe" +DLSS_G_DLL = "sl.dlss_g.dll" + +--INJECTION BEHAVIOUR +InjectDelay = 3000 +WriteInterval = 1000 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Cinematics aspect fix","CKASPECTFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFRAMEGENFix_Enable","Frame generation fix","CKFRAMEGENFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("48 83 ?? ?? ?? C3 ?? ?? ?? ?? 8B 02 89 01 C3 ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? 8B 02",tAddress,PAGE_EXECUTE_READ,0x1c,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Outlaws.exe+D8088F - CC - int 3 + --Outlaws.exe+D80890 - 8B 02 - mov eax,[rdx] + --Outlaws.exe+D80892 - 89 01 - mov [rcx],eax + --Outlaws.exe+D80894 - C3 - ret + --Outlaws.exe+D80895 - CC - int 3 + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("75 ?? 80 3D ?? ?? ?? ?? ?? 75 ?? 80 3D ?? ?? ?? ?? ?? 74 ?? 41 80 BC",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Outlaws.exe+18E6DDC - C5FE7F45 A0 - vmovdqu [rbp-60],ymm0 + --Outlaws.exe+18E6DE1 - 48 C7 45 C0 00000000 - mov qword ptr [rbp-40],00000000 + --Outlaws.exe+18E6DE9 - 75 66 - jne Outlaws.exe+18E6E51 + --Outlaws.exe+18E6DEB - 80 3D 0927F706 00 - cmp byte ptr [Outlaws.exe+88594FB],00 + --Outlaws.exe+18E6DF2 - 75 09 - jne Outlaws.exe+18E6DFD + end + + local tAddress = HackTool:AddAddress("FRAMEGEN") + + if HackTool:SignatureScan("48 ?? ?? 74 ?? 48 8B ?? ?? ?? ?? ?? 48 ?? ?? ?? 0F 10 ?? ?? 0F 11 ?? 0F 10 ?? ?? 0F 11 ?? ?? 0F 10",tAddress,PAGE_EXECUTE_READ,0x1f,DLSS_G_DLL) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --sl.dlss_g.dll+3D325 - 0F 10 4A 28 - movups xmm1,[rdx+28] + --sl.dlss_g.dll+3D329 - 0F 11 4F 10 - movups [rdi+10],xmm1 + --sl.dlss_g.dll+3D32D - 0F 10 42 38 - movups xmm0,[rdx+38] + --sl.dlss_g.dll+3D331 - 0F 11 47 20 - movups [rdi+20],xmm0 + --sl.dlss_g.dll+3D335 - 0F 10 4A 48 - movups xmm1,[rdx+48] + end + + return true + +end + +function Enable_Inject() + + local DLLAddr = HackTool:GetModuleAddress(DLSS_G_DLL) + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("ScreenRatio") + Variables:Allocate() + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)ASPECT,ASPECT_cc: + cmp $$2,0x4018f5c3 $ctx=1 + jne exit + mov $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + exit: + %originalcode% + %end% + + + (codecave)DOF,DOF_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + local asmdll = [[ + + (codecave:jmp)FRAMEGEN,FRAMEGEN_cc: + cmp r14,0xd + jne next + mov byte ptr [$$2],1 $ctx=1 + next: + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("ASPECT_cc",bAspect) + end + + if HackTool:CompileAssembly(asmdll,"Framefix",DLLAddr) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FRAMEGEN_cc",bFrameGen) + end + +end + +function Periodic() + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKFRAMEGENFix_Changed(Sender) + + bFrameGen = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRAMEGEN_cc",bFrameGen) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SandLand/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SandLand/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..32f2e81 Binary files /dev/null and b/PluginCache/K4sh/Modules/SandLand/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SandLand/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SandLand/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..8d2c231 Binary files /dev/null and b/PluginCache/K4sh/Modules/SandLand/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SandLand/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SandLand/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..f6787c1 Binary files /dev/null and b/PluginCache/K4sh/Modules/SandLand/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SandLand/Dependencies/Scripts/SandLand.lua b/PluginCache/K4sh/Modules/SandLand/Dependencies/Scripts/SandLand.lua new file mode 100644 index 0000000..d372199 --- /dev/null +++ b/PluginCache/K4sh/Modules/SandLand/Dependencies/Scripts/SandLand.lua @@ -0,0 +1,163 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "SANDLAND-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,80,0,1) + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+60") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SANDLAND-Win64-Shipping.exe+3B10D5D - 74 05 - je SANDLAND-Win64-Shipping.exe+3B10D64 + --SANDLAND-Win64-Shipping.exe+3B10D5F - E8 5C E2 1C FE - call SANDLAND-Win64-Shipping.exe+1CDEFC0 + --SANDLAND-Win64-Shipping.exe+3B10D64 - 0F 28 C6 - movaps xmm0,xmm6 + --SANDLAND-Win64-Shipping.exe+3B10D67 - 48 8B 8C 24 30 06 00 00 - mov rcx,[rsp+00000630] + --SANDLAND-Win64-Shipping.exe+3B10D6F - 48 33 CC - xor rcx,rsp + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, FOV Out: %.2f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..3cd64ef Binary files /dev/null and b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..abb0b98 Binary files /dev/null and b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..cf99307 Binary files /dev/null and b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Scripts/SherlockHolmesCOne.lua b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Scripts/SherlockHolmesCOne.lua new file mode 100644 index 0000000..059a9f6 --- /dev/null +++ b/PluginCache/K4sh/Modules/SherlockHolmesCOne/Dependencies/Scripts/SherlockHolmesCOne.lua @@ -0,0 +1,263 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fDefaultAspectRatio = 1.777777791 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bPillarBoxing = true +bAspect = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "SHCO.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("70") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKPBFix_Enable","Pillar boxing fix","CKPBFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E9 ?? ?? ?? ?? F3 ?? ?? ?? ?? F3 ?? ?? ?? ?? ?? ?? ?? 41 8B ?? ??",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHCO.exe+22E376C - 44 0F 29 40 C8 - movaps [rax-38],xmm8 + --SHCO.exe+22E3771 - 44 0F 29 48 B8 - movaps [rax-48],xmm9 + --SHCO.exe+22E3776 - 0F 84 1F 02 00 00 - je SHCO.exe+22E399B + --SHCO.exe+22E377C - F3 0F 10 51 2C - movss xmm2,[rcx+2C] + --SHCO.exe+22E3781 - 48 8D 55 A0 - lea rdx,[rbp-60] + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("F3 ?? ?? ?? ?? E9 ?? ?? ?? ?? F3 0F ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? ",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHCO.exe+22E3877 - F3 44 0F 10 C0 - movss xmm8,xmm0 + --SHCO.exe+22E387C - E9 83 00 00 00 - jmp SHCO.exe+22E3904 + --SHCO.exe+22E3881 - F3 0F 10 43 18 - movss xmm0,[rbx+18] <<== + --SHCO.exe+22E3886 - F3 0F 5F 05 5A 03 F5 00 - maxss xmm0,[SHCO.exe+3233BE8] + --SHCO.exe+22E388E - F3 0F 10 35 3E DE EC 01 - movss xmm6,[SHCO.exe+41B16D4] + end + + local tAddress = HackTool:AddAddress("PILLARBOXING") + + if HackTool:SignatureScan("F6 41 ?? 01 48 8B ?? F3 44",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHCO.exe+22E373E - 44 0F 29 50 A8 - movaps [rax-58],xmm10 + --SHCO.exe+22E3743 - 49 81 C1 90 00 00 00 - add r9,00000090 + --SHCO.exe+22E374A - F6 41 30 01 - test byte ptr [rcx+30],01 <<== + --SHCO.exe+22E374E - 48 8B D9 - mov rbx,rcx + --SHCO.exe+22E3751 - F3 44 0F 10 15 42 7E F0 00 - movss xmm10,[SHCO.exe+31EB59C] + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? 76 ?? 0F ?? ?? 76 ?? F3 0F ?? ?? F3 0F ?? ?? F3 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHCO.exe+6438B1 - F3 0F 11 4B 10 - movss [rbx+10],xmm1 + --SHCO.exe+6438B6 - EB 38 - jmp SHCO.exe+6438F0 + --SHCO.exe+6438B8 - F3 0F 10 95 CC 07 00 00 - movss xmm2,[rbp+000007CC] <<== + --SHCO.exe+6438C0 - 0F 2F D4 - comiss xmm2,xmm4 + --SHCO.exe+6438C3 - 76 29 - jna SHCO.exe+6438EE + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["DefaultAspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 ; retrieves FOV from xmm register + fld dword ptr [$$2] $ctx=1 + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->AspectRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + $$0 $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)FOV2,FOV2_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + $$0 [(allocation)Variables->CompensatedFOV],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->AspectRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)PILLARBOXING,PILLARBOXING_cc: + test byte ptr [$$1],0 $ctx=1 + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bFOV) + Toggle_CodeCave("PILLARBOXING_cc",bPillarBoxing) + Toggle_CodeCave("ASPECT_cc",bAspect) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Compensated: %0.2f, FOV Out : %.02f", fFOVIn, fFOVCompensated, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bFOV) + ForceUpdate() + +end + +function CKPBFix_Changed(Sender) + + bPillarBoxing = Toggle_CheckFix(Sender) + Toggle_CodeCave("PILLARBOXING_cc",bPillarBoxing) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..d2a1d8b Binary files /dev/null and b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..4574cbb Binary files /dev/null and b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..b756b93 Binary files /dev/null and b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Scripts/SilentHill2Remake.lua b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Scripts/SilentHill2Remake.lua new file mode 100644 index 0000000..846f54d --- /dev/null +++ b/PluginCache/K4sh/Modules/SilentHill2Remake/Dependencies/Scripts/SilentHill2Remake.lua @@ -0,0 +1,376 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 80 +fAdditionalFOV = 0 +fAdditionalCinematicsFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.6 --1.77778 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true +bVignetting = true +bFog = true +bFPS = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "SHProto-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = false + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKVIGNETTINGFix_Enable","Vignetting fix","CKVIGNETTINGFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKFOGFix_Enable","Fog fix","CKFOGFix_Changed",255,201,180,14) + DefaultControls.AddFixToggle("CKFPSFix_Enable","Cinematics FPS fix","CKFPSFix_Changed",255,221,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 8B ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+4E28404 - 48 8B 01 - mov rax,[rcx] + --SHProto-Win64-Shipping.exe+4E28407 - FF 90 10 07 00 00 - call qword ptr [rax+00000710] + --SHProto-Win64-Shipping.exe+4E2840D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --SHProto-Win64-Shipping.exe+4E28412 - 48 83 C4 28 - add rsp,28 + --SHProto-Win64-Shipping.exe+4E28416 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("C7 47 ?? ?? ?? ?? ?? C7 83 ?? ?? ?? ?? ?? ?? ?? ?? 48 8B ?? ?? ?? 48 83",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+299861A - 83 4F 4C 01 - or dword ptr [rdi+4C],01 + --SHProto-Win64-Shipping.exe+299861E - 80 8B B4 02 00 00 01 - or byte ptr [rbx+000002B4],01 + --SHProto-Win64-Shipping.exe+2998625 - C7 47 48 39 8E E3 3F - mov [rdi+48],3FE38E39 + --SHProto-Win64-Shipping.exe+299862C - C7 83 B0 02 00 00 39 8E E3 3F - mov [rbx+000002B0],3FE38E39 + --SHProto-Win64-Shipping.exe+2998636 - 48 8B 5C 24 48 - mov rbx,[rsp+48] + end + + local tAddress = HackTool:AddAddress("DOF") -- r.DepthOfFieldQuality + + if HackTool:SignatureScan("48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+364DC34 - 48 8B 05 BD E6 14 05 - mov rax,[SHProto-Win64-Shipping.exe+879C2F8] + --SHProto-Win64-Shipping.exe+364DC3B - 48 8B CB - mov rcx,rbx + --SHProto-Win64-Shipping.exe+364DC3E - 8B 78 04 - mov edi,[rax+04] + --SHProto-Win64-Shipping.exe+364DC41 - E8 4A DF 87 01 - call SHProto-Win64-Shipping.exe+4ECBB90 + --SHProto-Win64-Shipping.exe+364DC46 - 48 63 C8 - movsxd rcx,eax + end + + local tAddress = HackTool:AddAddress("FRINGE") -- r.SceneColorFringeQuality + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05 ?? ?? ?? ?? 7E",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+4EC9657 - 48 8B 05 82 23 9A 03 - mov rax,[SHProto-Win64-Shipping.exe+886B9E0] + --SHProto-Win64-Shipping.exe+4EC965E - 39 30 - cmp [rax],esi + --SHProto-Win64-Shipping.exe+4EC9660 - 7F 06 - jg SHProto-Win64-Shipping.exe+4EC9668 + --SHProto-Win64-Shipping.exe+4EC9662 - 89 B3 DC 1D 00 00 - mov [rbx+00001DDC],esi + --SHProto-Win64-Shipping.exe+4EC9668 - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("VIGNETTING") -- r.Tonemapper.Quality + + if HackTool:SignatureScan("8B ?? 83 ?? ?? 7D ?? 89 B3 ?? ?? ?? ?? EB ?? 83",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+4EC97AE - C7 83 B8 1F 00 00 00 00 80 3F - mov [rbx+00001FB8],3F800000 + --SHProto-Win64-Shipping.exe+4EC97B8 - 48 8B 05 81 1E 9A 03 - mov rax,[SHProto-Win64-Shipping.exe+886B640] + --SHProto-Win64-Shipping.exe+4EC97BF - 8B 08 - mov ecx,[rax] + --SHProto-Win64-Shipping.exe+4EC97C1 - 83 F9 02 - cmp ecx,02 + --SHProto-Win64-Shipping.exe+4EC97C4 - 7D 08 - jnl SHProto-Win64-Shipping.exe+4EC97CE + end + + local tAddress = HackTool:AddAddress("FOG") -- r.fog + + if HackTool:SignatureScan("75 ?? B3 ?? EB ?? 32 ?? 48 8B ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+33636ED - 48 8B 05 84 3D 3E 05 - mov rax,[SHProto-Win64-Shipping.exe+8747478] + --SHProto-Win64-Shipping.exe+33636F4 - 83 78 04 01 - cmp dword ptr [rax+04],01 + --SHProto-Win64-Shipping.exe+33636F8 - 75 04 - jne SHProto-Win64-Shipping.exe+33636FE + --SHProto-Win64-Shipping.exe+33636FA - B3 01 - mov bl,01 + --SHProto-Win64-Shipping.exe+33636FC - EB 02 - jmp SHProto-Win64-Shipping.exe+3363700 + end + + print ("here") + + local tAddress = HackTool:AddAddress("CINEMATICSFPS") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? EB ?? 0F ?? ?? 48 8B ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print ("here again") + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SHProto-Win64-Shipping.exe+5048E78 - 74 02 - je SHProto-Win64-Shipping.exe+5048E7C + --SHProto-Win64-Shipping.exe+5048E7A - 33 DB - xor ebx,ebx + --SHProto-Win64-Shipping.exe+5048E7C - F3 0F 10 04 1F - movss xmm0,[rdi+rbx] + --SHProto-Win64-Shipping.exe+5048E81 - EB 03 - jmp SHProto-Win64-Shipping.exe+5048E86 + --SHProto-Win64-Shipping.exe+5048E83 - 0F 28 C6 - movaps xmm0,xmm6 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables", 0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + fld dword ptr [(allocation)Variables->ScreenRatio] + fstp dword ptr [$$1] $ctx=1 + jmp %returnaddress% + %end% + + + (codecave:jmp)CINEMATICSFPS,CINEMATICSFPS_cc: + $$0 $$1,[noFPSLimit] $ctx=1 + jmp %returnaddress% + %end% + + noFPSLimit: + (float)0 + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + (codecave)VIGNETTING,VIGNETTING_cc: + xor $$1,$$1 $ctx=1 + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FOG,FOG_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("VIGNETTING_cc",bVignetting) + Toggle_CodeCave("FOG_cc",bFog) + Toggle_CodeCave("CINEMATICSFPS_cc",bFPS) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated; %.2f, Out : %.2f", fFOVIn, fCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + local Variables = HackTool:GetAllocation("Variables") + Toggle_CodeCave("ASPECT_cc",bAspect) + if Variables and Variables["AspectRatio"] then + if not bAspect then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKVIGNETTINGFix_Changed(Sender) + + bVignetting = Toggle_CheckFix(Sender) + Toggle_CodeCave("VIGNETTING_cc",bVignetting) + ForceUpdate() + +end + +function CKFOGFix_Changed(Sender) + + bFog = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOG_cc",bFog) + ForceUpdate() + +end + +function CKFPSFix_Changed(Sender) + + bFPS = Toggle_CheckFix(Sender) + Toggle_CodeCave("CINEMATICSFPS_cc",bFPS) + ForceUpdate() + +end + +function Disable_Inject() + + CleanUp() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..0a108b2 Binary files /dev/null and b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..43937e5 Binary files /dev/null and b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..cfead9c Binary files /dev/null and b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Scripts/SouthOfMidnight.lua b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Scripts/SouthOfMidnight.lua new file mode 100644 index 0000000..c112e81 --- /dev/null +++ b/PluginCache/K4sh/Modules/SouthOfMidnight/Dependencies/Scripts/SouthOfMidnight.lua @@ -0,0 +1,233 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 65 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777778 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "SouthOfMidnight.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("90 0F ?? ?? 48 8B 8C ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x01,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SouthOfMidnight.exe+357E051 - E8 5A 4A ED FD - call SouthOfMidnight.exe+1452AB0 + --SouthOfMidnight.exe+357E056 - 90 - nop + --SouthOfMidnight.exe+357E057 - 0F 28 C6 - movaps xmm0,xmm6 + --SouthOfMidnight.exe+357E05A - 48 8B 8C 24 50 09 00 00 - mov rcx,[rsp+00000950] + --SouthOfMidnight.exe+357E062 - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 87 ?? ?? ?? ?? 89 ?? ?? 0F B6",tAddress,PAGE_EXECUTE_READ,0x0f,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SouthOfMidnight.exe+3161AB4 - F3 0F 10 87 F8 01 00 00 - movss xmm0,[rdi+000001F8] + --SouthOfMidnight.exe+3161ABC - F3 0F 11 46 18 - movss [rsi+18],xmm0 + --SouthOfMidnight.exe+3161AC1 - 8B 87 08 02 00 00 - mov eax,[rdi+00000208] + --SouthOfMidnight.exe+3161AC7 - 89 46 2C - mov [rsi+2C],eax + --SouthOfMidnight.exe+3161ACA - 0F B6 8F 0C 02 00 00 - movzx ecx,byte ptr [rdi+0000020C] + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + movss $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_cc",bAspect) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + --local fFOV = bFOV + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + if bAspect then + Toggle_CodeCave("FOV_cc",bAspect) + end + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["CompensatedFOV"]:WriteFloat(0) + Variables["ASPECTCHECKED"]:WriteByte(0) + end + end + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio / fAspectRatio169 + + if CurrentAspectRatio < fAspectRatio169 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..91dc78a Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..f675af1 Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..f2ac7cf Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Scripts/SpiderMan2.lua b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Scripts/SpiderMan2.lua new file mode 100644 index 0000000..7012f28 --- /dev/null +++ b/PluginCache/K4sh/Modules/SpiderMan2/Dependencies/Scripts/SpiderMan2.lua @@ -0,0 +1,136 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultAspectRatio = 1.78 + +--ControlVars +bFixEnabled = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Spider-Man2.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","HUD ar fine adjustment",15,70,210,17) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("DOF") + if HackTool:SignatureScan("C5 FA ?? ?? ?? ?? ?? ?? C4 C1 ?? ?? ?? 0F 86 ?? ?? ?? ?? 44",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --"Spider-Man2.exe"+2CFED7F - 0F 8D 2F 01 00 00 - jnl "Spider-Man2.exe"+2CFEEB4 + --"Spider-Man2.exe"+2CFED85 - C6 86 3A 09 00 00 01 - mov byte ptr [rsi+0000093A],01 + --"Spider-Man2.exe"+2CFED8C - C5 FA 10 B7 D0 1B 00 00 - vmovss xmm6,[rdi+00001BD0] + --"Spider-Man2.exe"+2CFED94 - C4 C1 78 2F F2 - vcomiss xmm6,xmm10 + --"Spider-Man2.exe"+2CFED99 - 0F 86 8D 00 00 00 - jbe "Spider-Man2.exe"+2CFEE2C + end + + return true + +end + + +function Enable_Inject() + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)DOF,DOF_cc: + movss xmm6,[disabledDOF] + jmp %returnaddress% + %end% + + disabledDOF: (float)0 + + ]] + + RemoveAVXInstructions() + + if HackTool:CompileAssembly(asm,"MapAspectRatio") == nil then + RestoreAVXInstructions() + return ErrorOccurred("Assembly compilation failed...") + else + RestoreAVXInstructions() + Toggle_CodeCave("DOF_cc",bDOF) + end + +end + +function Periodic() +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function Disable_Inject() + + CleanUp() + +end + +function RemoveAVXInstructions() + + local tSuspendedThreadID = HackTool:SuspendAttachedThread() + + local tAddress = HackTool:GetAddress("DOF") + tAddress:WriteByte(0xF3,0) + tAddress:WriteByte(0x0F,1) + + HackTool:ResumeThread(tSuspendedThreadID) + +end + +function RestoreAVXInstructions() + + local tSuspendedThreadID = HackTool:SuspendAttachedThread() + + local tAddress = HackTool:GetAddress("DOF") + tAddress:WriteByte(0xC5,0) + tAddress:WriteByte(0xFA,1) + + + HackTool:ResumeThread(tSuspendedThreadID) + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..5c5b6b9 Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..743abee Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..070455a Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Scripts/SpiderManRemastered.lua b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Scripts/SpiderManRemastered.lua new file mode 100644 index 0000000..5015f24 --- /dev/null +++ b/PluginCache/K4sh/Modules/SpiderManRemastered/Dependencies/Scripts/SpiderManRemastered.lua @@ -0,0 +1,191 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultAspectRatio = 1.78 + +--ControlVars +bFixEnabled = true +bMapAspectRatio = true +bHUDAspectRatio = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Spider-Man.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","HUD ar fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("HUDSlider","HUDSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKHUDAspectFix_Enable","HUD aspect fix","CKCSAspectFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKMapAspectFix_Enable","City map fix","CKMapFix_Changed",255,101,180,54) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("MapAspectRatio") + if HackTool:SignatureScan("4C 8B 00 F3 0F 10 1D ?? ?? ?? ?? F3 0F 11",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("GetGameRes") + + if HackTool:SignatureScan("44 0F 2E 8B ?? ?? ?? ?? 7A ?? 75 ?? 0F 2E",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("HUDAspectRatio") + if HackTool:SignatureScan("E8 ?? ?? ?? ?? F3 0F 2C C0 0F B6 C8 83 E9",tAddress,PAGE_EXECUTE_READ,0x0f,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("HUD_Map_Aspect_Ratio") + Variables:PushFloat("Map_Aspect_Ratio") + Variables:PushFloat("Win_Width") + Variables:PushFloat("Win_Height") + Variables:Allocate() + Variables["Map_Aspect_Ratio"]:WriteFloat(fDefaultAspectRatio) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)MapAspectRatio,MapAspectRatio_cc: + movss xmm3,[(allocation)Variables->Map_Aspect_Ratio] + jmp %returnaddress% + %end% + + (codecave:jmp)GetGameRes,GetGameRes_cc: + ucomiss xmm9,[$$2] $ctx=1 + pushf + cmp r10,0x438 + je return + fld dword ptr [rbx+0xA8] + fstp dword ptr [(allocation)Variables->Win_Width] + fld dword ptr [rbx+0xAC] + fstp dword ptr [(allocation)Variables->Win_Height] + return: + popf + jmp %returnaddress% + %end% + + ; Spider-Man.exe+31816CA - 75 2E - jne Spider-Man.exe+31816FA + ; Spider-Man.exe+31816CC - 44 0F2E 8B A0000000 - ucomiss xmm9,[rbx+000000A0] + ; Spider-Man.exe+31816D4 - 7A 24 - jp Spider-Man.exe+31816FA + + (codecave:jmp)HUDAspectRatio,HUDAspectRatio_cc: + movss xmm0,[(allocation)Variables->HUD_Map_Aspect_Ratio] + movaps xmm6,[rsp+0x20] + add rsp,0x30 + pop rbx + ret + %end% + + ]] + + if HackTool:CompileAssembly(asm,"MapAspectRatio") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("MapAspectRatio_cc",bMapAspectRatio) + Toggle_CodeCave("GetGameRes_cc",bMapAspectRatio) + Toggle_CodeCave("HUDAspectRatio_cc",bHUDAspectRatio) + end + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["Win_Width"] and Variables["Map_Aspect_Ratio"] then + local window_width = Variables["Win_Width"]:ReadFloat() + local window_height = Variables["Win_Height"]:ReadFloat() + local window_Map_Aspect_Ratio = window_width / window_height + Variables["Map_Aspect_Ratio"]:WriteFloat(window_Map_Aspect_Ratio) + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nGame width : %.0f - height : %0.f - aspect ratio : %.2f", window_width, window_height, window_Map_Aspect_Ratio)) + end +end + +function HUDSlider_Changed(Sender) + + fHUDAspectRatio = ((Sender:GetScaledFloat(2) + 50) / 10) + 1.78 + lblHUDSlider.Caption:SetCaption( string.format("HUD aspect ratio : %.2f",fHUDAspectRatio) ) + + WriteHUDAR() + ForceUpdate() + +end + +function WriteHUDAR() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUD_Map_Aspect_Ratio"] then + Variables["HUD_Map_Aspect_Ratio"]:WriteFloat(fHUDAspectRatio) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKCSAspectFix_Changed(Sender) + + bHUDAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDAspectRatio_cc",bHUDAspectRatio) + ForceUpdate() + +end + +function CKMapFix_Changed(Sender) + + bMapAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("MapAspectRatio_cc",bMapAspectRatio) + Toggle_CodeCave("GetGameRes_cc",bMapAspectRatio) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..9172cd7 Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..29af49d Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..d287374 Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Scripts/SpiritOfNorth.lua b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Scripts/SpiritOfNorth.lua new file mode 100644 index 0000000..aa6e636 --- /dev/null +++ b/PluginCache/K4sh/Modules/SpiritOfNorth/Dependencies/Scripts/SpiritOfNorth.lua @@ -0,0 +1,251 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Infused-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + local Aspect = HackTool:AddAddress("ASPECT", tAddress) + Aspect:OffsetAddress(0x05) + --Infused-Win64-Shipping.exe+2053CC6 - F3 0F 58 83 F8 01 00 00 - addss xmm0,[rbx+000001F8] + --Infused-Win64-Shipping.exe+2053CCE - EB 08 - jmp "Infused-Win64-Shipping.exe"+2053CD8 + --Infused-Win64-Shipping.exe+2053CD0 - F3 0F 10 83 F8 01 00 00 - movss xmm0,[rbx+000001F8] + --Infused-Win64-Shipping.exe+2053CD8 - F3 0F 11 47 18 - movss [rdi+18],xmm0 + --Infused-Win64-Shipping.exe+2053CDD - 8B 83 08 02 00 00 - mov eax,[rbx+00000208] + --Infused-Win64-Shipping.exe+2053CE3 - 89 47 2C - mov [rdi+2C],eax + --Infused-Win64-Shipping.exe+2053CE6 - 0F B6 83 0C 02 00 00 - movzx eax,byte ptr [rbx+0000020C] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Infused-Win64-Shipping.exe+1288A50 - 48 8B 05 01 D8 D6 02 - mov rax,["Infused-Win64-Shipping.exe"+3FF6258] + --Infused-Win64-Shipping.exe+1288A57 - 48 8B CB - mov rcx,rbx + --Infused-Win64-Shipping.exe+1288A5A - 8B 78 04 - mov edi,[rax+04] + --Infused-Win64-Shipping.exe+1288A5D - E8 3E 4C 22 01 - call "Infused-Win64-Shipping.exe"+24AD6A0 + --Infused-Win64-Shipping.exe+1288A62 - 8B C8 - mov ecx,eax + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + if bAspect then + Toggle_CodeCave("FOV_cc",bAspect) + end + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["ASPECTCHECKED"]:WriteByte(0) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio / fAspectRatio169 + + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..160646c Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..551f675 Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..9be751e Binary files /dev/null and b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Scripts/SpiritOfNorth2.lua b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Scripts/SpiritOfNorth2.lua new file mode 100644 index 0000000..4129757 --- /dev/null +++ b/PluginCache/K4sh/Modules/SpiritOfNorth2/Dependencies/Scripts/SpiritOfNorth2.lua @@ -0,0 +1,251 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "SOTN2-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6 8B",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + local Aspect = HackTool:AddAddress("ASPECT", tAddress) + Aspect:OffsetAddress(0x05) + --SOTN2-Win64-Shipping.exe+338212A - F3 0F 58 83 30 02 00 00 - addss xmm0,[rbx+00000230] + --SOTN2-Win64-Shipping.exe+3382132 - EB 08 - jmp "SOTN2-Win64-Shipping.exe"+338213C + --SOTN2-Win64-Shipping.exe+3382134 - F3 0F 10 83 30 02 00 00 - movss xmm0,[rbx+00000230] + --SOTN2-Win64-Shipping.exe+338213C - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --SOTN2-Win64-Shipping.exe+3382141 - 8B 83 4C 02 00 00 - mov eax,[rbx+0000024C] + --SOTN2-Win64-Shipping.exe+3382147 - 89 47 54 - mov [rdi+54],eax + --SOTN2-Win64-Shipping.exe+338214A - 0F B6 8B 51 02 00 00 - movzx ecx,byte ptr [rbx+00000251] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --SOTN2-Win64-Shipping.exe+244C102 - 75 05 - jne "SOTN2-Win64-Shipping.exe"+244C109 + --SOTN2-Win64-Shipping.exe+244C104 - BF 04 00 00 00 - mov edi,00000004 + --SOTN2-Win64-Shipping.exe+244C109 - 8B 3C 37 - mov edi,[rdi+rsi] + --SOTN2-Win64-Shipping.exe+244C10C - 48 8B CB - mov rcx,rbx + --SOTN2-Win64-Shipping.exe+244C10F - E8 7C D8 66 01 - call "SOTN2-Win64-Shipping.exe"+3AB9990 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + if bAspect then + Toggle_CodeCave("FOV_cc",bAspect) + end + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["ASPECTCHECKED"]:WriteByte(0) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio / fAspectRatio169 + + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/StalkerII/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..03c3e4c Binary files /dev/null and b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/StalkerII/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..177b348 Binary files /dev/null and b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/StalkerII/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..e3fb1dc Binary files /dev/null and b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/StalkerII/Dependencies/Scripts/StalkerII.lua b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Scripts/StalkerII.lua new file mode 100644 index 0000000..dc7ef38 --- /dev/null +++ b/PluginCache/K4sh/Modules/StalkerII/Dependencies/Scripts/StalkerII.lua @@ -0,0 +1,228 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bFringe = true +bFog = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Stalker2-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKFRINGEFOVFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFOGGFix_Enable","Fog fix","CKFOGFix_Changed",255,141,180,14) + + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 8B ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x10,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Stalker2-Win64-Shipping.exe+4B78B97 - FF 90 20 07 00 00 - call qword ptr [rax+00000720] + --Stalker2-Win64-Shipping.exe+4B78B9D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Stalker2-Win64-Shipping.exe+4B78BA2 - 48 83 C4 28 - add rsp,28 + --Stalker2-Win64-Shipping.exe+4B78BA6 - C3 - ret + --Stalker2-Win64-Shipping.exe+4B78BA7 - CC - int 3 + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05 ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Stalker2-Win64-Shipping.exe+4C331D5 - 48 8B 05 D4 49 03 04 - mov rax,[Stalker2-Win64-Shipping.exe+8C67BB0] + --Stalker2-Win64-Shipping.exe+4C331DC - 39 30 - cmp [rax],esi + --Stalker2-Win64-Shipping.exe+4C331DE - 7F 06 - jg Stalker2-Win64-Shipping.exe+4C331E6 + --Stalker2-Win64-Shipping.exe+4C331E0 - 89 B3 EC 1F 00 00 - mov [rbx+00001FEC],esi + --Stalker2-Win64-Shipping.exe+4C331E6 - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("FOG") + + if HackTool:SignatureScan("75 ?? B3 ?? EB ?? 32 ?? 48 8B ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Stalker2-Win64-Shipping.exe+31D330D - 48 8B 05 94 74 93 05 - mov rax,[Stalker2-Win64-Shipping.exe+8B0A7A8] + --Stalker2-Win64-Shipping.exe+31D3314 - 83 78 04 01 - cmp dword ptr [rax+04],01 + --Stalker2-Win64-Shipping.exe+31D3318 - 75 04 - jne Stalker2-Win64-Shipping.exe+31D331E + --Stalker2-Win64-Shipping.exe+31D331A - B3 01 - mov bl,01 + --Stalker2-Win64-Shipping.exe+31D331C - EB 02 - jmp Stalker2-Win64-Shipping.exe+31D3320 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],xmm0 + addss xmm0,[(allocation)Variables->AdditionalFOV] + movss [(allocation)Variables->FOVOut],xmm0 + %originalcode% + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + (codecave)FOG,FOG_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("FOG_cc",bFog) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Out : %.2f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKFOGFix_Changed(Sender) + + bFog = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOG_cc",bFog) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..21055ea Binary files /dev/null and b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..8d646e0 Binary files /dev/null and b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..0c4ff4e Binary files /dev/null and b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Scripts/StarWarsJediSurvivor.lua b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Scripts/StarWarsJediSurvivor.lua new file mode 100644 index 0000000..21e95ab --- /dev/null +++ b/PluginCache/K4sh/Modules/StarWarsJediSurvivor/Dependencies/Scripts/StarWarsJediSurvivor.lua @@ -0,0 +1,476 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalCinematicsFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fDefaultAspectRatio = 1.777777791 +fCamera = 0.8 +fSharpening = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bCinematicsFOV = true +bAspect = true +bDOF = true +bCamera = true +bSharpening = true +bFog = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "JediSurvivor.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + DefaultControls.AddFixedFOVSlider("CinematicsFOVSlider","CinematicsFOVSlider_Changed",55,160,125,35,0,70,0,1) + CinematicsFOVSlider:SetTickFrequency(10) + DefaultControls.AddHeader("Header_CAMERA","Camera fine adjustment",15,230,210,17) + DefaultControls.AddFixedFOVSlider("CAMERASlider","CAMERASlider_Changed",55,260,125,35,0,300,0,1) + CAMERASlider:SetTickFrequency(30) + CAMERASlider:SetLabel1Text("0") + CAMERASlider:SetLabel2Text("3") + DefaultControls.AddHeader("Header_Sharpening","Image sharpening adjustment",15,320,210,17) + DefaultControls.AddFixedFOVSlider("SharpeningSlider","SharpeningSlider_Changed",55,350,125,35,0,100,0,1) + SharpeningSlider:SetTickFrequency(10) + SharpeningSlider:SetLabel1Text("0") + SharpeningSlider:SetLabel2Text("10") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCinematicsFOVFix_Enable","Cinematics FOV fix","CKCinematicsFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKCAMERAFix_Enable","Camera distance","CKCAMERAFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKSHARPENINGFix_Enable","Sharpening fix","CKSHARPENINGFix_Changed",255,201,180,14) + DefaultControls.AddFixToggle("CKFOGFix_Enable","Fog removal fix","CKFOGFix_Changed",255,221,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+37CC034 - 48 8B 01 - mov rax,[rcx] + --JediSurvivor.exe+37CC037 - FF 90 F0 06 00 00 - call qword ptr [rax+000006F0] + --JediSurvivor.exe+37CC03D - F3 0F 10 40 18 - movss xmm0,[rax+18] + --JediSurvivor.exe+37CC042 - 48 83 C4 28 - add rsp,28 + --JediSurvivor.exe+37CC046 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECTS") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? EB ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + local Aspect_1 = HackTool:AddAddress("ASPECT1", tAddress) + local Aspect_2 = HackTool:AddAddress("ASPECT2", tAddress) + local CinematicsFOV = HackTool:AddAddress("CinematicsFOV", tAddress) + Aspect_2:OffsetAddress(0x2F) + CinematicsFOV:OffsetAddress(0xd) + + print( Aspect_1:GetInfo(TYPE_ADDRESS) ) + print( Aspect_2:GetInfo(TYPE_ADDRESS) ) + print( CinematicsFOV:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+3117BA9 - F3 0F 10 05 73 38 C0 01 - movss xmm0,[JediSurvivor.exe+4D1B424] + --JediSurvivor.exe+3117BB1 - F3 0F 5E C1 - divss xmm0,xmm1 + --JediSurvivor.exe+3117BB5 - F3 0F 59 83 AC 09 00 00 - mulss xmm0,[rbx+000009AC] + --JediSurvivor.exe+3117BBD - E8 D1 26 A8 01 - call JediSurvivor.exe+4B9A293 + --JediSurvivor.exe+3117BC2 - F3 0F 59 05 36 B5 D5 01 - mulss xmm0,[JediSurvivor.exe+4E73100] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+2511F30 - 48 8B 05 B1 83 47 04 - mov rax,[JediSurvivor.exe+698A2E8] + --JediSurvivor.exe+2511F37 - 48 8B CB - mov rcx,rbx + --JediSurvivor.exe+2511F3A - 8B 78 04 - mov edi,[rax+04] + --JediSurvivor.exe+2511F3D - E8 4E CE 38 01 - call JediSurvivor.exe+389ED90 + --JediSurvivor.exe+2511F42 - 8B C8 - mov ecx,eax + end + + local tAddress = HackTool:AddAddress("CAMERA") + + if HackTool:SignatureScan("72 ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? F3 0F ?? ?? 0F 54",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+1A5DE3B - 72 0B - jb JediSurvivor.exe+1A5DE48 + --JediSurvivor.exe+1A5DE3D - 0F 28 F0 - movaps xmm6,xmm0 + --JediSurvivor.exe+1A5DE40 - F3 0F 5D 35 E8 D5 2B 03 - minss xmm6,[JediSurvivor.exe+4D1B430] + --JediSurvivor.exe+1A5DE48 - F3 0F 10 3D DC D5 2B 03 - movss xmm7,[JediSurvivor.exe+4D1B42C] + --JediSurvivor.exe+1A5DE50 - 0F 28 C6 - movaps xmm0,xmm6 + end + + local tAddress = HackTool:AddAddress("SHARPENING") + + if HackTool:SignatureScan("F3 44 ?? ?? ?? ?? 45 0F ?? ?? 73 ?? 45 0F ?? ?? EB ?? F3 44 0F ?? ?? ?? ?? ?? ?? F3",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+25B1200 - F3 0F 11 85 B8 06 00 00 - movss [rbp+000006B8],xmm0 + --JediSurvivor.exe+25B1208 - 48 8B 05 99 92 3E 04 - mov rax,[JediSurvivor.exe+699A4A8] + --JediSurvivor.exe+25B120F - F3 44 0F 10 60 04 - movss xmm12,[rax+04] + --JediSurvivor.exe+25B1215 - 45 0F 2F E2 - comiss xmm12,xmm10 + --JediSurvivor.exe+25B1219 - 73 06 - jae JediSurvivor.exe+25B1221 + end + + local tAddress = HackTool:AddAddress("FOG1") + + if HackTool:SignatureScan("75 ?? B3 ?? EB ?? 32 ?? 48 8B ?? ?? ?? 48 85 ?? 74 ?? E8 ?? ?? ?? ?? 84",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+233590D - 48 8B 05 64 2E 60 04 - mov rax,[JediSurvivor.exe+6938778] + --JediSurvivor.exe+2335914 - 83 78 04 01 - cmp dword ptr [rax+04],01 + --JediSurvivor.exe+2335918 - 75 04 - jne JediSurvivor.exe+233591E + --JediSurvivor.exe+233591A - B3 01 - mov bl,01 + --JediSurvivor.exe+233591C - EB 02 - jmp JediSurvivor.exe+2335920 + end + + local tAddress = HackTool:AddAddress("FOG2") + + if HackTool:SignatureScan("74 ?? F7 47 ?? ?? ?? ?? ?? 74 ?? 83 BB",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --JediSurvivor.exe+283AF1D - 74 41 - je JediSurvivor.exe+283AF60 + --JediSurvivor.exe+283AF1F - 83 3D 92 16 C8 03 00 - cmp dword ptr [JediSurvivor.exe+64BC5B8],00 + --JediSurvivor.exe+283AF26 - 74 38 - je JediSurvivor.exe+283AF60 + --JediSurvivor.exe+283AF28 - F7 47 2C 00 00 00 02 - test [rdi+2C],02000000 + --JediSurvivor.exe+283AF2F - 74 2F - je JediSurvivor.exe+283AF60 + end + + return true + +end + +function Enable_Inject() + local NearTo = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables",50) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CinematicsFOVIn") + Variables:PushFloat("CinematicsFOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AdditionalCinematicsFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("GameAspect") + Variables:PushFloat("Camera") + Variables:PushFloat("Sharpening") + + Variables:Allocate(NearTo) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["GameAspect"]:WriteFloat(0) + Variables["Camera"]:WriteFloat(fCamera) + Variables["Sharpening"]:WriteFloat(fSharpening) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)CinematicsFOV,CinematicsFOV_cc: + %originalcode% + movss [(allocation)Variables->CinematicsFOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalCinematicsFOV] $ctx=1 + movss [(allocation)Variables->CinematicsFOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT1,ASPECT1_cc: + fld dword ptr [$$2+4] $ctx=1 + fmul dword ptr [(allocation)Variables->ScreenRatio] + fstp dword ptr [(allocation)Variables->GameAspect] + $$0 $$1,[(allocation)Variables->GameAspect] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT2,ASPECT2_cc: + fld dword ptr [$$2+4] $ctx=1 + fmul dword ptr [(allocation)Variables->ScreenRatio] + fstp dword ptr [(allocation)Variables->GameAspect] + $$0 $$1,[(allocation)Variables->GameAspect] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)CAMERA,CAMERA_cc: + movss $$1,[(allocation)Variables->Camera] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)SHARPENING,SHARPENING_cc: + $$0 $$1,[(allocation)Variables->Sharpening] $ctx=1 + $$0 [$$2],$$1 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FOG1,FOG1_cc: + jmp $$1 $ctx=1 + %end% + + (codecave)FOG2,FOG2_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",NearTo) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("CinematicsFOV_cc",bCinematicsFOV) + Toggle_CodeCave("ASPECT1_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("CAMERA_cc",bCamera) + Toggle_CodeCave("SHARPENING_cc",bSharpening) + Toggle_CodeCave("FOG1_cc",bFog) + Toggle_CodeCave("FOG2_cc",bFog) + end + + Write_Camera() + Write_FOV() + Write_Cinematics_FOV() + Write_Sharpening() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fCinematicsFOVIn = Variables["CinematicsFOVIn"]:ReadFloat() + local fCinematicsFOVOut = Variables["CinematicsFOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Out : %.2f -- Cinematics FOV In: %.2f, Out: %.2f", fFOVIn, fFOVOut, fCinematicsFOVIn, fCinematicsFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function CinematicsFOVSlider_Changed(Sender) + + fAdditionalCinematicsFOV = Sender:GetPosition() - 20 + lblCinematicsFOVSlider.Caption:SetCaption( string.format("Cinematics FOV: %.0f",fAdditionalCinematicsFOV) ) + Write_Cinematics_FOV() + ForceUpdate() + +end + +function Write_Cinematics_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalCinematicsFOV"] then + if bFOV == true then + Variables["AdditionalCinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + else + Variables["AdditionalCinematicsFOV"]:WriteFloat(0) + end + end + +end + +function CAMERASlider_Changed(Sender) + + fCamera = Sender:GetPosition() + lblCAMERASlider.Caption:SetCaption( string.format("Value: %.2f",fCamera / 100) ) + Write_Camera() + ForceUpdate() + +end + +function Write_Camera() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["Camera"] then + if bCamera == true then + local Camera = fCamera / 100 + Variables["Camera"]:WriteFloat(Camera) + else + Variables["Camera"]:WriteFloat(0) + end + end + +end + +function SharpeningSlider_Changed(Sender) + + fSharpening = Sender:GetPosition() / 10 + lblSharpeningSlider.Caption:SetCaption( string.format("Value: %.2f",fSharpening) ) + Write_Sharpening() + ForceUpdate() + +end + +function Write_Sharpening() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["Sharpening"] then + if bSharpening == true then + Variables["Sharpening"]:WriteFloat(fSharpening) + else + Variables["Sharpening"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKCinematicsFOVFix_Changed(Sender) + + bCinematicsFOV = Toggle_CheckFix(Sender) + Write_Cinematics_FOV() + Toggle_CodeCave("CinematicsFOV_cc",bCinematicsFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT1_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKCAMERAFix_Changed(Sender) + + bCamera = Toggle_CheckFix(Sender) + Write_Camera() + Toggle_CodeCave("CAMERA_cc",bCamera) + ForceUpdate() + +end + +function CKSHARPENINGFix_Changed(Sender) + + bSharpening = Toggle_CheckFix(Sender) + Write_Sharpening() + Toggle_CodeCave("SHARPENING_cc",bSharpening) + ForceUpdate() + +end + +function CKFOGFix_Changed(Sender) + + bFog = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOG1_cc",bFog) + Toggle_CodeCave("FOG2_cc",bFog) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Starfield/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Starfield/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..a58bb4b Binary files /dev/null and b/PluginCache/K4sh/Modules/Starfield/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Starfield/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Starfield/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..2dc2018 Binary files /dev/null and b/PluginCache/K4sh/Modules/Starfield/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Starfield/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Starfield/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..f0742a0 Binary files /dev/null and b/PluginCache/K4sh/Modules/Starfield/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Starfield/Dependencies/Scripts/Starfield.lua b/PluginCache/K4sh/Modules/Starfield/Dependencies/Scripts/Starfield.lua new file mode 100644 index 0000000..6ece548 --- /dev/null +++ b/PluginCache/K4sh/Modules/Starfield/Dependencies/Scripts/Starfield.lua @@ -0,0 +1,620 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFPFOV = 0 +fAdditionalTPFOV = 0 +fAdditionalDialogFOV = 0 +fAdditionalWeaponFOV = 0 +fHUDSafeZoneX = 0 +fHUDSafeZoneY = 0 +Default_Auto = 2.388888836 +Default_FPFOV = 0 +Default_TPFOV = 0 +Default_Safe_Zone_X = 0 +Default_Safe_Zone_Y = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +--ControlVars +bFixEnabled = true +bFPFOV = false +bTPFOV = false +bDialogFOV = false +bWeaponFOV = false +bHUD = false +bAspect = false +bPhotoMode = true +AdditionalFPFOV = 1.0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "starfield.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 500 +SearchInterval = 2000 +SuspendThread = false + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFPFOVAdjustment_Enable","1st person FOV Adjustment","CKFPFOV_Changed",255,100,180,14) + DefaultControls.AddFixToggle("CKTPFOVAdjustment_Enable","3rd person FOV Adjustment","CKTPFOV_Changed",255,120,180,14) + DefaultControls.AddFixToggle("CKDIALOGFOVAdjustment_Enable","Dialog FOV Adjustment","CKDIALOGFOV_Changed",255,140,180,14) + DefaultControls.AddFixToggle("CKWEAPONFOVAdjustment_Enable","Weapon FOV Adjustment","CKWEAPONFOV_Changed",255,160,180,14) + DefaultControls.AddFixToggle("CKDisableLetterBox_Enable","Override aspect limitation","CKAspect_Changed",255,180,180,14) + DefaultControls.AddFixToggle("CKHUDSafeZone_Enable","HUD Safe zone adjustment","CKHUDSafeZone_Changed",255,200,180,14) + DefaultControls.AddFixToggle("CKPhotoMode_Enable","Disable photomode black bars","CKPhotoMode_Changed",255,220,190,14) + + DefaultControls.AddHeader("Header_FPFOV","1st person FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FPFOVSlider","FPFOVSlider_Changed",55,100,125,35,0,40,0,1) + + FPFOVSlider:SetTickFrequency(10) + FPFOVSlider:SetLabel1Text("0") + FPFOVSlider:SetLabel2Text("40") + + DefaultControls.AddHeader("Header_TPFOV","3rd person FOV Fine adjustment",15,155,210,17) + DefaultControls.AddFixedFOVSlider("TPFOVSlider","TPFOVSlider_Changed",55,185,125,35,0,90,0,1) + + TPFOVSlider:SetTickFrequency(10) + TPFOVSlider:SetLabel1Text("0") + TPFOVSlider:SetLabel2Text("90") + + DefaultControls.AddHeader("Header_WEAPONFOV","Weapon FOV Fine adjustment",15,270,210,17) + DefaultControls.AddFixedFOVSlider("WEAPONFOVSlider","WEAPONFOVSlider_Changed",55,300,125,35,0,50,0,1) + + WEAPONFOVSlider:SetTickFrequency(10) + WEAPONFOVSlider:SetLabel1Text("0") + WEAPONFOVSlider:SetLabel2Text("50") + + DefaultControls.AddHeader("Header_DIALOGFOV","Dialog FOV Fine adjustment",245,270,210,17) + DefaultControls.AddFixedFOVSlider("DIALOGFOVSlider","DIALOGFOVSlider_Changed",245,300,125,35,0,70,0,1) + + DIALOGFOVSlider:SetTickFrequency(10) + DIALOGFOVSlider:SetLabel1Text("0") + DIALOGFOVSlider:SetLabel2Text("70") + + DefaultControls.AddHeader("Header_SZONEX","HUD width scaling",15,360,210,17) + DefaultControls.AddFixedFOVSlider("SZONEXFOVSlider","SZONEXFOVSlider_Changed",55,390,125,35,0,80,0,1) + + SZONEXFOVSlider:SetTickFrequency(10) + SZONEXFOVSlider:SetLabel1Text("0") + SZONEXFOVSlider:SetLabel2Text("80") + + DefaultControls.AddHeader("Header_SZONEY","HUD height scaling",245,360,210,17) + DefaultControls.AddFixedFOVSlider("SZONEYFOVSlider","SZONEYFOVSlider_Changed",245,390,125,35,0,80,0,1) + + SZONEYFOVSlider:SetTickFrequency(10) + SZONEYFOVSlider:SetLabel1Text("0") + SZONEYFOVSlider:SetLabel2Text("80") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FPFOV") + if HackTool:SignatureScan("E8 ?? ?? ?? ?? C4 C1 ?? ?? ?? ?? ?? ?? ?? B1 ?? E8",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+2873F25 - 48 8B CE - mov rcx,rsi + --Starfield.exe+2873F28 - E8 73 EE FF FF - call Starfield.exe+2872DA0 + --Starfield.exe+2873F2D - E8 EA 3A 71 FF - call Starfield.exe+1F87A1C + --Starfield.exe+2873F32 - C4 C1 7A 11 86 60 02 00 00 - vmovss [r14+00000260],xmm0 + --Starfield.exe+2873F3B - 48 8B CE - mov rcx,rsi + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("TPFOV") + if HackTool:SignatureScan("E8 ?? ?? ?? ?? C4 C1 ?? ?? ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? C5 ?? ?? ?? 48 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+2883593 - E8 5C E1 FF FF - call Starfield.exe+28816F4 + --Starfield.exe+2883598 - B1 01 - mov cl,01 + --Starfield.exe+288359A - E8 E9 44 70 FF - call Starfield.exe+1F87A88 + --Starfield.exe+288359F - C4 C1 7A 11 86 60 02 00 00 - vmovss [r14+00000260],xmm0 + --Starfield.exe+28835A8 - E8 B3 CD FF FF - call Starfield.exe+2880360 + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("WeaponFOV") + if HackTool:SignatureScan("80 3D ?? ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? C5 FA",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+1F817A2 - E8 65 92 8E 00 - call Starfield.exe+286AA0C + --Starfield.exe+1F817A7 - 80 3D CA F5 98 03 00 - cmp byte ptr [Starfield.exe+5910D78],00 + --Starfield.exe+1F817AE - 48 8B 05 23 C9 76 03 - mov rax,[Starfield.exe+56EE0D8] + --Starfield.exe+1F817B5 - C5 FA 11 80 D8 02 00 00 - vmovss [rax+000002D8],xmm0 + --Starfield.exe+1F817BD - 48 8B 05 DC 31 9B 03 - mov rax,[Starfield.exe+59349A0] + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("Aspect") + if HackTool:SignatureScan("C5 FA ?? ?? ?? ?? ?? ?? C5 FA ?? ?? ?? ?? ?? ?? C5 F8 ?? ?? 76 ?? C5 E2 ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+2DFE45F - C5 F8 28 C1 - vmovaps xmm0,xmm1 + --Starfield.exe+2DFE463 - EB 10 - jmp Starfield.exe+2DFE475 + --Starfield.exe+2DFE465 - C5 FA 10 0D C3 3B 7E 02 - vmovss xmm1,[Starfield.exe+55E2030] + --Starfield.exe+2DFE46D - C5 FA 10 05 DB 3B 7E 02 - vmovss xmm0,[Starfield.exe+55E2050] + --Starfield.exe+2DFE475 - C5 F8 2F D1 - vcomiss xmm2,xmm1 + print( tAddress:GetInfo(TYPE_ADDRESS) ) + tAddress:AcquireAddress(0x4) + print( tAddress:GetInfo(TYPE_FLOAT) ) + Default_Auto = tAddress:ReadFloat() + tAddress:SetAutoUnprotect(true) + end + + local tAddress = HackTool:AddAddress("DialogFOV") + if HackTool:SignatureScan("74 ?? C5 FA ?? ?? ?? ?? ?? ?? E9 ?? ?? ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+1A55802 - C5 FA 11 85 A8 01 00 00 - vmovss [rbp+000001A8],xmm0 + --Starfield.exe+1A5580A - F6 87 A4 00 00 00 08 - test byte ptr [rdi+000000A4],08 + --Starfield.exe+1A55811 - 74 0D - je Starfield.exe+1A55820 + --Starfield.exe+1A55813 - C5 FA 10 35 4D 06 B1 03 - vmovss xmm6,[Starfield.exe+5565E68] + --Starfield.exe+1A5581B - E9 C9 00 00 00 - jmp Starfield.exe+1A558E9 + local DialogFOV_1 = HackTool:AddAddress("DialogFOV_1", tAddress) + local DialogFOV_2 = HackTool:AddAddress("DialogFOV_2", tAddress) + DialogFOV_1:OffsetAddress(0xa) + + print( DialogFOV_1:GetInfo(TYPE_ADDRESS) ) + print( DialogFOV_2:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("SafeZone") + if HackTool:SignatureScan("C5 F8 ?? ?? ?? ?? ?? ?? 76 ?? C4 E1",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+2E70AE8 - C5 F8 2F 0D A8 01 92 01 - vcomiss xmm1,[Starfield.exe+4790C98] + --Starfield.exe+2E70AF0 - 76 14 - jna Starfield.exe+2E70B06 + --Starfield.exe+2E70AF2 - C4 E1 FA 2C 0D 85 50 77 02 - vcvttss2si rcx,[Starfield.exe+55E5B80] + --Starfield.exe+2E70AFB - C4 E1 FA 2C 15 9C 50 77 02 - vcvttss2si rdx,[Starfield.exe+55E5BA0] + --Starfield.exe+2E70B04 - EB 12 - jmp Starfield.exe+2E70B18 + + local SafeZoneX = HackTool:AddAddress("SafeZoneX", tAddress) + local SafeZoneY = HackTool:AddAddress("SafeZoneY", tAddress) + SafeZoneY:OffsetAddress(0x9) + + print( SafeZoneX:GetInfo(TYPE_ADDRESS) ) + SafeZoneX:AcquireAddress(0x5) + print( SafeZoneX:GetInfo(TYPE_FLOAT) ) + Default_Safe_Zone_X = SafeZoneX:ReadFloat() + SafeZoneX:SetAutoUnprotect(true) + + print( SafeZoneY:GetInfo(TYPE_ADDRESS) ) + SafeZoneY:AcquireAddress(0x5) + print( SafeZoneY:GetInfo(TYPE_FLOAT) ) + Default_Safe_Zone_Y = SafeZoneY:ReadFloat() + SafeZoneY:SetAutoUnprotect(true) + end + + local tAddress = HackTool:AddAddress("PhotoMode") + if HackTool:SignatureScan("C7 47 ?? ?? ?? ?? ?? C6 ?? ?? ?? EB ?? 38",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --Starfield.exe+2E79A9E - 48 8B 0D 33 46 87 02 - mov rcx,[Starfield.exe+56EE0D8] + --Starfield.exe+2E79AA5 - 48 83 C1 08 - add rcx,08 + --Starfield.exe+2E79AA9 - C7 41 44 39 8E E3 3F - mov [rcx+44],3FE38E39 + --Starfield.exe+2E79AB0 - C6 41 42 01 - mov byte ptr [rcx+42],01 + --Starfield.exe+2E79AB4 - EB 16 - jmp Starfield.exe+2E79ACC + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVFP_In") + Variables:PushFloat("FOVFP_Out") + Variables:PushFloat("FOVTP_In") + Variables:PushFloat("FOVTP_Out") + Variables:PushFloat("FOVDialog_In") + Variables:PushFloat("FOVDialog_Out") + Variables:PushFloat("FOVWeapon_In") + Variables:PushFloat("FOVWeapon_Out") + Variables:PushFloat("AdditionalFPFOV") + Variables:PushFloat("AdditionalTPFOV") + Variables:PushFloat("AdditionalDialogFOV") + Variables:PushFloat("AdditionalWeaponFOV") + Variables:PushFloat("AspectRatio") + Variables:Allocate() + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + + ResolutionChanged() + + + asm = [[ + + (codecave:jmp)FPFOV,FPFOV_cc: + %originalcode% + movss [(allocation)Variables->FOVFP_In],xmm0 + addss xmm0, [(allocation)Variables->AdditionalFPFOV] + movss [(allocation)Variables->FOVFP_Out],xmm0 + jmp %returnaddress% + %end% + + (codecave:jmp)TPFOV,TPFOV_cc: + %originalcode% + movss [(allocation)Variables->FOVTP_In],xmm0 + addss xmm0, [(allocation)Variables->AdditionalTPFOV] + movss [(allocation)Variables->FOVTP_Out],xmm0 + jmp %returnaddress% + %end% + + (codecave:jmp)WeaponFOV,WeaponFOV_cc: + movss [(allocation)Variables->FOVWeapon_In],xmm0 + addss xmm0, [(allocation)Variables->AdditionalWeaponFOV] + movss [(allocation)Variables->FOVWeapon_Out],xmm0 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)PhotoMode,PhotoMode_cc: + fld dword ptr [(allocation)Variables->AspectRatio] + fstp dword ptr [$$1] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)DialogFOV_1,DialogFOV_1_cc: + movss [(allocation)Variables->FOVDialog_In],xmm6 + addss xmm6, [(allocation)Variables->AdditionalDialogFOV] + movss [(allocation)Variables->FOVDialog_Out],xmm6 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DialogFOV_2,DialogFOV_2_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FPFOV_cc",bFPFOV) + Toggle_CodeCave("TPFOV_cc",bTPFOV) + Toggle_CodeCave("DialogFOV_1_cc",bDialogFOV) + Toggle_CodeCave("DialogFOV_2_cc",bDialogFOV) + Toggle_CodeCave("WeaponFOV_cc",bWeaponFOV) + Toggle_CodeCave("PhotoMode_cc",bPhotoMode) + end + + if bFPFOV == true then + WriteFPFOV() + end + + if bTPFOV == true then + WriteTPFOV() + end + + if bDialogFOV == true then + WriteDialogFOV() + end + + WriteWeaponFOV() + + if bAspect == true then + WriteAspectRatio() + end + + if bHUD == true then + WriteHUDSafeZone() + end + +end + +function Periodic() + + PluginViewport:AppendStatusMessage( "\r\n" ) + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVFP_In"] then + if bFPFOV or bTPFOV == true then + PluginViewport:AppendStatusMessage( string.format("1st person FOV In=%.2f, Out=%.2f -- 3rd person FOV In=%.2f, Out=%.2f\r\nDialog FOV In=%.2f, Out=%.2f -- Weapon FOV In=%.2f, Out=%.2f", Variables["FOVFP_In"]:ReadFloat(), Variables["FOVFP_Out"]:ReadFloat(), Variables["FOVTP_In"]:ReadFloat(), Variables["FOVTP_Out"]:ReadFloat(), Variables["FOVDialog_In"]:ReadFloat(), Variables["FOVDialog_Out"]:ReadFloat(), Variables["FOVWeapon_In"]:ReadFloat(), Variables["FOVWeapon_Out"]:ReadFloat()) ) + end + end + +end + +function Disable_Inject() + + if bFPFOV == true then + RestoreFPFOV() + end + + if bTPFOV == true then + RestoreTPFOV() + end + + if bAspect == true then + RestoreAspectDefaults() + end + + CleanUp() + +end + +function FPFOVSlider_Changed(Sender) + + fAdditionalFPFOV = Sender:GetPosition() + lblFPFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFPFOV) ) + + if bFPFOV == true then + WriteFPFOV() + end + + ForceUpdate() + +end + +function TPFOVSlider_Changed(Sender) + + fAdditionalTPFOV = Sender:GetPosition() + lblTPFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalTPFOV) ) + + if bTPFOV == true then + WriteTPFOV() + end + + ForceUpdate() + +end + +function WEAPONFOVSlider_Changed(Sender) + + fAdditionalWeaponFOV = Sender:GetPosition() + lblWEAPONFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalWeaponFOV) ) + + if bWeaponFOV == true then + WriteWeaponFOV() + end + + ForceUpdate() + +end + +function DIALOGFOVSlider_Changed(Sender) + + fAdditionalDialogFOV = Sender:GetPosition() + lblDIALOGFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalDialogFOV) ) + + if bDialogFOV == true then + WriteDialogFOV() + end + + ForceUpdate() + +end + +function SZONEXFOVSlider_Changed(Sender) + + fHUDSafeZoneX = Sender:GetPosition() + lblSZONEXFOVSlider.Caption:SetCaption( string.format("Value: %.0f%%",fHUDSafeZoneX) ) + + if bHUD == true then + WriteHUDSafeZone() + end + + ForceUpdate() + +end + +function SZONEYFOVSlider_Changed(Sender) + + fHUDSafeZoneY = Sender:GetPosition() + lblSZONEYFOVSlider.Caption:SetCaption( string.format("Value: %.0f%%",fHUDSafeZoneY) ) + + if bHUD == true then + WriteHUDSafeZone() + end + + ForceUpdate() + +end + +function CKFPFOV_Changed(Sender) + + bFPFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FPFOV_cc",bFPFOV) + ForceUpdate() + +end + +function CKTPFOV_Changed(Sender) + + bTPFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("TPFOV_cc",bTPFOV) + ForceUpdate() + +end + +function CKWEAPONFOV_Changed(Sender) + + bWeaponFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("WeaponFOV_cc",bWeaponFOV) + ForceUpdate() + +end + +function CKDIALOGFOV_Changed(Sender) + + bDialogFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("DialogFOV_1_cc",bDialogFOV) + Toggle_CodeCave("DialogFOV_2_cc",bDialogFOV) + ForceUpdate() + +end + +function CKAspect_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + + if bAspect == false then + RestoreAspectDefaults() + else + WriteAspectRatio() + end + + ForceUpdate() + +end + +function CKHUDSafeZone_Changed(Sender) + + bHUD = Toggle_CheckFix(Sender) + + if bHUD == false then + RestoreHUDDefaults() + else + WriteHUDSafeZone() + end + + ForceUpdate() + +end + +function CKPhotoMode_Changed(Sender) + + bPhotoMode = Toggle_CheckFix(Sender) + Toggle_CodeCave("PhotoMode_cc",bPhotoMode) + ForceUpdate() + +end + +function ResolutionChanged() + + fAspectRatio = DisplayInfo:GetAspectRatio() + if bAspect == true then + WriteAspectRatio() + end + +end + +function WriteAspectRatio() + + local AspectRatio = HackTool:GetAddress("Aspect") + if AspectRatio then + AspectRatio:WriteFloat(fAspectRatio) + print("Updated aspect ratio") + end + +end + +function RestoreAspectDefaults() + + local AspectRatio = HackTool:GetAddress("Aspect") + + if AspectRatio then + AspectRatio:WriteFloat(Default_Auto) + print("Restored aspect ratio default") + end + +end + +function WriteHUDSafeZone() + + local HUDSafeZoneX = HackTool:GetAddress("SafeZoneX") + local HUDSafeZoneY = HackTool:GetAddress("SafeZoneY") + local fSaveZoneX = (DisplayInfo:GetWidth() / 2) * (fHUDSafeZoneX / 100) + local fSaveZoneY = (DisplayInfo:GetHeight() / 2) * (fHUDSafeZoneY / 100) + if HUDSafeZoneX and HUDSafeZoneY then + HUDSafeZoneX:WriteFloat(fSaveZoneX) + HUDSafeZoneY:WriteFloat(fSaveZoneY) + end + +end + +function RestoreHUDDefaults() + + local HUDSafeZoneX = HackTool:GetAddress("SafeZoneX") + local HUDSafeZoneY = HackTool:GetAddress("SafeZoneY") + + if HUDSafeZoneX and HUDSafeZoneY then + HUDSafeZoneX:WriteFloat(Default_Safe_Zone_X) + HUDSafeZoneY:WriteFloat(Default_Safe_Zone_Y) + end + +end + +function WriteFPFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFPFOV"] then + Variables["AdditionalFPFOV"]:WriteFloat(fAdditionalFPFOV) + end + +end + +function WriteTPFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalTPFOV"] then + Variables["AdditionalTPFOV"]:WriteFloat(fAdditionalTPFOV) + end + +end + +function WriteDialogFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalDialogFOV"] then + Variables["AdditionalDialogFOV"]:WriteFloat(fAdditionalDialogFOV) + end + +end + +function WriteWeaponFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalWeaponFOV"] then + Variables["AdditionalWeaponFOV"]:WriteFloat(fAdditionalWeaponFOV) + end + +end + +function RestoreFPFOV() + + local FPFOV = HackTool:GetAddress("FPFOV") + + if FPFOV then + FPFOV:WriteFloat(Default_FPFOV) + end + +end + +function RestoreTPFOV() + + local TPFOV = HackTool:GetAddress("TPFOV") + + if TPFOV then + TPFOV:WriteFloat(Default_TPFOV) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..76e6ef8 Binary files /dev/null and b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..a0c6e55 Binary files /dev/null and b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..866fba5 Binary files /dev/null and b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Scripts/StillWakesTheDeep.lua b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Scripts/StillWakesTheDeep.lua new file mode 100644 index 0000000..759d80a --- /dev/null +++ b/PluginCache/K4sh/Modules/StillWakesTheDeep/Dependencies/Scripts/StillWakesTheDeep.lua @@ -0,0 +1,272 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fDefaultAspectRatio = 1.777777791 +--fDefaultAspectRatio = 1.33333 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bFringe = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "StillWakesTheDeep.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Hellblade2-Win64-Shipping.exe+3451CA4 - 48 8B 01 - mov rax,[rcx] + --Hellblade2-Win64-Shipping.exe+3451CA7 - FF 90 58 07 00 00 - call qword ptr [rax+00000758] + --Hellblade2-Win64-Shipping.exe+3451CAD - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Hellblade2-Win64-Shipping.exe+3451CB2 - 48 83 C4 28 - add rsp,28 + --Hellblade2-Win64-Shipping.exe+3451CB6 - C3 - ret + end + + local tResultCount = HackTool:SignatureScanMulti("48 89 ?? ?? ?? 57 48 83 ?? ?? 0F ?? ?? 48 8B ?? 48 8B FA 0F ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ??","ASPECTS",PAGE_EXECUTE_READ,0x59,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find ASPECTS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("ASPECT", HackTool:GetAddress( string.format("ASPECTS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --StillWakesTheDeep.exe+2BD7543 - 89 41 44 - mov [rcx+44],eax + --StillWakesTheDeep.exe+2BD7546 - 8B 42 48 - mov eax,[rdx+48] + --StillWakesTheDeep.exe+2BD7549 - 89 41 48 - mov [rcx+48],eax + --StillWakesTheDeep.exe+2BD754C - 48 8D 42 4C - lea rax,[rdx+4C] + --StillWakesTheDeep.exe+2BD7550 - 48 83 C1 4C - add rcx,4C + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --StillWakesTheDeep.exe+348DAC5 - 48 8B 05 74 E7 D6 05 - mov rax,[StillWakesTheDeep.exe+91FC240] + --StillWakesTheDeep.exe+348DACC - 39 30 - cmp [rax],esi + --StillWakesTheDeep.exe+348DACE - 7F 06 - jg StillWakesTheDeep.exe+348DAD6 + --StillWakesTheDeep.exe+348DAD0 - 89 B3 EC 1E 00 00 - mov [rbx+00001EEC],esi + --StillWakesTheDeep.exe+348DAD6 - 8B 04 2F - mov eax,[rdi+rbp] + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushInt("Aspect") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + cmp dword ptr [(allocation)Variables->Aspect],1 + jne regularFOV + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + regularFOV: + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("FRINGE_cc",bFringe) + end + + Write_FOV() + Write_AspectRatio() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] and Variables["CompensatedFOV"] and Variables["FOVIn"] then + if bAspect == false then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + Variables["CompensatedFOV"]:WriteFloat(fFOVIn) + Variables["Aspect"]:WriteInt(0) + else + Variables["Aspect"]:WriteInt(1) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Write_AspectRatio() + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/Stray/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Stray/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..8160353 Binary files /dev/null and b/PluginCache/K4sh/Modules/Stray/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Stray/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Stray/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..c8a47b1 Binary files /dev/null and b/PluginCache/K4sh/Modules/Stray/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Stray/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Stray/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..8eec954 Binary files /dev/null and b/PluginCache/K4sh/Modules/Stray/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Stray/Dependencies/Scripts/Stray.lua b/PluginCache/K4sh/Modules/Stray/Dependencies/Scripts/Stray.lua new file mode 100644 index 0000000..3773998 --- /dev/null +++ b/PluginCache/K4sh/Modules/Stray/Dependencies/Scripts/Stray.lua @@ -0,0 +1,352 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fDefaultAspectRatio = 1.777777791 +fAdditionalFOV = 0 +fAspectRatio = fDefaultAspectRatio +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 100 + +--ControlVars +bFixEnabled = true +bFOV = true +bPillarBoxing = true +bAspect = true +bDOF = true +bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Stray-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,80,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+60") + + DefaultControls.AddHeader("Header_HUD_SZ_LEFT","HUD safe zone left",15,190,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_LEFT","HUDSZLSlider_Changed",55,220,125,35,0,40,0,1) + HUD_SZ_LEFT:SetTickFrequency(5) + HUD_SZ_LEFT:SetLabel1Text("0") + HUD_SZ_LEFT:SetLabel2Text("40") + DefaultControls.AddHeader("Header_HUDSZRIGHT","HUD safe zone right",245,190,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_RIGHT","HUDSZRSlider_Changed",285,220,125,35,0,40,0,1) + HUD_SZ_RIGHT:SetTickFrequency(5) + HUD_SZ_RIGHT:SetLabel1Text("0") + HUD_SZ_RIGHT:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Cutscenes letterbox fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? 48 ?? ?? ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? B8 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x10,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Stray-Win64-Shipping.exe+2D90AFA - 48 8D 54 24 30 - lea rdx,[rsp+30] + --Stray-Win64-Shipping.exe+2D90AFF - FF 90 70 06 00 00 - call qword ptr [rax+00000670] + --Stray-Win64-Shipping.exe+2D90B05 - F3 0F 10 70 18 - movss xmm6,[rax+18] + --Stray-Win64-Shipping.exe+2D90B0A - B8 01 00 00 00 - mov eax,00000001 + --Stray-Win64-Shipping.exe+2D90B0F - A8 01 - test al,01 + end + + + --local tAddress = HackTool:AddAddress("Aspect") + --if HackTool:SignatureScan("C3 CC 48 89 ?? ?? ?? 57 48 83 ?? ?? F2 0F ?? ?? 48 8B ?? F2 0F ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 0F ?? ?? ?? F2 0F ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x4e,Process_EXEName) == 0 then + -- return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + --else + -- print( tAddress:GetInfo(TYPE_ADDRESS) ) + --end + + local tAddress = HackTool:AddAddress("Aspect2") + if HackTool:SignatureScan("CC CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ??",tAddress,PAGE_EXECUTE_READ,0x51,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + + -- Reference search for DOF F7 ?? ?? ?? ?? ?? ?? 74 ?? 48 8B ?? ?? ?? ?? ?? 83 78 04 00 + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("48 8B ?? ?? ?? ?? ?? 48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + if HackTool:SignatureScan("48 ?? ?? 48 ?? ?? 66 48 ?? ?? ?? FF ?? 48 8B ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x18,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Stray-Win64-Shipping.exe+27357E1 - 0F 10 00 - movups xmm0,[rax] + --Stray-Win64-Shipping.exe+27357E4 - 48 8B C7 - mov rax,rdi + --Stray-Win64-Shipping.exe+27357E7 - 0F 11 07 - movups [rdi],xmm0 + --Stray-Win64-Shipping.exe+27357EA - 48 83 C4 30 - add rsp,30 + --Stray-Win64-Shipping.exe+27357EE - 5F - pop rdi + end + + return true + +end + + +function Enable_Inject() + + if bAspect == true then + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + end + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("ScreenAspect") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["DefaultAspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["ScreenAspect"]:WriteFloat(DisplayInfo:GetWidth() / DisplayInfo:GetHeight()) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + + ResolutionChanged() + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->AspectRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + $$0 $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)Aspect2,Aspect2_cc: + $$0 $$2,[(allocation)Variables->ScreenAspect] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 edi,0 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + %originalcode% + $$0 $$2,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 ; Will copy all safe zone offsets + $$0 [$$1],$$2 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("Aspect2_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + end + + Write_FOV() + Write_HUD_Safe_Zone_Left() + Write_HUD_Safe_Zone_Right() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Compensated: %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("Aspect2_cc",bAspect) + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + + if bAspect == false then + fAspectRatio = fDefaultAspectRatio + end + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AspectRatio"] then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function HUDSZLSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + lblHUD_SZ_LEFT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone_Left() + ForceUpdate() + +end + +function HUDSZRSlider_Changed(Sender) + + fHUDSafeZoneRight = Sender:GetPosition() + lblHUD_SZ_RIGHT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZoneRight) ) + Write_HUD_Safe_Zone_Right() + ForceUpdate() + +end + +function Write_HUD_Safe_Zone_Left() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + end + +end + +function Write_HUD_Safe_Zone_Right() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TLOU/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TLOU/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..4361306 Binary files /dev/null and b/PluginCache/K4sh/Modules/TLOU/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TLOU/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TLOU/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..80e16e7 Binary files /dev/null and b/PluginCache/K4sh/Modules/TLOU/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TLOU/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TLOU/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..88ec4a3 Binary files /dev/null and b/PluginCache/K4sh/Modules/TLOU/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TLOU/Dependencies/Scripts/TLOU.lua b/PluginCache/K4sh/Modules/TLOU/Dependencies/Scripts/TLOU.lua new file mode 100644 index 0000000..dc18933 --- /dev/null +++ b/PluginCache/K4sh/Modules/TLOU/Dependencies/Scripts/TLOU.lua @@ -0,0 +1,240 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fDefaultAspectRatio = 1.7777778 +fAdditionalFOV = 0 +fFOV = 0 +fSharpening = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bTAA = true +bSharpening = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "tlou-i.exe;tlou-i-l.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + --DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKTAAFix_Enable","TAA disabling","CKTAAFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("C5 F8 ?? ?? ?? ?? ?? ?? ?? 88 83 ?? ?? ?? ?? C5 F8",tAddress,PAGE_EXECUTE_READ,0x09,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-i.exe+59EDFF - C5 FC 11 83 D0 02 00 00 - vmovups [rbx+000002D0],ymm0 + --tlou-i.exe+59EE07 - C5 F8 10 84 24 A4 00 00 00 - vmovups xmm0,[rsp+000000A4] + --tlou-i.exe+59EE10 - 88 83 F0 02 00 00 - mov [rbx+000002F0],al + --tlou-i.exe+59EE16 - C5 F8 11 83 F4 02 00 00 - vmovups [rbx+000002F4],xmm0 + --tlou-i.exe+59EE1E - C5 F8 10 05 EA 02 8D 02 - vmovups xmm0,[tlou-i.exe+2E6F110] + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("TAA1") + + if HackTool:SignatureScan("41 ?? ?? E8 ?? ?? ?? ?? 4C ?? ?? ?? 38 98 ?? ?? ?? ?? 74 ?? 49 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x22,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-i.exe+1193323 - E8 FC 45 FF FF - call tlou-i.exe+1187924 + --tlou-i.exe+1193328 - 84 C0 - test al,al + --tlou-i.exe+119332A - 74 08 - je tlou-i.exe+1193334 + --tlou-i.exe+119332C - 41 8A C7 - mov al,r15l + --tlou-i.exe+119332F - EB 05 - jmp tlou-i.exe+1193336 + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("TAA2") + + if HackTool:SignatureScan("41 ?? ?? E8 ?? ?? ?? ?? 4C ?? ?? ?? 38 98 ?? ?? ?? ?? 74 ?? 49 8D ?? ?? ?? ?? ?? E8 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x24,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-i.exe+119332C - 41 8A C7 - mov al,r15l + --tlou-i.exe+119332F - EB 05 - jmp tlou-i.exe+1193336 + --tlou-i.exe+1193331 - 44 8A FB - mov r15l,bl + --tlou-i.exe+1193334 - 8A C3 - mov al,bl + --tlou-i.exe+1193336 - 41 88 86 91 5A 01 00 - mov [r14+00015A91],al + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("TAA3") + + if HackTool:SignatureScan("C4 63 ?? ?? ?? ?? C5 ?? ?? ?? E8 ?? ?? ?? ?? 44 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x0f,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-i.exe+402385 - C5 C0 57 FF - vxorps xmm7,xmm7,xmm7 + --tlou-i.exe+402389 - E8 F2 28 AD 01 - call tlou-i.exe+1ED4C80 + --tlou-i.exe+40238E - 44 0F B6 F8 - movzx r15d,al + --tlou-i.exe+402392 - C5 C8 57 F6 - vxorps xmm6,xmm6,xmm6 + --tlou-i.exe+402396 - 84 C0 - test al,al + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("Sharpening") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + pushf + vmovss xmm15,xmm0,xmm0 ; Save FOV In + vaddss xmm0,xmm0,[(allocation)Variables->AdditionalFOV] + cmp r14,1 + jne exit + vmovss [(allocation)Variables->FOVIn],xmm15 + vmovss [(allocation)Variables->FOVOut],xmm0 + + exit: + popf + jmp %returnaddress% + %end% + + (codecave)TAA1,TAA1_cc: + nop + nop + %end% + + (codecave)TAA2,TAA2_cc: + xor al,al + nop + %end% + + (codecave)TAA3,TAA3_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("TAA1_cc",bTAA) + Toggle_CodeCave("TAA2_cc",bTAA) + Toggle_CodeCave("TAA3_cc",bTAA) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + if fFOVIn < 160 then + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, FOV Out : %.2f", fFOVIn, fFOVOut)) + else + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: 0, FOV Out : 0", fFOVIn, fFOVOut)) + end + end +end + +function FOVSlider_Changed(Sender) + + fFOV = Sender:GetPosition() - 20 --(Sender:GetScaledFloat(3)) + 18.33 + if fFOV > 0 then + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.2f",fFOV) ) + else + lblFOVSlider.Caption:SetCaption( string.format("Value: %.2f",fFOV) ) + end + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKTAAFix_Changed(Sender) + + bTAA = Toggle_CheckFix(Sender) + Toggle_CodeCave("TAA1_cc",bTAA) + Toggle_CodeCave("TAA2_cc",bTAA) + Toggle_CodeCave("TAA3_cc",bTAA) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/TLOU2/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..540b73c Binary files /dev/null and b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TLOU2/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..96de8b4 Binary files /dev/null and b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TLOU2/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..3b422f7 Binary files /dev/null and b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TLOU2/Dependencies/Scripts/TLOU2.lua b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Scripts/TLOU2.lua new file mode 100644 index 0000000..34a1c1e --- /dev/null +++ b/PluginCache/K4sh/Modules/TLOU2/Dependencies/Scripts/TLOU2.lua @@ -0,0 +1,313 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fAdditionalFOV = 0 +fFOV = 0 +fCameraDistance = 1 +fSharpness = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bCamera = true +bSharpness = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "tlou-ii.exe;tlou-ii-l.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(7) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddHeader("Header_CAMERADISTANCE","Camera distance adjustment",15,165,210,17) + DefaultControls.AddFixedFOVSlider("CAMERADISSTANCESlider","CAMERADISTANCESlider_Changed",55,195,125,35,0,30,0,1) + CAMERADISSTANCESlider:SetTickFrequency(5) + CAMERADISSTANCESlider:SetLabel1Text("0") + CAMERADISSTANCESlider:SetLabel2Text("3") + + DefaultControls.AddHeader("Header_SHARPNESS","Sharpness fine adjustment",15,260,210,17) + DefaultControls.AddFixedFOVSlider("SHARPNESSSlider","SHARPNESSSlider_Changed",55,290,125,35,0,30,0,1) + SHARPNESSSlider:SetTickFrequency(5) + SHARPNESSSlider:SetLabel1Text("0") + SHARPNESSSlider:SetLabel2Text("3") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCAMERADISTANCEFix_Enable","Camera fix","CKCAMERADISTANCEFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKSHARPNESSFix_Enable","Sharpness fix","CKSHARPNESSFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E8 ?? ?? ?? ?? C5 FA ?? ?? ?? ?? ?? ?? C5 F8 ?? ?? E8 ?? ?? ?? ?? C5 7A",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-ii.exe+1473C35 - C5 F8 11 41 10 - vmovups [rcx+10],xmm0 + --tlou-ii.exe+1473C3A - 48 8B CA - mov rcx,rdx + --tlou-ii.exe+1473C3D - E8 3E AF 21 00 - call "tlou-ii.exe"+168EB80 + --tlou-ii.exe+1473C42 - C5 FA 10 35 E6 11 6A 01 - vmovss xmm6,["tlou-ii.exe"+2B14E30] + --tlou-ii.exe+1473C4A - C5 F8 28 CE - vmovaps xmm1,xmm6 + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("CAMERADISTANCE") + + if HackTool:SignatureScan("C5 FA ?? ?? ?? ?? ?? ?? C5 FA ?? ?? ?? C5 22 ?? ?? ?? C4 C1 ?? ?? ?? C5 FA ?? ?? ?? C5 7A",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-ii.exe+1ED0467 - C5 FA 11 56 0C - vmovss [rsi+0C],xmm2 + --tlou-ii.exe+1ED046C - 48 8B 07 - mov rax,[rdi] + --tlou-ii.exe+1ED046F - C5 FA 10 05 21 52 95 01 - vmovss xmm0,["tlou-ii.exe"+3825698] + --tlou-ii.exe+1ED0477 - C5 FA 59 48 20 - vmulss xmm1,xmm0,[rax+20] + --tlou-ii.exe+1ED047C - C5 22 59 48 24 - vmulss xmm9,xmm11,[rax+24] + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("SHARPNESS") + + if HackTool:SignatureScan("C5 FA ?? ?? ?? ?? ?? ?? 8B 86 ?? ?? ?? ?? 89 87 ?? ?? ?? ?? 0F B6 ?? ?? ?? ?? ?? 89",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --tlou-ii.exe+147163A - C5 F9 76 D1 - vpcmpeqd xmm2,xmm0,xmm1 + --tlou-ii.exe+147163E - C4 C3 51 4A C5 20 - vblendvps xmm0,xmm5,xmm13,xmm2 + --tlou-ii.exe+1471644 - C5 FA 11 87 C4 02 00 00 - vmovss [rdi+000002C4],xmm0 + --tlou-ii.exe+147164C - 8B 86 18 1B 00 00 - mov eax,[rsi+00001B18] + --tlou-ii.exe+1471652 - 89 87 C8 02 00 00 - mov [rdi+000002C8],eax + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + + return true +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("CameraDistance") + Variables:PushFloat("Sharpness") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["CameraDistance"]:WriteFloat(fCameraDistance) + Variables["Sharpness"]:WriteFloat(fSharpness) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + comiss xmm0,xmm15 + jne exit + vmovss [(allocation)Variables->FOVIn],xmm0 + vaddss xmm0,xmm0,[(allocation)Variables->AdditionalFOV] + vmovss [(allocation)Variables->FOVOut],xmm0 + exit: + jmp %returnaddress% + %end% + + (codecave:jmp)CAMERADISTANCE,CAMERADISTANCE_cc: + $$0 $$1,[(allocation)Variables->CameraDistance] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)SHARPNESS,SHARPNESS_cc: + $$0 $$2,[(allocation)Variables->Sharpness] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + RemoveAVXInstructions() + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + RestoreAVXInstructions() + return ErrorOccurred("Assembly compilation failed...") + else + RestoreAVXInstructions() + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("CAMERADISTANCE_cc",bCamera) + Toggle_CodeCave("SHARPNESS_cc",bSharpness) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + if fFOVIn < 160 then + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, FOV Out : %.2f", fFOVIn, fFOVOut)) + else + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: 0, FOV Out : 0", fFOVIn, fFOVOut)) + end + end +end + +function FOVSlider_Changed(Sender) + + fFOV = Sender:GetPosition() - 20 + if fFOV > 0 then + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV: +%.2f",fFOV) ) + else + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV: %.2f",fFOV) ) + end + Write_FOV() + ForceUpdate() + +end + +function CAMERADISTANCESlider_Changed(Sender) + + fCameraDistance = (Sender:GetPosition() / 10) + lblCAMERADISSTANCESlider.Caption:SetCaption( string.format("Camera scale: %.2f",fCameraDistance) ) + Write_CAMERADISTANCE() + ForceUpdate() + +end + +function SHARPNESSSlider_Changed(Sender) + + fSharpness = Sender:GetPosition() / 10 + lblSHARPNESSSlider.Caption:SetCaption( string.format("Sharpness: %.2f",fSharpness) ) + Write_SHARPNESS() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Write_CAMERADISTANCE() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["CameraDistance"] then + Variables["CameraDistance"]:WriteFloat(fCameraDistance) + end + +end + +function Write_SHARPNESS() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["Sharpness"] then + Variables["Sharpness"]:WriteFloat(fSharpness) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKCAMERADISTANCEFix_Changed(Sender) + + bCamera = Toggle_CheckFix(Sender) + Toggle_CodeCave("CAMERADISTANCE_cc",bCamera) + ForceUpdate() + +end + +function CKSHARPNESSFix_Changed(Sender) + + bSharpness = Toggle_CheckFix(Sender) + Toggle_CodeCave("SHARPNESS_cc",bSharpness) + ForceUpdate() + +end + +function RemoveAVXInstructions() + + local tSuspendedThreadID = HackTool:SuspendAttachedThread() + + local tAddress = HackTool:GetAddress("SHARPNESS") + tAddress:WriteByte(0xF3,0) + tAddress:WriteByte(0x0F,1) + + local tAddress = HackTool:GetAddress("CAMERADISTANCE") + tAddress:WriteByte(0xF3,0) + tAddress:WriteByte(0x0F,1) + + HackTool:ResumeThread(tSuspendedThreadID) + +end + +function RestoreAVXInstructions() + + local tSuspendedThreadID = HackTool:SuspendAttachedThread() + + local tAddress = HackTool:GetAddress("SHARPNESS") + tAddress:WriteByte(0xC5,0) + tAddress:WriteByte(0xFA,1) + + local tAddress = HackTool:GetAddress("CAMERADISTANCE") + tAddress:WriteByte(0xC5,0) + tAddress:WriteByte(0xFA,1) + + HackTool:ResumeThread(tSuspendedThreadID) + +end + + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/Tchia/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Tchia/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..5f3a975 Binary files /dev/null and b/PluginCache/K4sh/Modules/Tchia/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Tchia/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Tchia/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..b443dba Binary files /dev/null and b/PluginCache/K4sh/Modules/Tchia/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Tchia/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Tchia/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..15c6a8f Binary files /dev/null and b/PluginCache/K4sh/Modules/Tchia/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Tchia/Dependencies/Scripts/Tchia.lua b/PluginCache/K4sh/Modules/Tchia/Dependencies/Scripts/Tchia.lua new file mode 100644 index 0000000..c7550f3 --- /dev/null +++ b/PluginCache/K4sh/Modules/Tchia/Dependencies/Scripts/Tchia.lua @@ -0,0 +1,220 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +AdditionalFOV = 1.0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Tchia " +Process_ClassName = "*" +Process_EXEName = "ProjetCaillou-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 2000 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVAdjustment_Enable","FOV Adjustment","CKFOV_Changed",255,100,180,14) + DefaultControls.AddFixToggle("CKDisableLetterBox_Enable","Remove cinematics black borders","CKAspect_Changed",255,120,210,14) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,50,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("50") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89 47 ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --fortsolis.exe+3B204F9 - 48 8B 01 - mov rax,[rcx] + --fortsolis.exe+3B204FC - FF 90 A0 07 00 00 - call qword ptr [rax+000007A0] + --fortsolis.exe+3B20502 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --fortsolis.exe+3B20507 - 48 8B 4D 30 - mov rcx,[rbp+30] + --fortsolis.exe+3B2050B - 48 8B 01 - mov rax,[rcx] + end + + local tAddress = HackTool:AddAddress("Aspect") + if HackTool:SignatureScan("8B 42 ?? 89 41 ?? 8B 41 ?? 33 42 ?? 83 E0 ?? 31 41 ?? 8B 49 ?? 33 4A ?? 83 E1 02 31 4B ?? 48 8D 4B ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --fortsolis.exe+3B20451 - 8B 43 44 - mov eax,[rbx+44] + --fortsolis.exe+3B20454 - 89 47 44 - mov [rdi+44],eax + --fortsolis.exe+3B20457 - 8B 43 48 - mov eax,[rbx+48] + --fortsolis.exe+3B2045A - 89 47 48 - mov [rdi+48],eax + --fortsolis.exe+3B2045D - 8B 47 4C - mov eax,[rdi+4C] + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV_In") + Variables:PushFloat("FOV_Out") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + + + Variables:Allocate() + Variables["DefaultAspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOV_In],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOV_In] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->AspectRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOV_Out],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)Aspect,Aspect_cc: + $$0 $$1,[(allocation)Variables->AspectRatio] $ctx=1 + $$0 [$$2],$$1 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + ]] + + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("Aspect_cc",bAspect) + end + + if bFOV == true then + WriteFOV() + end + +end + +function Periodic() + + PluginViewport:AppendStatusMessage( "\r\n" ) + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + + if bFOV == true then + fFOVIn = Variables["FOV_In"]:ReadFloat() + fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + fFOVOut = Variables["FOV_Out"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("===== Fix informations =====\r\nFOV In: %0.2f, FOV Compensated: %0.2f, FOV Out : %.02f", fFOVIn, fFOVCompensated, fFOVOut)) + end + + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + WriteFOV() + end + + ForceUpdate() + +end + +function CKFOV_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + + if bFOV == true then + WriteFOV() + end + + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKAspect_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("Aspect_cc",bAspect) + ForceUpdate() + +end + +function ResolutionChanged() + + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +end + +function WriteFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..7f134f8 Binary files /dev/null and b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..ce47abd Binary files /dev/null and b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..7462fc3 Binary files /dev/null and b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Scripts/TellMeWhy.lua b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Scripts/TellMeWhy.lua new file mode 100644 index 0000000..e6bd698 --- /dev/null +++ b/PluginCache/K4sh/Modules/TellMeWhy/Dependencies/Scripts/TellMeWhy.lua @@ -0,0 +1,298 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 0 +fDefaultAspectRatio = 1.77778 +--fDefaultAspectRatio = 1.777777791 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 100 + +--ControlVars +bFixEnabled = true +bFOV = true +bPillarBoxing = true +bDOF = true +bFringe = true +--bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "TME-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,80,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+60") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Letterbox fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration fix","CKFRINGEFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("74 ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x26,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TME-Win64-Shipping.exe+1980322 - 48 33 CC - xor rcx,rsp + --TME-Win64-Shipping.exe+1980325 - E8 66 23 C7 00 - call TME-Win64-Shipping.exe+25F2690 + --TME-Win64-Shipping.exe+198032A - 0F 28 B4 24 80 06 00 00 - movaps xmm6,[rsp+00000680] + --TME-Win64-Shipping.exe+1980332 - 48 81 C4 98 06 00 00 - add rsp,00000698 + --TME-Win64-Shipping.exe+1980339 - C3 - ret + end + + local tResultCount = HackTool:SignatureScanMulti("CC CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ??","ASPECTs",PAGE_EXECUTE_READ,0x51,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find ASPECTs injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + local tAddress = HackTool:AddAddress("ASPECT", HackTool:GetAddress( string.format("ASPECTs%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TME-Win64-Shipping.exe+196D819 - 89 41 28 - mov [rcx+28],eax + --TME-Win64-Shipping.exe+196D81C - 8B 42 2C - mov eax,[rdx+2C] + --TME-Win64-Shipping.exe+196D81F - 89 41 2C - mov [rcx+2C],eax + --TME-Win64-Shipping.exe+196D822 - 8B 41 30 - mov eax,[rcx+30] + --TME-Win64-Shipping.exe+196D825 - 33 42 30 - xor eax,[rdx+30] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 66 C7 ?? ?? ?? ?? ?? 85 ?? 0F 8E",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TME-Win64-Shipping.exe+10225CB - 48 8B 05 0E 50 D1 02 - mov rax,[TME-Win64-Shipping.exe+3D375E0] + --TME-Win64-Shipping.exe+10225D2 - 32 DB - xor bl,bl + --TME-Win64-Shipping.exe+10225D4 - 8B 48 04 - mov ecx,[rax+04] + --TME-Win64-Shipping.exe+10225D7 - 66 C7 44 24 50 01 01 - mov word ptr [rsp+50],0101 + --TME-Win64-Shipping.exe+10225DE - 85 C9 - test ecx,ecx + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TME-Win64-Shipping.exe+19C5CBA - 48 8B 05 0F A8 41 02 - mov rax,[TME-Win64-Shipping.exe+3DE04D0] + --TME-Win64-Shipping.exe+19C5CC1 - 39 30 - cmp [rax],esi + --TME-Win64-Shipping.exe+19C5CC3 - 7F 06 - jg TME-Win64-Shipping.exe+19C5CCB + --TME-Win64-Shipping.exe+19C5CC5 - 89 B3 FC 0F 00 00 - mov [rbx+00000FFC],esi + --TME-Win64-Shipping.exe+19C5CCB - 8B 04 2F - mov eax,[rdi+rbp] + end + + return true + +end + + +function Enable_Inject() + + if bAspect == true then + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + end + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("ScreenAspect") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["DefaultAspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + Variables["ScreenAspect"]:WriteFloat(DisplayInfo:GetWidth() / DisplayInfo:GetHeight()) + Variables["factor"]:WriteFloat(fFactor) + + + + ResolutionChanged() + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->AspectRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenAspect] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, FOV compensated: %.2f, FOV Out : %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + Write_FOV() + end + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + + if bAspect == false then + fAspectRatio = fDefaultAspectRatio + end + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AspectRatio"] then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheAlters/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..3e346c5 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheAlters/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..196366a Binary files /dev/null and b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheAlters/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..416fa49 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheAlters/Dependencies/Scripts/TheAlters.lua b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Scripts/TheAlters.lua new file mode 100644 index 0000000..7326aab --- /dev/null +++ b/PluginCache/K4sh/Modules/TheAlters/Dependencies/Scripts/TheAlters.lua @@ -0,0 +1,251 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777778 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheAlters-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("EB ?? F3 0F 10 ?? ?? ?? ?? ?? F3 0F 11 ?? ?? 0F ?? ?? 8B 83",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + local Aspect = HackTool:AddAddress("ASPECT", tAddress) + Aspect:OffsetAddress(0x08) + --TheAlters-Win64-Shipping.exe+473AB14 - EB 08 - jmp "TheAlters-Win64-Shipping.exe"+473AB1E + --TheAlters-Win64-Shipping.exe+473AB16 - F3 0F 10 83 64 03 00 00 - movss xmm0,[rbx+00000364] + --TheAlters-Win64-Shipping.exe+473AB1E - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --TheAlters-Win64-Shipping.exe+473AB23 - 0F 57 C0 - xorps xmm0,xmm0 + --TheAlters-Win64-Shipping.exe+473AB26 - 8B 83 74 03 00 00 - mov eax,[rbx+00000374] + --TheAlters-Win64-Shipping.exe+473AB2C - 89 47 48 - mov [rdi+48],eax + --TheAlters-Win64-Shipping.exe+473AB2F - 0F B6 8B 78 03 00 00 - movzx ecx,byte ptr [rbx+00000378] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheAlters-Win64-Shipping.exe+3485613 - 75 05 - jne "TheAlters-Win64-Shipping.exe"+348561A + --TheAlters-Win64-Shipping.exe+3485615 - BF 04 00 00 00 - mov edi,00000004 + --TheAlters-Win64-Shipping.exe+348561A - 8B 3C 37 - mov edi,[rdi+rsi] + --TheAlters-Win64-Shipping.exe+348561D - 48 8B CB - mov rcx,rbx + --TheAlters-Win64-Shipping.exe+3485620 - E8 4B 11 94 01 - call "TheAlters-Win64-Shipping.exe"+4DC6770 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + if bAspect then + Toggle_CodeCave("FOV_cc",bAspect) + end + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["ASPECTCHECKED"]:WriteByte(0) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio / fAspectRatio169 + + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..39d1e47 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..eb888ba Binary files /dev/null and b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..a5138b2 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Scripts/TheBeastInside.lua b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Scripts/TheBeastInside.lua new file mode 100644 index 0000000..675193e --- /dev/null +++ b/PluginCache/K4sh/Modules/TheBeastInside/Dependencies/Scripts/TheBeastInside.lua @@ -0,0 +1,400 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.77775 +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bHUDSafeZone = true +bFPSLimit = true +bFringe = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "TheBeastInside-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddHeader("HeaderHUDSZ","HUD safe zone",15,160,210,17) + DefaultControls.AddFixedFOVSlider("HUD","HUDSZSlider_Changed",55,190,125,35,0,40,0,1) + HUD:SetTickFrequency(5) + HUD:SetLabel1Text("0") + HUD:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFPSFix_Enable","FPS limit fix (uncapped)","CKFPSLimitFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration fix","CKFRINGEFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,201,180,14) + +end + +function Configure_SignatureScan() + + local tResultCount = HackTool:SignatureScanMulti("F3 0F 10 ?? ?? ?? ?? ?? 0F ?? ?? 0F ?? ?? 77 ?? F3 0F 10 ?? ?? ?? ?? ?? C3","FOVS",PAGE_EXECUTE_READ,0x10,Process_EXEName) + + if tResultCount ~= 3 then + return ErrorOccurred("Could not find FOVS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("FOV", HackTool:GetAddress( string.format("FOVS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheBeastInside-Win64-Shipping.exe+82C0CB - 0F 2F C1 - comiss xmm0,xmm1 + --TheBeastInside-Win64-Shipping.exe+82C0CE - 77 08 - ja TheBeastInside-Win64-Shipping.exe+82C0D8 + --TheBeastInside-Win64-Shipping.exe+82C0D0 - F3 0F 10 81 B8 03 00 00 - movss xmm0,[rcx+000003B8] + --TheBeastInside-Win64-Shipping.exe+82C0D8 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? 88 87 ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheBeastInside-Win64-Shipping.exe+827DD2 - 09 87 CC 03 00 00 - or [rdi+000003CC],eax + --TheBeastInside-Win64-Shipping.exe+827DD8 - 0F B6 44 24 60 - movzx eax,byte ptr [rsp+60] + --TheBeastInside-Win64-Shipping.exe+827DDD - F3 0F 11 87 C8 03 00 00 - movss [rdi+000003C8],xmm0 + --TheBeastInside-Win64-Shipping.exe+827DE5 - F3 0F 10 44 24 64 - movss xmm0,[rsp+64] + --TheBeastInside-Win64-Shipping.exe+827DEB - 88 87 D0 03 00 00 - mov [rdi+000003D0],al + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + + if HackTool:SignatureScan("48 8B ?? ?? ?? 0F ?? ?? 48 ?? ?? 0F ?? ?? 48 83 ?? ?? 5F C3 48",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheBeastInside-Win64-Shipping.exe+11DF6EA - FF D0 - call rax + --TheBeastInside-Win64-Shipping.exe+11DF6EC - 48 8B 5C 24 40 - mov rbx,[rsp+40] + --TheBeastInside-Win64-Shipping.exe+11DF6F1 - 0F 10 00 - movups xmm0,[rax] + --TheBeastInside-Win64-Shipping.exe+11DF6F4 - 48 8B C7 - mov rax,rdi + --TheBeastInside-Win64-Shipping.exe+11DF6F7 - 0F 11 07 - movups [rdi],xmm0 + end + + local tAddress = HackTool:AddAddress("FPSLIMIT") + + if HackTool:SignatureScan("F3 0F ?? ?? 41 0F ?? ?? 77 ?? 0F ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x04,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheBeastInside-Win64-Shipping.exe+5E8A18 - EB 14 - jmp TheBeastInside-Win64-Shipping.exe+5E8A2E + --TheBeastInside-Win64-Shipping.exe+5E8A1A - 48 8B 05 DF C3 5F 02 - mov rax,[TheBeastInside-Win64-Shipping.exe+2BE4E00] + --TheBeastInside-Win64-Shipping.exe+5E8A21 - F3 0F 10 00 - movss xmm0,[rax] + --TheBeastInside-Win64-Shipping.exe+5E8A25 - 41 0F 2F C0 - comiss xmm0,xmm8 + --TheBeastInside-Win64-Shipping.exe+5E8A29 - 77 03 - ja TheBeastInside-Win64-Shipping.exe+5E8A2E + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheBeastInside-Win64-Shipping.exe+6CFEDA - 48 8B 05 1F 83 51 02 - mov rax,[TheBeastInside-Win64-Shipping.exe+2BE8200] + --TheBeastInside-Win64-Shipping.exe+6CFEE1 - 39 30 - cmp [rax],esi + --TheBeastInside-Win64-Shipping.exe+6CFEE3 - 7F 06 - jg TheBeastInside-Win64-Shipping.exe+6CFEEB + --TheBeastInside-Win64-Shipping.exe+6CFEE5 - 89 B3 8C 0D 00 00 - mov [rbx+00000D8C],esi + --TheBeastInside-Win64-Shipping.exe+6CFEEB - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("0F 8E ?? ?? ?? ?? 80 BF ?? ?? ?? ?? ?? 0F 85 ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheBeastInside-Win64-Shipping.exe+11052C1 - 83 78 04 00 - cmp dword ptr [rax+04],00 + --TheBeastInside-Win64-Shipping.exe+11052C5 - 48 C7 43 04 00 00 80 3F - mov qword ptr [rbx+04],3F800000 + --TheBeastInside-Win64-Shipping.exe+11052CD - 0F 8E DE 00 00 00 - jng TheBeastInside-Win64-Shipping.exe+11053B1 + --TheBeastInside-Win64-Shipping.exe+11052D3 - 80 BF C8 0F 00 00 02 - cmp byte ptr [rdi+00000FC8],02 + --TheBeastInside-Win64-Shipping.exe+11052DA - 0F 85 D1 00 00 00 - jne TheBeastInside-Win64-Shipping.exe+11053B1 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:PushFloat("HUDSafeZoneDefRight") + Variables:PushFloat("HUDSafeZoneDefBottom") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + Variables["HUDSafeZoneDefRight"]:WriteFloat(1) + Variables["HUDSafeZoneDefBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$1,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + movsd xmm14,[$$2+8] $ctx=1 + ucomisd xmm14,[(allocation)Variables->HUDSafeZoneDefRight] + jne next + $$0 xmm14,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 + $$0 [$$2],xmm14 $ctx=1 + + next: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)FPSLIMIT,FPSLIMIT_cc: + movss $$1,[FPSLimit] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + FPSLimit: (float)0f + + (codecave)DOF,DOF_cc: + jmp $$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + Toggle_CodeCave("FPSLIMIT_cc",bFPSLimit) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_AR() + Write_HUD_Safe_Zone() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV: %.2f, FOV Out: %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function HUDSZSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + fHUDSafeZoneRight = fHUDSafeZOneLeft + lblHUD.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AR() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == true then + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + end + +end + +function Write_HUD_Safe_Zone() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Write_AR() + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function CKFPSLimitFix_Changed(Sender) + + bFPSLimit = Toggle_CheckFix(Sender) + Toggle_CodeCave("FPSLIMIT_cc",bFPSLimit) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..f8d3b51 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..0bba29d Binary files /dev/null and b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..5f7a534 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Scripts/TheCallistoProtocol.lua b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Scripts/TheCallistoProtocol.lua new file mode 100644 index 0000000..3675be8 --- /dev/null +++ b/PluginCache/K4sh/Modules/TheCallistoProtocol/Dependencies/Scripts/TheCallistoProtocol.lua @@ -0,0 +1,336 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 55 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fFOV = 55 +fInventoryFOV = 0 +fStoreFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bInvFOV = true +bStoreFOV = true +bChromaticAberration = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheCallistoProtocol-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddHeader("UI_Scale","UI Inv. FOV fine adjustment",15,200,210,17) + DefaultControls.AddFixedFOVSlider("UISlider","UISlider_Changed",55,230,125,35,10,90,0,1) + + UISlider:SetTickFrequency(10) + UISlider:SetLabel1Text("10") + UISlider:SetLabel2Text("90") + + DefaultControls.AddHeader("UI_StoreScale","UI Store FOV fine adjustment",245,200,210,17) + DefaultControls.AddFixedFOVSlider("UISStorelider","UIStoreSlider_Changed",285,230,125,35,10,90,0,1) + + UISStorelider:SetTickFrequency(10) + UISStorelider:SetLabel1Text("10") + UISStorelider:SetLabel2Text("90") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKUIInvFOVFix_Enable","Inventory FOV fix","CKUIInvFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKUIStoreFOVFix_Enable","Store FOV fix","CKUIStoreFOVFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKCHROMATICFix_Enable","Chromatic aberration fix","CKCHROMATICFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheCallistoProtocol-Win64-Shipping.exe+D6962A: F6 83 10 02 00 00 10 - test byte ptr [rbx+00000210],10 + --TheCallistoProtocol-Win64-Shipping.exe+D69631: 0F 85 14 EC C5 01 - jne TheCallistoProtocol-Win64-Shipping.exe+29C824B + --TheCallistoProtocol-Win64-Shipping.exe+D69637: F3 0F 10 83 F8 01 00 00 - movss xmm0,[rbx+000001F8] + --TheCallistoProtocol-Win64-Shipping.exe+D6963F: F3 0F 11 47 18 - movss [rdi+18],xmm0 + --TheCallistoProtocol-Win64-Shipping.exe+D69644: F3 0F 58 83 FC 01 00 00 - addss xmm0,[rbx+000001FC] + end + + local tAddress = HackTool:AddAddress("FOV2") + + if HackTool:SignatureScan("8B ?? ?? 4C 8D ?? ?? 89 ?? ?? 48 ?? ?? ?? ?? 48 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheCallistoProtocol-Win64-Shipping.exe+951156 - 41 0F 2F F4 - comiss xmm6,xmm12 + --TheCallistoProtocol-Win64-Shipping.exe+95115A - 0F 83 66 FF FF FF - jae TheCallistoProtocol-Win64-Shipping.exe+9510C6 + --TheCallistoProtocol-Win64-Shipping.exe+951160 - 8B 43 4C - mov eax,[rbx+4C] + --TheCallistoProtocol-Win64-Shipping.exe+951163 - 4C 8D 43 50 - lea r8,[rbx+50] + --TheCallistoProtocol-Win64-Shipping.exe+951167 - 89 47 48 - mov [rdi+48],eax + end + + local tAddress = HackTool:AddAddress("FOV3") + + if HackTool:SignatureScan("74 ?? 8B ?? 89 ?? ?? F3 0F ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x02,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheCallistoProtocol-Win64-Shipping.exe+B5A763 - 48 83 C0 08 - add rax,08 + --TheCallistoProtocol-Win64-Shipping.exe+B5A767 - 74 05 - je TheCallistoProtocol-Win64-Shipping.exe+B5A76E + --TheCallistoProtocol-Win64-Shipping.exe+B5A769 - 8B 00 - mov eax,[rax] + --TheCallistoProtocol-Win64-Shipping.exe+B5A76B - 89 43 48 - mov [rbx+48],eax + --TheCallistoProtocol-Win64-Shipping.exe+B5A76E - F3 0F10 53 20 - movss xmm2,[rbx+20] + end + + local tAddress = HackTool:AddAddress("CHROMATIC") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheCallistoProtocol-Win64-Shipping.exe+3B4731A - 48 8B 05 D7 7D 35 03 - mov rax,[TheCallistoProtocol-Win64-Shipping.exe+6E9F0F8] + --TheCallistoProtocol-Win64-Shipping.exe+3B47321 - 39 30 - cmp [rax],esi + --TheCallistoProtocol-Win64-Shipping.exe+3B47323 - 7F 06 - jg TheCallistoProtocol-Win64-Shipping.exe+3B4732B + --TheCallistoProtocol-Win64-Shipping.exe+3B47325 - 89 B3 A8 10 00 00 - mov [rbx+000010A8],esi + --TheCallistoProtocol-Win64-Shipping.exe+3B4732B - 8B 04 2F - mov eax,[rdi+rbp] + end + + return true + +end + + +function Enable_Inject() + + local nearTo = 0 + local tAddress = HackTool:GetAddress("FOV") + + if HackTool:GetArchitecture() == 0 then + nearTo = HackTool:GetBaseAddress() + end + + + local Variables = HackTool:AllocateMemory("Variables",0,50) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("FOV") + Variables:PushFloat("InventoryFOV") + Variables:PushFloat("StoreFOV") + Variables:PushFloat("defaultInventoryFOV") + Variables:PushFloat("defaultStoreFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOV"]:WriteFloat(fFOV) + Variables["defaultInventoryFOV"]:WriteFloat(70) + Variables["defaultStoreFOV"]:WriteFloat(59) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + fld dword ptr [(allocation)Variables->StoreFOV] + fstp dword ptr [UIstore] + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->FOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)FOV2,FOV2_cc: + %originalcode% + cmp $$1, dword ptr [(allocation)Variables->defaultInventoryFOV] $ctx=1 + je setInvFOV + cmp dword ptr ebx,[rbxPtr] + jne exit + + setInvFOV: + mov [rbxPtr],rbx + fld dword ptr [(allocation)Variables->InventoryFOV] + fstp dword ptr [$$2] $ctx=1 + + exit: + jmp %returnaddress% + %end% + + rbxPtr: + (float)0 + + dummy: + (float)0 + + (codecave:jmp)FOV3,FOV3_cc: + fld dword ptr [UIstore] + fstp dword ptr [$$2] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + UIstore: + (float)0f + + (codecave)CHROMATIC,CHROMATIC_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("FOV2_cc",bInvFOV) + Toggle_CodeCave("FOV3_cc",bStoreFOV) + Toggle_CodeCave("CHROMATIC_cc",bChromaticAberration) + end + + Write_FOV() + Write_UIInv_Scale() + Write_UIStore_Scale() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["FOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function UISlider_Changed(Sender) + + fInventoryFOV = Sender:GetPosition() + lblUISlider.Caption:SetCaption( string.format("Inv. FOV : %.0f",fInventoryFOV) ) + Write_UIInv_Scale() + ForceUpdate() + +end + +function UIStoreSlider_Changed(Sender) + + fStoreFOV = Sender:GetPosition() + lblUISStorelider.Caption:SetCaption( string.format("Store FOV : %.0f",fStoreFOV) ) + Write_UIStore_Scale() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["FOV"] then + Variables["FOV"]:WriteFloat(fFOV) + end + +end + +function Write_UIInv_Scale() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["InventoryFOV"] then + Variables["InventoryFOV"]:WriteFloat(fInventoryFOV) + end + +end + +function Write_UIStore_Scale() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["StoreFOV"] then + Variables["StoreFOV"]:WriteFloat(fStoreFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKUIInvFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV2_cc",bFOV) + ForceUpdate() + +end + +function CKUIStoreFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV3_cc",bFOV) + ForceUpdate() + +end + +function CKCHROMATICFix_Changed(Sender) + + bChromaticAberration = Toggle_CheckFix(Sender) + Toggle_CodeCave("CHROMATIC_cc",bChromaticAberration) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..15670c6 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..009cf6e Binary files /dev/null and b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..911fa86 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Scripts/TheCastingOfFrankStone.lua b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Scripts/TheCastingOfFrankStone.lua new file mode 100644 index 0000000..db5a7bc --- /dev/null +++ b/PluginCache/K4sh/Modules/TheCastingOfFrankStone/Dependencies/Scripts/TheCastingOfFrankStone.lua @@ -0,0 +1,301 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fDefaultAspectRatio = 1.777777791 +--fDefaultAspectRatio = 1.33333 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "CastingFrankStone-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = false + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFRINGEFOVFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --CastingFrankStone-Win64-Shipping.exe+4CEE514 - 48 8B 01 - mov rax,[rcx] + --CastingFrankStone-Win64-Shipping.exe+4CEE517 - FF 90 20 07 00 00 - call qword ptr [rax+00000720] + --CastingFrankStone-Win64-Shipping.exe+4CEE51D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --CastingFrankStone-Win64-Shipping.exe+4CEE522 - 48 83 C4 28 - add rsp,28 + --CastingFrankStone-Win64-Shipping.exe+4CEE526 - C3 - ret + end + + local tResultCount = HackTool:SignatureScanMulti("89 ?? ?? 8B ?? ?? 33 ?? ?? 83 ?? ?? 31 ?? ?? 8B ?? ?? 33 ?? ?? 83 ?? ?? 31 ?? ?? 48 ?? ?? ?? 0F ?? ?? ?? 88 ?? ?? 8B ?? ?? 48 83","ASPECTS",PAGE_EXECUTE_READ,0x0,Process_EXEName) + + if tResultCount ~= 2 then + return ErrorOccurred("Could not find ASPECTS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + + local tAddress = HackTool:AddAddress("ASPECT", HackTool:GetAddress( string.format("ASPECTS%d",1) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --CastingFrankStone-Win64-Shipping.exe+10A8603 - 89 41 44 - mov [rcx+44],eax + --CastingFrankStone-Win64-Shipping.exe+10A8606 - 8B 42 48 - mov eax,[rdx+48] + --CastingFrankStone-Win64-Shipping.exe+10A8609 - 89 41 48 - mov [rcx+48],eax + --CastingFrankStone-Win64-Shipping.exe+10A860C - 8B 41 4C - mov eax,[rcx+4C] + --CastingFrankStone-Win64-Shipping.exe+10A860F - 33 42 4C - xor eax,[rdx+4C] + end + + local tAddress = HackTool:AddAddress("FRINGE") -- r.SceneColorFringeQuality + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05 ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --b1-Win64-Shipping.exe+EA98935 - 48 8B 05 6C 0A E3 0E - mov rax,[b1-Win64-Shipping.exe+1D8C93A8] + --b1-Win64-Shipping.exe+EA9893C - 39 30 - cmp [rax],esi + --b1-Win64-Shipping.exe+EA9893E - 7F 06 - jg b1-Win64-Shipping.exe+EA98946 + --b1-Win64-Shipping.exe+EA98940 - 89 B3 AC 1D 00 00 - mov [rbx+00001DAC],esi + --b1-Win64-Shipping.exe+EA98946 - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("DOF") -- r.DepthOfFieldQuality + + if HackTool:SignatureScan("48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --CastingFrankStone-Win64-Shipping.exe+3593004 - 48 8B 05 7D 6A 77 05 - mov rax,[CastingFrankStone-Win64-Shipping.exe+8D09A88] + --CastingFrankStone-Win64-Shipping.exe+359300B - 48 8B CB - mov rcx,rbx + --CastingFrankStone-Win64-Shipping.exe+359300E - 8B 78 04 - mov edi,[rax+04] + --CastingFrankStone-Win64-Shipping.exe+3593011 - E8 AA B5 80 01 - call CastingFrankStone-Win64-Shipping.exe+4D9E5C0 + --CastingFrankStone-Win64-Shipping.exe+3593016 - 48 63 C8 - movsxd rcx,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushInt("Aspect") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + cmp dword ptr [(allocation)Variables->Aspect],1 + jne regularFOV + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + regularFOV: + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + $$0 $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_AspectRatio() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] and Variables["CompensatedFOV"] and Variables["FOVIn"] then + if bAspect == false then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + Variables["CompensatedFOV"]:WriteFloat(fFOVIn) + Variables["Aspect"]:WriteInt(0) + else + Variables["Aspect"]:WriteInt(1) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Write_AspectRatio() + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheChant/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheChant/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..0ae250f Binary files /dev/null and b/PluginCache/K4sh/Modules/TheChant/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheChant/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheChant/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..76ea9a7 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheChant/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheChant/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheChant/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..7fab90b Binary files /dev/null and b/PluginCache/K4sh/Modules/TheChant/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheChant/Dependencies/Scripts/TheChant.lua b/PluginCache/K4sh/Modules/TheChant/Dependencies/Scripts/TheChant.lua new file mode 100644 index 0000000..3367af3 --- /dev/null +++ b/PluginCache/K4sh/Modules/TheChant/Dependencies/Scripts/TheChant.lua @@ -0,0 +1,184 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fFOV = 90 +fDefaultFOV = 75 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspectRatio = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Chant-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +NearToAddress = 0 + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,90,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + NearToAddress = HackTool:GetBaseAddress() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F 10 83 ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83",tAddress,PAGE_EXECUTE_READ,0x08,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Chant-Win64-Shipping.UCameraComponent::GetCameraView+EE8 - addss xmm0,[rbx+000001F8] + --Chant-Win64-Shipping.UCameraComponent::GetCameraView+EF0 - jmp Chant-Win64-Shipping.UCameraComponent::GetCameraView+EFA + --Chant-Win64-Shipping.UCameraComponent::GetCameraView+EF2 - movss xmm0,[rbx+000001F8] + --Chant-Win64-Shipping.UCameraComponent::GetCameraView+EFA - movss [rdi+18],xmm0 + --Chant-Win64-Shipping.UCameraComponent::GetCameraView+EFF - mov eax,[rbx+00000208] + end + + local tAddress = HackTool:AddAddress("ARatio") + + if HackTool:SignatureScan("F3 0F 11 83 ?? ?? ?? ?? F3 0F 11 83 ?? ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Chant-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+114 - movss xmm0,[rbx+000007DC] + --Chant-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+11C - divss xmm0,xmm1 + --Chant-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+120 - movss [rbx+000007E4],xmm0 + --Chant-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+128 - movss [rbx+00000208],xmm0 + --Chant-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+130 - movaps xmm6,[rsp+20] + end + + return true + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:Allocate(NearToAddress) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ARatio,ARatio_cc: + movss $$2,[(allocation)Variables->AspectRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + ]] + + + if HackTool:CompileAssembly(asm,"Fixes",NearToAddress) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ARatio_cc",bAspectRatio) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["FOVOut"] and Variables["AdditionalFOV"] and Variables["AspectRatio"] then + Variables["AspectRatio"]:WriteFloat(DisplayInfo:GetAspectRatio()) + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In : %0.f, FOV Out : %.0f",Variables["FOVIn"]:ReadFloat(), Variables["FOVOut"]:ReadFloat())) + end + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(2)) + 25 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("ARatio_cc",bAspectRatio) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Disable_Inject() + + CleanUp() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..69b474a Binary files /dev/null and b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..5e6def2 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..c687f07 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Scripts/TheDevilInMe.lua b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Scripts/TheDevilInMe.lua new file mode 100644 index 0000000..3e02823 --- /dev/null +++ b/PluginCache/K4sh/Modules/TheDevilInMe/Dependencies/Scripts/TheDevilInMe.lua @@ -0,0 +1,178 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--ControlVars +bFixEnabled = true +bFOV = true +bAspectRatio = true + +--GAME VARS +fDefaultFOV = 90 +fOriginalAspect = 2.35 +fAdditionalFOV = 0 +fFOV = 90 + + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "The Devil in Me " +Process_ClassName = "UnrealWindow" +Process_EXEName = "*" + +--INJECTION BEHAVIOUR +InjectDelay = 1500 +WriteInterval = 500 +SearchInterval = 1000 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Aspect Ratio fix","CKARatioFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("AspectFix") + + if HackTool:SignatureScan("8B 83 ?? ?? ?? ?? 89 47 ?? 0F B6 83 ?? ?? ?? ?? 33",tAddress,PAGE_EXECUTE_READ,0x06,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F3 0F 10 83 ?? ?? ?? ?? F3 0F 11 47 ?? 8B",tAddress,PAGE_EXECUTE_READ,0x08,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true +end + + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("ScreenAspect") + Variables:PushFloat("OriginalAspect") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["OriginalAspect"]:WriteFloat(fOriginalAspect) + + ResolutionChanged() + + asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)AspectFix,AspectFix_cc: + fld dword ptr [(allocation)Variables->ScreenAspect] + fstp dword ptr [$$1] $ctx=1 + jmp %returnaddress% + %end% + + + ]] + + if HackTool:CompileAssembly(asm,"AspectFix") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("AspectFix_cc",bAspectRatio) + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out : %.0f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(1) / 1.6) + 37.5 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function ResolutionChanged() + + local ScreenAspect = DisplayInfo:GetAspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables then + Variables["ScreenAspect"]:WriteFloat(ScreenAspect) + end + +end + +function Disable_Inject() + CleanUp() +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("AspectFix_cc",bAspectRatio) + ForceUpdate() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end \ No newline at end of file diff --git a/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..733741f Binary files /dev/null and b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..3d024ae Binary files /dev/null and b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..243c872 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Scripts/TheExpanse.lua b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Scripts/TheExpanse.lua new file mode 100644 index 0000000..713df09 --- /dev/null +++ b/PluginCache/K4sh/Modules/TheExpanse/Dependencies/Scripts/TheExpanse.lua @@ -0,0 +1,277 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bHUDSafeZone = true +bAspect = true +bFringe = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "Artemis-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = false + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,120,0,1) + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+100") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKAspectFix_Enable","Aspect fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration fix","CKFRINGEFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("C6 84 ?? ?? ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Artemis-Win64-Shipping.APlayerCameraManager::GetFOVAngle+5D - 74 05 - je Artemis-Win64-Shipping.APlayerCameraManager::GetFOVAngle+64 + --Artemis-Win64-Shipping.APlayerCameraManager::GetFOVAngle+5F - E8 3C EA 38 FE - call Artemis-Win64-Shipping.FMemory::Free + --Artemis-Win64-Shipping.APlayerCameraManager::GetFOVAngle+64 - 0F 28 C6 - movaps xmm0,xmm6 + --Artemis-Win64-Shipping.APlayerCameraManager::GetFOVAngle+67 - 48 8B 8C 24 20 06 00 00 - mov rcx,[rsp+00000620] + --Artemis-Win64-Shipping.APlayerCameraManager::GetFOVAngle+6F - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("C3 CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89",tAddress,PAGE_EXECUTE_READ,0x51,Process_EXEName) ==0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Artemis-Win64-Shipping.FMinimalViewInfo::FMinimalViewInfo+49 - 89 41 28 - mov [rcx+28],eax + --Artemis-Win64-Shipping.FMinimalViewInfo::FMinimalViewInfo+4C - 8B 42 2C - mov eax,[rdx+2C] + --Artemis-Win64-Shipping.FMinimalViewInfo::FMinimalViewInfo+4F - 89 41 2C - mov [rcx+2C],eax + --Artemis-Win64-Shipping.FMinimalViewInfo::FMinimalViewInfo+52 - 8B 41 30 - mov eax,[rcx+30] + --Artemis-Win64-Shipping.FMinimalViewInfo::FMinimalViewInfo+55 - 33 42 30 - xor eax,[rdx+30] + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Artemis-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+7A - 48 8B 05 EF 4B 4B 02 - mov rax,[Artemis-Win64-Shipping.exe+578ADA0] + --Artemis-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+81 - 39 30 - cmp [rax],esi + --Artemis-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+83 - 7F 06 - jg Artemis-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+8B + --Artemis-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+85 - 89 B3 84 10 00 00 - mov [rbx+00001084],esi + --Artemis-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+8B - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Artemis-Win64-Shipping.DiaphragmDOF::IsEnabled+30 - 48 8B 05 71 90 88 03 - mov rax,[Artemis-Win64-Shipping.exe+56D3C18] + --Artemis-Win64-Shipping.DiaphragmDOF::IsEnabled+37 - 48 8B CB - mov rcx,rbx + --Artemis-Win64-Shipping.DiaphragmDOF::IsEnabled+3A - 8B 78 04 - mov edi,[rax+04] + --Artemis-Win64-Shipping.DiaphragmDOF::IsEnabled+3D - E8 FE ED 48 01 - call Artemis-Win64-Shipping.FSceneView::GetShaderPlatform + --Artemis-Win64-Shipping.DiaphragmDOF::IsEnabled+42 - 8B C8 - mov ecx,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 [(allocation)Variables->AspectRatio],$$2 $ctx=1 + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV: %.2f, FOV Out: %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheGunk/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..fba249b Binary files /dev/null and b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheGunk/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..a000803 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheGunk/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..0556b5f Binary files /dev/null and b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheGunk/Dependencies/Scripts/TheGunk.lua b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Scripts/TheGunk.lua new file mode 100644 index 0000000..14a161b --- /dev/null +++ b/PluginCache/K4sh/Modules/TheGunk/Dependencies/Scripts/TheGunk.lua @@ -0,0 +1,376 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio219 = 2.333333254 +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 100 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Dust-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,60,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+40") + + DefaultControls.AddHeader("Header_HUD_SZ_LEFT","HUD safe zone left",15,190,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_LEFT","HUDSZLSlider_Changed",55,220,125,35,0,40,0,1) + HUD_SZ_LEFT:SetTickFrequency(5) + HUD_SZ_LEFT:SetLabel1Text("0") + HUD_SZ_LEFT:SetLabel2Text("40") + DefaultControls.AddHeader("Header_HUDSZRIGHT","HUD safe zone right",245,190,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_RIGHT","HUDSZRSlider_Changed",285,220,125,35,0,40,0,1) + HUD_SZ_RIGHT:SetTickFrequency(5) + HUD_SZ_RIGHT:SetLabel1Text("0") + HUD_SZ_RIGHT:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 33 ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + --if HackTool:SignatureScan("74 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Dust-Win64-Shipping.exe+2A4D18D - 74 05 - je Dust-Win64-Shipping.exe+2A4D194 + --Dust-Win64-Shipping.exe+2A4D18F - E8 BC A7 60 FE - call Dust-Win64-Shipping.exe+1057950 + --Dust-Win64-Shipping.exe+2A4D194 - 0F 28 C6 - movaps xmm0,xmm6 + --Dust-Win64-Shipping.exe+2A4D197 - 48 8B 8C 24 10 06 00 00 - mov rcx,[rsp+00000610] + --Dust-Win64-Shipping.exe+2A4D19F - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + if HackTool:SignatureScan("48 ?? ?? 48 ?? ?? 66 48 ?? ?? ?? FF ?? 48 8B ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x18,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Dust-Win64-Shipping.exe+233F811 - 0F 10 00 - movups xmm0,[rax] + --Dust-Win64-Shipping.exe+233F814 - 48 8B C7 - mov rax,rdi + --Dust-Win64-Shipping.exe+233F817 - 0F 11 07 - movups [rdi],xmm0 + --Dust-Win64-Shipping.exe+233F81A - 48 83 C4 30 - add rsp,30 + --Dust-Win64-Shipping.exe+233F81E - 5F - pop rdi + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("CC CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x51,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Dust-Win64-Shipping.exe+2A3E8C6 - 8B 42 28 - mov eax,[rdx+28] + --Dust-Win64-Shipping.exe+2A3E8C9 - 89 41 28 - mov [rcx+28],eax + --Dust-Win64-Shipping.exe+2A3E8CC - 8B 42 2C - mov eax,[rdx+2C] + --Dust-Win64-Shipping.exe+2A3E8CF - 89 41 2C - mov [rcx+2C],eax + --Dust-Win64-Shipping.exe+2A3E8D2 - 8B 41 30 - mov eax,[rcx+30] + end + + local tAddress = HackTool:AddAddress("ASPECT2") + + if HackTool:SignatureScan("C3 CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x51,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Dust-Win64-Shipping.exe+2A3E8C6 - 8B 42 28 - mov eax,[rdx+28] + --Dust-Win64-Shipping.exe+2A3E8C9 - 89 41 28 - mov [rcx+28],eax + --Dust-Win64-Shipping.exe+2A3E8CC - 8B 42 2C - mov eax,[rdx+2C] + --Dust-Win64-Shipping.exe+2A3E8CF - 89 41 2C - mov [rcx+2C],eax + --Dust-Win64-Shipping.exe+2A3E8D2 - 8B 41 30 - mov eax,[rcx+30] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("48 8B ?? ?? ?? ?? ?? 48 ?? ?? 8B ?? ?? E8 ?? ?? ?? ?? 8B",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Dust-Win64-Shipping.exe+18B9FB0 - 48 8B 05 C1 BB 0B 03 - mov rax,[Dust-Win64-Shipping.exe+4975B78] + --Dust-Win64-Shipping.exe+18B9FB7 - 48 8B CB - mov rcx,rbx + --Dust-Win64-Shipping.exe+18B9FBA - 8B 78 04 - mov edi,[rax+04] + --Dust-Win64-Shipping.exe+18B9FBD - E8 EE B2 21 01 - call Dust-Win64-Shipping.exe+2AD52B0 + --Dust-Win64-Shipping.exe+18B9FC2 - 8B C8 - mov ecx,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + movss $$2,[(allocation)Variables->FOVOut] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + $$0 $$2,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 ; Will copy all safe zone offsets + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT2,ASPECT2_cc: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 edi,0 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_AR() + Write_HUD_Safe_Zone_Left() + Write_HUD_Safe_Zone_Right() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function HUDSZLSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + lblHUD_SZ_LEFT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone_Left() + ForceUpdate() + +end + +function HUDSZRSlider_Changed(Sender) + + fHUDSafeZoneRight = Sender:GetPosition() + lblHUD_SZ_RIGHT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZoneRight) ) + Write_HUD_Safe_Zone_Right() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AR() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect == false then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + else + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + end + end + +end + +function Write_HUD_Safe_Zone_Left() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + end + +end + +function Write_HUD_Safe_Zone_Right() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFixEnabled) + Write_FOV() + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ASPECT2_cc",bAspect) + Write_AR() + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..ab7c7f0 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..62ccc59 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..2c8c67f Binary files /dev/null and b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Scripts/TheInvincible.lua b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Scripts/TheInvincible.lua new file mode 100644 index 0000000..93d3678 --- /dev/null +++ b/PluginCache/K4sh/Modules/TheInvincible/Dependencies/Scripts/TheInvincible.lua @@ -0,0 +1,198 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 60 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAdditionalFOV = 0 +fFOV = 60 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheInvincible-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheInvincible-Win64-Shipping.exe+2A9F29A - EB 08 - jmp TheInvincible-Win64-Shipping.exe+2A9F2A4 + --TheInvincible-Win64-Shipping.exe+2A9F29C - F3 0F 10 83 F8 01 00 00 - movss xmm0,[rbx+000001F8] + --TheInvincible-Win64-Shipping.exe+2A9F2A4 - F3 0F 11 47 18 - movss [rdi+18],xmm0 + --TheInvincible-Win64-Shipping.exe+2A9F2A9 - 8B 83 08 02 00 00 - mov eax,[rbx+00000208] + --TheInvincible-Win64-Shipping.exe+2A9F2AF - 89 47 2C - mov [rdi+2C],eax + end + + local tAddress = HackTool:AddAddress("RESOLUTION") + + if HackTool:SignatureScan("48 8B ?? ?? ?? F2 0F ?? ?? ?? ?? ?? ?? C6 05",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + + --TheInvincible-Win64-Shipping.exe+2762D95 - F2 0F 11 03 - movsd [rbx],xmm0 + --TheInvincible-Win64-Shipping.exe+2762D99 - 48 8B 5C 24 38 - mov rbx,[rsp+38] + --TheInvincible-Win64-Shipping.exe+2762D9E - F2 0F 11 05 02 65 DA 02 - movsd [TheInvincible-Win64-Shipping.exe+55092A8],xmm0 <<== + --TheInvincible-Win64-Shipping.exe+2762DA6 - C6 05 03 65 DA 02 01 - mov byte ptr [TheInvincible-Win64-Shipping.exe+55092B0],01 + --TheInvincible-Win64-Shipping.exe+2762DAD - 48 83 C4 20 - add rsp,20 + end + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("factor") + Variables:PushFloat("Width") + Variables:PushFloat("Height") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["DefaultAspectRatio"]:WriteFloat(fDefaultAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->AspectRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)RESOLUTION,RESOLUTION_cc: + fld dword ptr [$$1] $ctx=1 + fdiv dword ptr [$$1+0x4] $ctx=1 + fstp dword ptr [(allocation)Variables->AspectRatio] + %originalcode% + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("RESOLUTION_cc",bFixEnabled) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + fFOVIn = Variables["FOVIn"]:ReadFloat() + fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Compensated: %0.2f, FOV Out : %.02f", fFOVIn, fFOVCompensated, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(2)) + 25 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..dc73f4c Binary files /dev/null and b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..2ee5b89 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..67afeb6 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Scripts/TheQuarry.lua b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Scripts/TheQuarry.lua new file mode 100644 index 0000000..7ffa5bf --- /dev/null +++ b/PluginCache/K4sh/Modules/TheQuarry/Dependencies/Scripts/TheQuarry.lua @@ -0,0 +1,282 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalCamFOV = 0 +fAdditionalCinematicsFOV = 0 +fDefaultAspectRatio = 2.4 + +--ControlVars +bFixEnabled = true +bCSAspectRatio = true +bCamFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheQuarry-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV1","FOV camera adjustment",15,70,210,17) + DefaultControls.AddFOVSlider("FOVSlider1","FOVCamSlider_Changed",55,100,125,35) + DefaultControls.AddHeader("Header_FOV2","FOV cinematics adjustment",15,160,210,17) + DefaultControls.AddFOVSlider("FOVSlider2","FOVcinematicsSlider_Changed",55,190,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV Fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKCSAspectFix_Enable","Black bars removal","CKCSAspectFix_Changed",255,101,180,54) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("CSARatio1") + if HackTool:SignatureScan("E9 ?? ?? ?? ?? F3 0F 10 41 ?? EB",tAddress,PAGE_EXECUTE_READ,0x5,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("CSARatio2") + if HackTool:SignatureScan("F3 0F 10 83 ?? ?? ?? ?? F3 0F 5E C1 F3 0F 11 83 ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0c,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + + local tAddress = HackTool:AddAddress("CSARatio3") + if HackTool:SignatureScan("75 ?? 48 FF C2 48 83 C1 28 ",tAddress,PAGE_EXECUTE_READ,0x00,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? EB ?? 0F ?? ?? F3 0F 10 8B ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + return true + +end + + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CamFOV") + Variables:PushFloat("CinematicsFOV") + Variables:PushFloat("AR") + Variables:PushFloat("FOVState") + Variables:PushFloat("SavedAR") + Variables:Allocate() + Variables["SavedAR"]:WriteFloat(fDefaultAspectRatio) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + pushf + mov [(allocation)Variables->FOVState],r14 + cmp r14,0x2 + je cinematics + cmp r14,0x1 + je camera + jmp exit + + cinematics: + addss xmm0,[(allocation)Variables->CinematicsFOV] + jmp exit + + camera: + addss xmm0,[(allocation)Variables->CamFOV] + + exit: + popf + jmp %returnaddress% + %end% + + ; TheQuarry-Win64-Shipping.exe+388D32A: F3 0F 59 83 3C 08 00 00 - mulss xmm0,[rbx+0000083C] + ; TheQuarry-Win64-Shipping.exe+388D332: E8 A4 DD 6B 01 - call TheQuarry-Win64-Shipping.exe+4F4B0DB + ; ---------- INJECTING HERE ---------- + ; TheQuarry-Win64-Shipping.exe+388D337: F3 0F 59 05 C5 52 7A 02 - mulss xmm0,[TheQuarry-Win64-Shipping.exe+6032604] + ; ---------- DONE INJECTING ---------- + ; TheQuarry-Win64-Shipping.exe+388D33F: EB 03 - jmp TheQuarry-Win64-Shipping.exe+388D344 + ; TheQuarry-Win64-Shipping.exe+388D341: 0F 57 C0 - xorps xmm0,xmm0 + + (codecave:jmp)CSARatio1,CSARatio1_cc: + movss xmm0,[(allocation)Variables->AR] + jmp %returnaddress% + %end% + + ; TheQuarry-Win64-Shipping.exe+3E42A2D - mov rsi,[rsi+00000140] + ; TheQuarry-Win64-Shipping.exe+3E42A34 - jmp TheQuarry-Win64-Shipping.exe+3E427E0 + ; ---------- INJECTING HERE ---------- + ; TheQuarry-Win64-Shipping.exe+3E42A39 - movss xmm0,[rcx+10] + ; ---------- DONE INJECTING ---------- + ; TheQuarry-Win64-Shipping.exe+3E42A3E - jmp TheQuarry-Win64-Shipping.exe+3E42A45 + ; TheQuarry-Win64-Shipping.exe+3E42A40 - movss xmm0,[rdi+14] + + (codecave:jmp)CSARatio2,CSARatio2_cc: + movss xmm0,[(allocation)Variables->AR] + %originalcode% + jmp %returnaddress% + %end% + + ; TheQuarry-Win64-Shipping.exe+388D359 - movss xmm0,[rbx+0000083C] + ; TheQuarry-Win64-Shipping.exe+388D361 - divss xmm0,xmm1 + ; ---------- INJECTING HERE ---------- + ; TheQuarry-Win64-Shipping.exe+388D365 - movss [rbx+00000844],xmm0 + ; ---------- DONE INJECTING ---------- + ; TheQuarry-Win64-Shipping.exe+388D36D - movss [rbx+00000218],xmm0 + ; TheQuarry-Win64-Shipping.exe+388D375 - movaps xmm6,[rsp+20] + + (codecave)CSARatio3,CSARatio3_cc: + jmp $$1 $ctx=1 + %end% + + ; TheQuarry-Win64-Shipping.exe+3E42A1B - xor al,al + ; TheQuarry-Win64-Shipping.exe+3E42A1D - test al,al + ; ---------- INJECTING HERE ---------- + ; TheQuarry-Win64-Shipping.exe+3E42A1F - jne TheQuarry-Win64-Shipping.exe+3E42A39 + ; ---------- DONE INJECTING ---------- + ; TheQuarry-Win64-Shipping.exe+3E42A21 - inc rdx + ; TheQuarry-Win64-Shipping.exe+3E42A24 - add rcx,28 + + ]] + + if HackTool:CompileAssembly(asm,"FOVFix") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("CSARatio1_cc",bCSAspectRatio) + Toggle_CodeCave("CSARatio2_cc",bCSAspectRatio) + Toggle_CodeCave("CSARatio3_cc",bCSAspectRatio) + Toggle_CodeCave("FOV_cc",bCamFOV) + if bCamFOV then + WriteCamFOV() + WriteCinematicsFOV() + end + end + + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + local RegisterState + + if Variables and Variables["AR"] and Variables["FOVState"] then + Variables["AR"]:WriteFloat(DisplayInfo:GetAspectRatio()) + RegisterState = Variables["FOVState"]:ReadInt() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nBB toggle %s", bCSAspectRatio ) ) + --if RegisterState == 1 then + --PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV fix on camera" ) ) + --else + --PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV fix on cinematics" ) ) + --end + end + +end + +function FOVCamSlider_Changed(Sender) + + fAdditionalCamFOV = Sender:GetScaledFloat(4) + 35 + lblFOVSlider1.Caption:SetCaption( string.format("Value: %.0f",fAdditionalCamFOV) ) + + WriteCamFOV() + ForceUpdate() + +end + +function FOVcinematicsSlider_Changed(Sender) + + fAdditionalCinematicsFOV = Sender:GetScaledFloat(4) + 35 + lblFOVSlider2.Caption:SetCaption( string.format("Value: %.0f",fAdditionalCinematicsFOV) ) + + WriteCinematicsFOV() + ForceUpdate() + +end + +function WriteCamFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["CamFOV"] then + Variables["CamFOV"]:WriteFloat(fAdditionalCamFOV) + end + +end + +function WriteCinematicsFOV() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["CinematicsFOV"] then + Variables["CinematicsFOV"]:WriteFloat(fAdditionalCinematicsFOV) + end + +end + +function Disable_Inject() + + RestoreAspectDefault() + CleanUp() + +end + +function CKCSAspectFix_Changed(Sender) + + bCSAspectRatio = Toggle_CheckFix(Sender) + if bCSAspectRatio == false then + RestoreAspectDefault() + end + Toggle_CodeCave("CSARatio1_cc",bCSAspectRatio) + Toggle_CodeCave("CSARatio2_cc",bCSAspectRatio) + Toggle_CodeCave("CSARatio3_cc",bCSAspectRatio) + ForceUpdate() + +end + +function CKFOVFix_Changed(Sender) + + bCamFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bCamFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function RestoreAspectDefault() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..bedc64a Binary files /dev/null and b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..9372b70 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..138def1 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Scripts/TheSinkingCity.lua b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Scripts/TheSinkingCity.lua new file mode 100644 index 0000000..d9cd9fb --- /dev/null +++ b/PluginCache/K4sh/Modules/TheSinkingCity/Dependencies/Scripts/TheSinkingCity.lua @@ -0,0 +1,354 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 80 +fAdditionalFOV = 0 +fScreenAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fScreenAspectRatio169 = 1.77778 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bHUDSafeZone = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TSCGame-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+70") + + DefaultControls.AddHeader("Header_HUD_SZ_LEFT","HUD safe zone left",15,190,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_LEFT","HUDSZLSlider_Changed",55,220,125,35,0,40,0,1) + HUD_SZ_LEFT:SetTickFrequency(5) + HUD_SZ_LEFT:SetLabel1Text("0") + HUD_SZ_LEFT:SetLabel2Text("40") + DefaultControls.AddHeader("Header_HUDSZRIGHT","HUD safe zone right",245,190,210,17) + DefaultControls.AddFixedFOVSlider("HUD_SZ_RIGHT","HUDSZRSlider_Changed",285,220,125,35,0,40,0,1) + HUD_SZ_RIGHT:SetTickFrequency(5) + HUD_SZ_RIGHT:SetLabel1Text("0") + HUD_SZ_RIGHT:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,161,100,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x05,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TSCGame-Win64-Shipping.exe+16730C0 - 74 05 - je TSCGame-Win64-Shipping.exe+16730C7 + --TSCGame-Win64-Shipping.exe+16730C2 - E8 A9 9D 02 FF - call TSCGame-Win64-Shipping.exe+69CE70 + --TSCGame-Win64-Shipping.exe+16730C7 - 0F 28 C6 - movaps xmm0,xmm6 + --TSCGame-Win64-Shipping.exe+16730CA - 48 8B 8C 24 A0 05 00 00 - mov rcx,[rsp+000005A0] + --TSCGame-Win64-Shipping.exe+16730D2 - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("CC CC CC 48 ?? ?? ?? ?? 57 48 ?? ?? ?? F2 ?? ?? ?? 48 ?? ?? F2 ?? ?? ?? 48 ?? ?? 8B ?? ?? 89 ?? ?? F2 ?? ?? ?? ?? F2 ?? ?? ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ?? 8B ?? ?? 89 ?? ??",tAddress,PAGE_EXECUTE_READ,0x52,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --ASC-Win64-Shipping.exe+165AA40 - 8B 42 44 - mov eax,[rdx+44] + --ASC-Win64-Shipping.exe+165AA43 - 89 41 44 - mov [rcx+44],eax + --ASC-Win64-Shipping.exe+165AA46 - 8B 42 48 - mov eax,[rdx+48] + --ASC-Win64-Shipping.exe+165AA49 - 89 41 48 - mov [rcx+48],eax + --ASC-Win64-Shipping.exe+165AA4C - 8B 49 4C - mov ecx,[rcx+4C] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 66 C7 ?? ?? ?? ?? ?? 85 ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TSCGame-Win64-Shipping.exe+D5B230 - 48 8B 05 09 CF 50 02 - mov rax,[TSCGame-Win64-Shipping.exe+3268140] + --TSCGame-Win64-Shipping.exe+D5B237 - 32 DB - xor bl,bl + --TSCGame-Win64-Shipping.exe+D5B239 - 8B 48 04 - mov ecx,[rax+04] + --TSCGame-Win64-Shipping.exe+D5B23C - 66 C7 44 24 40 01 01 - mov word ptr [rsp+40],0101 + --TSCGame-Win64-Shipping.exe+D5B243 - 85 C9 - test ecx,ecx + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + + if HackTool:SignatureScan("48 ?? ?? 48 ?? ?? 66 48 ?? ?? ?? FF ?? 48 8B ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x18,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TSCGame-Win64-Shipping.exe+D5B230 - 48 8B 05 09 CF 50 02 - mov rax,[TSCGame-Win64-Shipping.exe+3268140] + --TSCGame-Win64-Shipping.exe+D5B237 - 32 DB - xor bl,bl + --TSCGame-Win64-Shipping.exe+D5B239 - 8B 48 04 - mov ecx,[rax+04] + --TSCGame-Win64-Shipping.exe+D5B23C - 66 C7 44 24 40 01 01 - mov word ptr [rsp+40],0101 + --TSCGame-Win64-Shipping.exe+D5B243 - 85 C9 - test ecx,ecx + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("DefaultAspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["DefaultAspectRatio"]:WriteFloat(fScreenAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fScreenAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOVIn],$$1 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->DefaultAspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] + fst dword ptr [(allocation)Variables->CompensatedFOV] + fadd dword ptr [(allocation)Variables->AdditionalFOV] + fstp dword ptr [(allocation)Variables->FOVOut] + movss $$1,[(allocation)Variables->FOVOut] $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$2,[(allocation)Variables->ScreenRatio] $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)DOF,DOF_cc: + %originalcode% + $$0 $$1,0 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + %originalcode% + $$0 $$2,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 ; Will copy all safe zone offsets + $$0 [$$1],$$2 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + end + + Write_FOV() + WriteAR() + Write_HUD_Safe_Zone_Left() + Write_HUD_Safe_Zone_Right() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, Compensated FOV : %0.2f, FOV Out : %.02f", fFOVIn, fCompensatedFOV, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["DefaultAspectRatio"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function WriteAR() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["AdditionalFOV"] then + if bAspect == true then + Variables["DefaultAspectRatio"]:WriteFloat(fScreenAspectRatio169) + else + Variables["DefaultAspectRatio"]:WriteFloat(fScreenAspectRatio) + end + end + +end + +function Write_HUD_Safe_Zone_Left() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + end + +end + +function Write_HUD_Safe_Zone_Right() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFixEnabled) + Toggle_CodeCave("FOV2_cc",bFixEnabled) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + + Toggle_CodeCave("ASPECT_cc",bAspect) + WriteAR() + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function HUDSZLSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + lblHUD_SZ_LEFT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone_Left() + ForceUpdate() + +end + +function HUDSZRSlider_Changed(Sender) + + fHUDSafeZoneRight = Sender:GetPosition() + lblHUD_SZ_RIGHT.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZoneRight) ) + Write_HUD_Safe_Zone_Right() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..1b76464 Binary files /dev/null and b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..9acf7ee Binary files /dev/null and b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..c00439a Binary files /dev/null and b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Scripts/TheSinkingCityRemastered.lua b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Scripts/TheSinkingCityRemastered.lua new file mode 100644 index 0000000..664ee40 --- /dev/null +++ b/PluginCache/K4sh/Modules/TheSinkingCityRemastered/Dependencies/Scripts/TheSinkingCityRemastered.lua @@ -0,0 +1,279 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.59 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheSinkingCityRemastered-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("EB ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6 8B",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + local Aspect = HackTool:AddAddress("ASPECT", tAddress) + Aspect:OffsetAddress(0x05) + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC364 - F3 0F 58 83 30 02 00 00 - addss xmm0,[rbx+00000230] + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC36C - EB 08 - jmp "TheSinkingCityRemastered-Win64-Shipping.exe"+33AC376 + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC36E - F3 0F 10 83 30 02 00 00 - movss xmm0,[rbx+00000230] + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC376 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC37B - 8B 83 4C 02 00 00 - mov eax,[rbx+0000024C] + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC381 - 89 47 54 - mov [rdi+54],eax + --TheSinkingCityRemastered-Win64-Shipping.exe+33AC384 - 0F B6 8B 51 02 00 00 - movzx ecx,byte ptr [rbx+00000251] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheSinkingCityRemastered-Win64-Shipping.exe+247A9C2 - 75 05 - jne "TheSinkingCityRemastered-Win64-Shipping.exe"+247A9C9 + --TheSinkingCityRemastered-Win64-Shipping.exe+247A9C4 - BF 04 00 00 00 - mov edi,00000004 + --TheSinkingCityRemastered-Win64-Shipping.exe+247A9C9 - 8B 3C 37 - mov edi,[rdi+rsi] + --TheSinkingCityRemastered-Win64-Shipping.exe+247A9CC - 48 8B CB - mov rcx,rbx + --TheSinkingCityRemastered-Win64-Shipping.exe+247A9CF - E8 7C E6 66 01 - call "TheSinkingCityRemastered-Win64-Shipping.exe"+3AE9050 + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("48 8B ?? ?? ?? ?? ?? 44 ?? ?? 7F ?? 44 89 ?? ?? ?? ?? ?? 43",tAddress,PAGE_EXECUTE_READ,0x0a,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheSinkingCityRemastered-Win64-Shipping.exe+3AE5002 - 48 8B 05 D7 92 56 04 - mov rax,["TheSinkingCityRemastered-Win64-Shipping.exe"+804E2E0] + --TheSinkingCityRemastered-Win64-Shipping.exe+3AE5009 - 44 39 38 - cmp [rax],r15d + --TheSinkingCityRemastered-Win64-Shipping.exe+3AE500C - 7F 07 - jg "TheSinkingCityRemastered-Win64-Shipping.exe"+3AE5015 + --TheSinkingCityRemastered-Win64-Shipping.exe+3AE500E - 44 89 BB 2C 1F 00 00 - mov [rbx+00001F2C],r15d + --TheSinkingCityRemastered-Win64-Shipping.exe+3AE5015 - 43 8B 04 26 - mov eax,[r14+r12] + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + Variables:PushByte("ASPECTCHECKED") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + + FOVCalculator = HackTool:InjectFOVCalculator("FOVCalculator") + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + cmp byte ptr [(allocation)Variables->ASPECTCHECKED],1 + jne normalFOV + fld dword [(allocation)Variables->FOVIn] + call (allocation)FOVCalculator + fstp dword ptr [(allocation)Variables->CompensatedFOV] + $$0 $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + normalFOV: + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + if Variables and Variables["ASPECTCHECKED"] and bAspect then + Variables["ASPECTCHECKED"]:WriteByte(1) + end + Toggle_CodeCave("FOV_cc",(bFOV or bAspect)) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + local fFOVCompensated = Variables["CompensatedFOV"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated : %.2f, Out : %.2f", fFOVIn, fFOVCompensated, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + local fFOV = (bFOV or bAspect) + Write_FOV() + Toggle_CodeCave("FOV_cc",fFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["ASPECTCHECKED"] then + if bAspect then + Toggle_CodeCave("FOV_cc",bAspect) + Variables["ASPECTCHECKED"]:WriteByte(1) + else + Variables["ASPECTCHECKED"]:WriteByte(0) + Variables["CompensatedFOV"]:WriteFloat(0) + end + end + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + + local CurrentAspectRatio = DisplayInfo:GetAspectRatio() + local AspectDevisional = CurrentAspectRatio / fAspectRatio169 + + if CurrentAspectRatio < 1.78 then + AspectDevisional = 1.0 + end + + UpdateFOVCalculator("FOVCalculator",AspectDevisional,0.0) + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..dd9f0c6 Binary files /dev/null and b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..6235778 Binary files /dev/null and b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..bcd74c6 Binary files /dev/null and b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Scripts/TintinCOTP.lua b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Scripts/TintinCOTP.lua new file mode 100644 index 0000000..9400f86 --- /dev/null +++ b/PluginCache/K4sh/Modules/TintinCOTP/Dependencies/Scripts/TintinCOTP.lua @@ -0,0 +1,352 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.777777791 +fFactor = 0.00872665 +fHUDSafeZOneLeft = 0 +fHUDSafeZoneRight = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bHUDSafeZone = true +bFPS = true +bFringe = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "UnrealWindow" +Process_EXEName = "Cigars-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,120,0,1) + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+100") + + DefaultControls.AddHeader("HeaderHUDSZ","HUD safe zone",15,160,210,17) + DefaultControls.AddFixedFOVSlider("HUD","HUDSZSlider_Changed",55,190,125,35,0,40,0,1) + HUD:SetTickFrequency(5) + HUD:SetLabel1Text("0") + HUD:SetLabel2Text("40") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","HUD safe zone fix","CKHUDFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKFPSFix_Enable","FPS fix","CKFPSFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration fix","CKFRINGEFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,181,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Cigars-Win64-Shipping.APlayerCameraManager::GetFOVAngle+5D - 74 05 - je Cigars-Win64-Shipping.APlayerCameraManager::GetFOVAngle+64 + --Cigars-Win64-Shipping.APlayerCameraManager::GetFOVAngle+5F - E8 BC D9 3A FE - call Cigars-Win64-Shipping.FMemory::Free + --Cigars-Win64-Shipping.APlayerCameraManager::GetFOVAngle+64 - 0F 28 C6 - movaps xmm0,xmm6 + --Cigars-Win64-Shipping.APlayerCameraManager::GetFOVAngle+67 - 48 8B 8C 24 20 06 00 00 - mov rcx,[rsp+00000620] + --Cigars-Win64-Shipping.APlayerCameraManager::GetFOVAngle+6F - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("HUDSAFEZONE") + + if HackTool:SignatureScan("48 ?? ?? 48 ?? ?? 66 48 ?? ?? ?? FF ?? 48 8B ?? ?? ?? 0F ?? ??",tAddress,PAGE_EXECUTE_READ,0x12,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --O2-Win64-Shipping.exe+32DA69A - FF D0 - call rax + --O2-Win64-Shipping.exe+32DA69C - 48 8B 5C 24 40 - mov rbx,[rsp+40] + --O2-Win64-Shipping.exe+32DA6A1 - 0F 10 00 - movups xmm0,[rax] + --O2-Win64-Shipping.exe+32DA6A4 - 48 8B C7 - mov rax,rdi + --O2-Win64-Shipping.exe+32DA6A7 - 0F 11 07 - movups [rdi],xmm0 + end + + local tAddress = HackTool:AddAddress("FPS") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? EB ?? 0F ?? ?? 48 8B ?? ?? ?? 0F 28",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Cigars-Win64-Shipping.UEngine::GetMaxTickRate+1F4 - 3B 05 5E 81 08 02 - cmp eax,[Cigars-Win64-Shipping.GGameThreadId] + --Cigars-Win64-Shipping.UEngine::GetMaxTickRate+1FA - 0F 95 C3 - setne bl + --Cigars-Win64-Shipping.UEngine::GetMaxTickRate+1FD - F3 0F 10 04 9F - movss xmm0,[rdi+rbx*4] + --Cigars-Win64-Shipping.UEngine::GetMaxTickRate+202 - EB 03 - jmp Cigars-Win64-Shipping.UEngine::GetMaxTickRate+207 + --Cigars-Win64-Shipping.UEngine::GetMaxTickRate+204 - 0F 28 C6 - movaps xmm0,xmm6 + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Cigars-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+7A - 48 8B 05 77 07 36 02 - mov rax,[Cigars-Win64-Shipping.exe+5A72978] + --Cigars-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+81 - 39 30 - cmp [rax],esi + --Cigars-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+83 - 7F 06 - jg Cigars-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+8B + --Cigars-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+85 - 89 B3 84 10 00 00 - mov [rbx+00001084],esi + --Cigars-Win64-Shipping.FSceneView::EndFinalPostprocessSettings+8B - 8B 04 2F - mov eax,[rdi+rbp] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 48",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Cigars-Win64-Shipping.DiaphragmDOF::IsEnabled+30 - 48 8B 05 81 E4 71 03 - mov rax,[Cigars-Win64-Shipping.exe+59BC6E8] + --Cigars-Win64-Shipping.DiaphragmDOF::IsEnabled+37 - 48 8B CB - mov rcx,rbx + --Cigars-Win64-Shipping.DiaphragmDOF::IsEnabled+3A - 8B 78 04 - mov edi,[rax+04] + --Cigars-Win64-Shipping.DiaphragmDOF::IsEnabled+3D - E8 CE 7E 47 01 - call Cigars-Win64-Shipping.FSceneView::GetShaderPlatform + --Cigars-Win64-Shipping.DiaphragmDOF::IsEnabled+42 - 8B C8 - mov ecx,eax + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + Variables:PushFloat("HUDSafeZoneLeft") + Variables:PushFloat("HUDSafeZoneTop") + Variables:PushFloat("HUDSafeZoneRight") + Variables:PushFloat("HUDSafeZoneBottom") + Variables:PushFloat("HUDSafeZoneDefRight") + Variables:PushFloat("HUDSafeZoneDefBottom") + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + Variables["HUDSafeZoneLeft"]:WriteFloat(0) + Variables["HUDSafeZoneTop"]:WriteFloat(0) + Variables["HUDSafeZoneRight"]:WriteFloat(1) + Variables["HUDSafeZoneBottom"]:WriteFloat(1) + Variables["HUDSafeZoneDefRight"]:WriteFloat(1) + Variables["HUDSafeZoneDefBottom"]:WriteFloat(1) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)HUDSAFEZONE,HUDSAFEZONE_cc: + movsd xmm14,[$$2+8] $ctx=1 + ucomisd xmm14,[(allocation)Variables->HUDSafeZoneDefRight] + jne next + $$0 xmm14,[(allocation)Variables->HUDSafeZoneLeft] $ctx=1 + $$0 [$$2],xmm14 $ctx=1 + + next: + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)FPS,FPS_cc: + $$0 $$1,[noLimit] $ctx=1 + jmp %returnaddress% + %end% + + noLimit: (float)0 + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + Toggle_CodeCave("FPS_cc",bFPS) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + Write_HUD_Safe_Zone() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV: %.2f, FOV Out: %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_HUD_Safe_Zone() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["HUDSafeZoneLeft"] and Variables["HUDSafeZoneRight"] then + Variables["HUDSafeZoneLeft"]:WriteFloat(fHUDSafeZOneLeft / 100) + Variables["HUDSafeZoneRight"]:WriteFloat(1 - (fHUDSafeZoneRight / 100)) + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_FOV() + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUDSafeZone = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUDSAFEZONE_cc",bHUDSafeZone) + ForceUpdate() + +end + +function CKFPSFix_Changed(Sender) + + bFPS = Toggle_CheckFix(Sender) + Toggle_CodeCave("FPS_cc",bFPS) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function HUDSZSlider_Changed(Sender) + + fHUDSafeZOneLeft = Sender:GetPosition() + fHUDSafeZoneRight = fHUDSafeZOneLeft + lblHUD.Caption:SetCaption( string.format("+ %.0f %%",fHUDSafeZOneLeft) ) + Write_HUD_Safe_Zone() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..b5909a0 Binary files /dev/null and b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..36772a6 Binary files /dev/null and b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..6e79572 Binary files /dev/null and b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Scripts/TombRaiderRemastered.lua b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Scripts/TombRaiderRemastered.lua new file mode 100644 index 0000000..ad89240 --- /dev/null +++ b/PluginCache/K4sh/Modules/TombRaiderRemastered/Dependencies/Scripts/TombRaiderRemastered.lua @@ -0,0 +1,216 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalPhotoFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "tomb123.exe" +Process_Tomb1DLL = "tomb1.dll" +Process_Tomb2DLL = "tomb2.dll" +Process_Tomb3DLL = "tomb3.dll" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(5) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("PHOTOFOVTomb1") + if HackTool:SignatureScan("0F BF ?? ?? ?? ?? ?? 0F ?? ?? E8 ?? ?? ?? ?? 0F 10 ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_Tomb1DLL) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --tomb2.dll+9B961 - 0F BF C2 - movsx eax,dx + --tomb2.dll+9B964 - 66 89 0D 65 3D 22 00 - mov [tomb2.dll+2BF6D0],cx + --tomb2.dll+9B96B - 0F BF 0D 16 70 08 00 - movsx ecx,word ptr [tomb2.dll+122988] <<== + --tomb2.dll+9B972 - 0F AF C8 - imul ecx,eax + --tomb2.dll+9B975 - E8 F6 0B FF FF - call tomb2.dll+8C570 + end + + local tAddress = HackTool:AddAddress("PHOTOFOVTomb2") + if HackTool:SignatureScan("0F BF ?? ?? ?? ?? ?? 0F ?? ?? E8 ?? ?? ?? ?? 0F 10 ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_Tomb2DLL) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --tomb2.dll+9B961 - 0F BF C2 - movsx eax,dx + --tomb2.dll+9B964 - 66 89 0D 65 3D 22 00 - mov [tomb2.dll+2BF6D0],cx + --tomb2.dll+9B96B - 0F BF 0D 16 70 08 00 - movsx ecx,word ptr [tomb2.dll+122988] <<== + --tomb2.dll+9B972 - 0F AF C8 - imul ecx,eax + --tomb2.dll+9B975 - E8 F6 0B FF FF - call tomb2.dll+8C570 + end + + local tAddress = HackTool:AddAddress("PHOTOFOVTomb3") + if HackTool:SignatureScan("0F BF ?? ?? ?? ?? ?? 0F ?? ?? E8 ?? ?? ?? ?? 0F 10 ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x0,Process_Tomb3DLL) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --tomb2.dll+9B961 - 0F BF C2 - movsx eax,dx + --tomb2.dll+9B964 - 66 89 0D 65 3D 22 00 - mov [tomb2.dll+2BF6D0],cx + --tomb2.dll+9B96B - 0F BF 0D 16 70 08 00 - movsx ecx,word ptr [tomb2.dll+122988] <<== + --tomb2.dll+9B972 - 0F AF C8 - imul ecx,eax + --tomb2.dll+9B975 - E8 F6 0B FF FF - call tomb2.dll+8C570 + end + + return true +end + +function Enable_Inject() + + local TombRaiderDLL = HackTool:GetModuleAddress("tomb2.dll") + + + local Variables = HackTool:AllocateMemory("Variables",256) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushInt("AdditionalPhotoFOV") + Variables:Allocate(TombRaiderDLL) + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalPhotoFOV"]:WriteInt(fAdditionalPhotoFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)PHOTOFOVTomb1,PHOTOFOVTomb1_cc: + %originalcode% + call setFOV + jmp %returnaddress% + %end% + + (codecave:jmp)PHOTOFOVTomb2,PHOTOFOVTomb2_cc: + %originalcode% + call setFOV + jmp %returnaddress% + %end% + + (codecave:jmp)PHOTOFOVTomb3,PHOTOFOVTomb3_cc: + %originalcode% + call setFOV + jmp %returnaddress% + %end% + + setFOV: + cvtsi2ss xmm14,ecx ; Convert int 32 to floating point + movss [(allocation)Variables->FOVIn],xmm14 + add ecx,[(allocation)Variables->AdditionalPhotoFOV] + cvtsi2ss xmm14,ecx + movss [(allocation)Variables->FOVOut],xmm14 + ret + + ]] + + if HackTool:CompileAssembly(asm,"Fixes",TombRaiderDLL) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("PHOTOFOVTomb1_cc",bFOV) + Toggle_CodeCave("PHOTOFOVTomb2_cc",bFOV) + Toggle_CodeCave("PHOTOFOVTomb3_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalPhotoFOV"] then + + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalPhotoFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalPhotoFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalPhotoFOV"] then + if bFOV == true then + Variables["AdditionalPhotoFOV"]:WriteInt(fAdditionalPhotoFOV) + else + Variables["AdditionalPhotoFOV"]:WriteInt(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("PHOTOFOVTomb1_cc",bFOV) + Toggle_CodeCave("PHOTOFOVTomb2_cc",bFOV) + Toggle_CodeCave("PHOTOFOVTomb3_cc",bFOV) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..9e5868a Binary files /dev/null and b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..85d0af7 Binary files /dev/null and b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..ceaa7b0 Binary files /dev/null and b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Scripts/UnchartedLOTC.lua b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Scripts/UnchartedLOTC.lua new file mode 100644 index 0000000..07a42f4 --- /dev/null +++ b/PluginCache/K4sh/Modules/UnchartedLOTC/Dependencies/Scripts/UnchartedLOTC.lua @@ -0,0 +1,473 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fFOV = 0 +fDOF = 0 +fDefaultFOV = 90 +fFactor1 = 0.01745329238 +fFactor2 = 0.5 +fcbIndex = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fDefaultPhotoFOV = 0 +fPhotoFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bPhotoFOV = true +bAspect = true +bAspectRatio = true +bDOF = true +bFringe = true +bBarrelDistortion = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Uncharted: Legacy of Thieves Collection" +Process_ClassName = "Uncharted: Legacy of Thieves Collection" +Process_EXEName = "u4.exe;tll.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +NearToAddress = 0 + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","FOV fine adjustment",15,70,215,17) + DefaultControls.AddFOVSlider("FOVSlider","FOVSlider_Changed",55,90,125,35) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKPHOTOFOVFix_Enable","Photo FOV fix","CKPHOTOFOVFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKAspectFix_Enable","Cinematics aspect fix","CKAspectFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKARatioFix_Enable","Aspect ratio fix","CKARatioFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,181,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberrations fix","CKFRINGEFix_Changed",255,201,180,14) + DefaultControls.AddFixToggle("CKBARRELFix_Enable","Barrel distortion fix","CKBARRELFix_Changed",255,221,180,14) + + DefaultControls.AddHeader("Header_PHOTOFOV","Photo mode FOV fine adjustment",15,150,215,17) + DefaultControls.AddFixedFOVSlider("PHOTOFOVSlider","PhotoFOVSlider_Changed",55,170,125,35,10,170,0,1) + PHOTOFOVSlider:SetTickFrequency(20) + PHOTOFOVSlider:SetLabel1Text("10") + PHOTOFOVSlider:SetLabel2Text("170") + + DefaultControls.AddHeader("HeaderAspectRatio","Game aspect ratio",15,230,215,17) + AspectScalingOptions = {"Automatic detection","Custom value"} + DefaultControls.AddComboBox("AspectScalingCombo","AspectScalingCombo_Changed",AspectScalingOptions,15,255,140,250) + DefaultControls.AddParameterBox("ARatio",DisplayInfo:GetWidth() / DisplayInfo:GetHeight(),"ARatio_Changed",170,257,50,20) + +end + +function Configure_SignatureScan() + + NearToAddress = HackTool:GetBaseAddress() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("C6 83 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? C5 8A",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + if HackTool:SignatureScan("C5 F2 ?? ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? C5 92",tAddress,PAGE_EXECUTE_READ,0x08,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --C5 FA 59 0D 8C 08 4C 01 - vmulss xmm1,xmm0,[tll.exe+2BF3384] + --C5 F2 59 05 3C 0C 4C 01 - vmulss xmm0,xmm1,[tll.exe+2BF373C] + --E8 53 39 DC 00 - call tll.exe+24F6458 + --C5 92 5E C8 - vdivss xmm1,xmm13,xmm0 + --C5 FA 10 05 53 0C 4C 01 - vmovss xmm0,[tll.exe+2BF3764] + end + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --C5 7A 11 AB D0 03 00 00 - vmovss [rbx+000003D0],xmm13 + --C6 83 20 04 00 00 00 - mov byte ptr [rbx+00000420],00 + --E8 A4 6F D7 00 - call u4.exe+23B6418 + --C5 8A 5E C8 - vdivss xmm1,xmm14,xmm0 + --C5 FA 10 05 DC B6 45 01 - vmovss xmm0,[u4.exe+2A9AB5C] + end + + local tAddress = HackTool:AddAddress("PHOTOFOV") + + if HackTool:SignatureScan("C5 FA ?? ?? ?? ?? ?? ?? C5 FA ?? ?? ?? ?? ?? ?? 41 ?? ?? ?? ?? ?? 48 8B ?? ?? ?? ?? ?? 48 83",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + --C5 FA 11 3D 25 D4 A5 02 - vmovss [tll.exe+36732FC],xmm7 + --C5 FA 11 3D 19 D4 A5 02 - vmovss [tll.exe+36732F8],xmm7 + --C5 FA 10 05 2D C7 2A 03 - vmovss xmm0,[tll.exe+3EC2614] + --C5 FA 11 05 BD D3 A5 02 - vmovss [tll.exe+36732AC],xmm0 + --41 BF 01 00 00 00 - mov r15d,00000001 + print( tAddress:GetInfo(TYPE_ADDRESS) ) + + local PhotoDefaultFOV = HackTool:AddAddress("PhotoDefaultFOV", tAddress) + PhotoDefaultFOV:AcquireAddress(0x4) + print( PhotoDefaultFOV:GetInfo(TYPE_FLOAT) ) + end + + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("48 8B ?? ?? ?? ?? ?? 4C 8B ?? ?? ?? ?? ?? ?? 4C 8B ?? 49 C1",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --u4.exe+152D5D2 - C6 87 A9 14 01 00 01 - mov byte ptr [rdi+000114A9],01 + --u4.exe+152D5D9 - C6 87 B8 11 01 00 01 - mov byte ptr [rdi+000111B8],01 + --u4.exe+152D5E0 - 48 8B 0D 99 0A 01 05 - mov rcx,[u4.exe+653E080] + --u4.exe+152D5E7 - 4C 8B AC 24 A0 00 00 00 - mov r13,[rsp+000000A0] + --u4.exe+152D5EF - 4C 8B C1 - mov r8,rcx + end + + local tAddress = HackTool:AddAddress("ARATIO") + + if HackTool:SignatureScan("44 8B ?? ?? ?? ?? ?? 48 ?? ?? 48 89 ?? ?? ?? ?? ?? E8 ?? ?? ?? ?? C5",tAddress,PAGE_EXECUTE_READ,0x11,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("41 8B 87 ?? ?? ?? ?? 41 89 86 ?? ?? ?? ?? 41 C7 86",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --41 8B 87 BC 0C 00 00 - mov eax,[r15+00000CBC] + --41 89 86 D0 27 01 00 - mov [r14+000127D0],eax + --41 8B 87 B0 0C 00 00 - mov eax,[r15+00000CB0] + --41 89 86 D8 27 01 00 - mov [r14+000127D8],eax + --41 C7 86 D4 27 01 00 33 33 33 3F - mov [r14+000127D4],3F333333 + end + + local tAddress = HackTool:AddAddress("EFFECTS") + + if HackTool:SignatureScan("41 8B 86 ?? ?? ?? ?? 89 86 ?? ?? ?? ?? 41 8B 86 ?? ?? ?? ?? 89 86 ?? ?? ?? ?? 41 8B 86 ?? ?? ?? ?? 89 86 ?? ?? ?? ?? 41 8B 87",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + if HackTool:SignatureScan("41 8B 87 ?? ?? ?? ?? 89 86 ?? ?? ?? ?? 41 8B 87 ?? ?? ?? ?? 89 86 ?? ?? ?? ?? 41 8B 87 ?? ?? ?? ?? 89 86 ?? ?? ?? ?? 41 8B 86",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + local Barrel_Distortion_1 = HackTool:AddAddress("BARREL1", tAddress) + local Barrel_Distortion_2 = HackTool:AddAddress("BARREL2", tAddress) + local Fringe = HackTool:AddAddress("FRINGE", tAddress) + Barrel_Distortion_2:OffsetAddress(0x0d) + Fringe:OffsetAddress(0x1a) + + print( Barrel_Distortion_1:GetInfo(TYPE_ADDRESS) ) + print( Barrel_Distortion_2:GetInfo(TYPE_ADDRESS) ) + print( Fringe:GetInfo(TYPE_ADDRESS) ) + end + else + local Barrel_Distortion_1 = HackTool:AddAddress("BARREL1", tAddress) + local Barrel_Distortion_2 = HackTool:AddAddress("BARREL2", tAddress) + local Fringe = HackTool:AddAddress("FRINGE", tAddress) + Barrel_Distortion_2:OffsetAddress(0x0d) + Fringe:OffsetAddress(0x1a) + + print( Barrel_Distortion_1:GetInfo(TYPE_ADDRESS) ) + print( Barrel_Distortion_2:GetInfo(TYPE_ADDRESS) ) + print( Fringe:GetInfo(TYPE_ADDRESS) ) + --u4.exe+1733F80 - 41 8B 86 4C 0D 00 00 - mov eax,[r14+00000D4C] + --u4.exe+1733F87 - 89 86 3C 01 00 00 - mov [rsi+0000013C],eax + --u4.exe+1733F8D - 41 8B 86 50 0D 00 00 - mov eax,[r14+00000D50] + --u4.exe+1733F94 - 89 86 40 01 00 00 - mov [rsi+00000140],eax + --u4.exe+1733F9A - 41 8B 87 A8 10 01 00 - mov eax,[r15+000110A8] + end + + return true + +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVInGame") + Variables:PushFloat("PhotoFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("Factor1") + Variables:PushFloat("Factor2") + Variables:PushFloat("DOF") + Variables:PushFloat("AspectRatio") + Variables:Allocate(NearToAddress) + Variables["FOVInGame"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["Factor1"]:WriteFloat(fFactor1) + Variables["Factor2"]:WriteFloat(fFactor2) + Variables["DOF"]:WriteFloat(fDOF) + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + vmovss xmm0,[rbx+0x30] + vmovss [(allocation)Variables->FOVInGame],xmm0 + vaddss xmm0,xmm0,[(allocation)Variables->AdditionalFOV] + vmulss xmm1,xmm0,[(allocation)Variables->Factor1] + vmulss xmm0,xmm1,[(allocation)Variables->Factor2] + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ARATIO,ARATIO_cc: + %originalcode% + vmovss xmm0,[(allocation)Variables->AspectRatio] + jmp %returnaddress% + %end% + + (codecave)PHOTOFOV,PHOTOFOV_cc: + vmovss xmm0,[(allocation)Variables->PhotoFOV] + %end% + + (codecave)ASPECT,ASPECT_cc: + $$0 $$1,[$$2-0x10] $ctx=1 + %end% + + (codecave)DOF,DOF_cc: + mov $$1,0x7F800000 $ctx=1 + nop + nop + %end% + + (codecave)BARREL1,BARREL1_cc: + xor $$1,$$1 $ctx=1 + nop + nop + nop + nop + nop + %end% + + (codecave)BARREL2,BARREL2_cc: + $$0 $$1,(float)1.00 $ctx=1 + nop + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + xor $$1,$$1 $ctx=1 + nop + nop + nop + nop + nop + %end% + + ]] + + + if HackTool:CompileAssembly(asm,"Fixes",NearToAddress) == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("PHOTOFOV_cc",bPhotoFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("ARATIO_cc",bAspectRatio) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + Toggle_CodeCave("BARREL1_cc",bBarrelDistortion) + Toggle_CodeCave("BARREL2_cc",bBarrelDistortion) + end + + Write_FOV() + Write_PhotoFOV() + Write_AspectRatio() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVInGame"] and Variables["AdditionalFOV"] then + fFOVInGame = Variables["FOVInGame"]:ReadFloat() + Variables["AdditionalFOV"]:ReadFloat() + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.f, FOV Out: %.0f\r\nPhoto mode default FOV: %.2f",Variables["FOVInGame"]:ReadFloat(), fFOVInGame, fDefaultPhotoFOV)) + end + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fFOV) + end + +end + +function Write_PhotoFOV() + + local FOV = 0 + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["PhotoFOV"] then + if bFOV then + FOV = fFOV + end + Variables["PhotoFOV"]:WriteFloat(fPhotoFOV - FOV) + end + +end + +function Write_DOF() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["DOF"] then + Variables["DOF"]:WriteFloat(fDOF) + end + +end + +function FOVSlider_Changed(Sender) + + fFOV = (Sender:GetScaledFloat(2)) + 7 + lblFOVSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fFOV) ) + Write_FOV() + ForceUpdate() + +end + +function PhotoFOVSlider_Changed(Sender) + + fPhotoFOV = Sender:GetPosition() + lblPHOTOFOVSlider.Caption:SetCaption( string.format("Value: %.2f",fPhotoFOV) ) + Write_PhotoFOV() + ForceUpdate() + +end + +function ARatio_Changed() + + fAspectRatio = ARatio:GetText() + Write_AspectRatio() + ForceUpdate() + +end + +function Write_AspectRatio() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + +end + +function DOFSlider_Changed(Sender) + + fDOF = ((Sender:GetScaledFloat(2)) + 50) / 3 + lblDOFSlider.Caption:SetCaption( string.format("Additional FOV : %.2f",fDOF) ) + Write_DOF() + ForceUpdate() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOV_cc",bFOV) + Write_PhotoFOV() + ForceUpdate() + +end + +function CKPHOTOFOVFix_Changed(Sender) + + bPhotoFOV = Toggle_CheckFix(Sender) + local PhotoDefaultFOV = HackTool:GetAddress("PhotoDefaultFOV") + + if PhotoDefaultFOV then + fDefaultPhotoFOV = PhotoDefaultFOV:ReadFloat() + end + + Toggle_CodeCave("PHOTOFOV_cc",bPhotoFOV) + ForceUpdate() +end + +function CKAspectFix_Changed(Sender) + + bAspect= Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKARatioFix_Changed(Sender) + + bAspectRatio = Toggle_CheckFix(Sender) + Toggle_CodeCave("ARATIO_cc",bAspectRatio) + AspectScalingCombo:SetEnabled(bAspectRatio) + fcbIndex = AspectScalingCombo:GetSelectedIndex() + + if bAspectRatio == false or fcbIndex == 1 then + ARatio:SetEnabled(bAspectRatio) + end + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function CKBARRELFix_Changed(Sender) + + bBarrelDistortion = Toggle_CheckFix(Sender) + Toggle_CodeCave("BARREL1_cc",bBarrelDistortion) + Toggle_CodeCave("BARREL2_cc",bBarrelDistortion) + ForceUpdate() + +end + +function AspectScalingCombo_Changed(Sender) + + fcbIndex = AspectScalingCombo:GetSelectedIndex() + + if fcbIndex == 0 then + ARatio:SetEnabled(false) + ARatio:SetText(DisplayInfo:GetWidth() / DisplayInfo:GetHeight()) + else + ARatio:SetEnabled(true) + end + + fAspectRatio = ARatio:GetText() + Write_AspectRatio() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Disable_Inject() + + CleanUp() + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..f1a0b49 Binary files /dev/null and b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..6639cb0 Binary files /dev/null and b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..38ae63e Binary files /dev/null and b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Scripts/UnderTheWaves.lua b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Scripts/UnderTheWaves.lua new file mode 100644 index 0000000..d1e6ccc --- /dev/null +++ b/PluginCache/K4sh/Modules/UnderTheWaves/Dependencies/Scripts/UnderTheWaves.lua @@ -0,0 +1,218 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fAdditionalFOV = 0 +fDefaultAspectRatio = 1.777777791 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +AdditionalFOV = 1.0 + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "Under The Waves " +Process_ClassName = "*" +Process_EXEName = "UnderTheWaves-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 0 +WriteInterval = 500 +SearchInterval = 500 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVAdjustment_Enable","FOV Adjustment","CKFOV_Changed",255,100,180,14) + DefaultControls.AddFixToggle("CKDisableLetterBox_Enable","Disable letterbox","CKAspect_Changed",255,120,210,14) + + DefaultControls.AddHeader("Header_FOV","FOV Fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("0") + FOVSlider:SetLabel2Text("90") + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + if HackTool:SignatureScan("74 ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 8B ?? ?? ?? ?? ?? ?? 48 ?? ?? E8 ?? ?? ?? ?? 0F 28 ?? ?? ?? ?? ?? ?? 48 81 ?? ?? ?? ?? ?? C3",tAddress,PAGE_EXECUTE_READ,0x07,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --UnderTheWaves-Win64-Shipping.APlayerCameraManager::GetFOVAngle+5D - 74 05 - je UnderTheWaves-Win64-Shipping.APlayerCameraManager::GetFOVAngle+64 + --UnderTheWaves-Win64-Shipping.APlayerCameraManager::GetFOVAngle+5F - E8 FC 63 39 FE - call UnderTheWaves-Win64-Shipping.FMemory::Free + --UnderTheWaves-Win64-Shipping.APlayerCameraManager::GetFOVAngle+64 - 0F 28 C6 - movaps xmm0,xmm6 + --UnderTheWaves-Win64-Shipping.APlayerCameraManager::GetFOVAngle+67 - 48 8B 8C 24 20 06 00 00 - mov rcx,[rsp+00000620] + --UnderTheWaves-Win64-Shipping.APlayerCameraManager::GetFOVAngle+6F - 48 33 CC - xor rcx,rsp + end + + local tAddress = HackTool:AddAddress("Aspect") + if HackTool:SignatureScan("F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? 8B 83 ?? ?? ?? ?? 89 47 ?? 0F B6 83 ?? ?? ?? ?? 33 ?? ??",tAddress,PAGE_EXECUTE_READ,0x1d,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --UnderTheWaves-Win64-Shipping.UCameraComponent::GetCameraView+F05 - 89 47 2C - mov [rdi+2C],eax + --UnderTheWaves-Win64-Shipping.UCameraComponent::GetCameraView+F08 - 0F B6 83 0C 02 00 00 - movzx eax,byte ptr [rbx+0000020C] + --UnderTheWaves-Win64-Shipping.UCameraComponent::GetCameraView+F0F - 33 47 30 - xor eax,[rdi+30] + --UnderTheWaves-Win64-Shipping.UCameraComponent::GetCameraView+F12 - 83 E0 01 - and eax,01 + --UnderTheWaves-Win64-Shipping.UCameraComponent::GetCameraView+F15 - 31 47 30 - xor [rdi+30],eax + end + + local tAddress = HackTool:AddAddress("Aspect2") + if HackTool:SignatureScan("0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 76 ?? F3 0F ?? ?? ?? ?? ?? ?? F3 0F ?? ?? F3 0F 59 ?? ?? ?? ?? ??",tAddress,PAGE_EXECUTE_READ,0x29,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + --UnderTheWaves-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+D9 - F3 0F 10 05 97 CD 41 01 - movss xmm0,[UnderTheWaves-Win64-Shipping.exe+3C28168] + --UnderTheWaves-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+E1 - F3 0F 5E C1 - divss xmm0,xmm1 + --UnderTheWaves-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+E5 - F3 0F 59 83 DC 07 00 00 - mulss xmm0,[rbx+000007DC] + --UnderTheWaves-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+ED - E8 81 77 35 01 - call UnderTheWaves-Win64-Shipping.atanf + --UnderTheWaves-Win64-Shipping.UCineCameraComponent::RecalcDerivedData+F2 - F3 0F 59 05 CA 1F 9F 01 - mulss xmm0,[UnderTheWaves-Win64-Shipping.exe+41FD3B4] + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + end + + + return true + +end + + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOV_In") + Variables:PushFloat("FOV_Out") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:Allocate() + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + movss [(allocation)Variables->FOV_In],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOV_Out],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)Aspect2,Aspect2_cc: + movss xmm15,[$$2+4] $ctx=1 + mulss xmm15,[(allocation)Variables->AspectRatio] + mulss $$1,xmm15 $ctx=1 + jmp %returnaddress% + %end% + + (codecave)Aspect,Aspect_cc: + $$0 $$1,$$1 $ctx=1 + nop + %end% + ]] + + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("Aspect_cc",bAspect) + Toggle_CodeCave("Aspect2_cc",bAspect) + end + + if bFOV == true then + WriteFOV() + end + +end + +function Periodic() + + PluginViewport:AppendStatusMessage( "\r\n" ) + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + + if bFOV == true then + PluginViewport:AppendStatusMessage( string.format("FOV In=%.2f, Out=%.2f", Variables["FOV_In"]:ReadFloat(),Variables["FOV_Out"]:ReadFloat() ) ) + end + + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + if bFOV == true then + WriteFOV() + end + + ForceUpdate() + +end + +function CKFOV_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + + if bFOV == true then + WriteFOV() + end + + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKAspect_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("Aspect_cc",bAspect) + Toggle_CodeCave("Aspect2_cc",bAspect) + ForceUpdate() + +end + +function ResolutionChanged() + + fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() + +end + +function WriteFOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + end + +end + +function Init() + Init_BaseControls() + Init_Controls() +end + +function DeInit() + DisableFix() +end diff --git a/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..01a2943 Binary files /dev/null and b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..496ef58 Binary files /dev/null and b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..23a62c5 Binary files /dev/null and b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Scripts/Unknown9Awakening.lua b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Scripts/Unknown9Awakening.lua new file mode 100644 index 0000000..68b48a1 --- /dev/null +++ b/PluginCache/K4sh/Modules/Unknown9Awakening/Dependencies/Scripts/Unknown9Awakening.lua @@ -0,0 +1,311 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fHUD_Left_Max = (DisplayInfo:GetWidth() - ((DisplayInfo:GetHeight() * 16) / 9)) / 2 +fHUD_Top_Max = 200 +fHUD_Right_Max = fHUD_Left_Max +fHUD_Bottom_Max = 200 +fHUD_Left_Min = -250 +fHUD_Top_Min = -60 +fHUD_Right_Min = -250 +fHUD_Bottom_Min = -60 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bHUD = true +bDOF = true +bFog = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "U9-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKASPECTFix_Enable","Aspect ratio fix","CKASPECTFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKHUDFix_Enable","Unlock HUD scaling","CKHUDFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,161,180,14) + DefaultControls.AddFixToggle("CKFOGFix_Enable","Fog removal fix","CKFOGFix_Changed",255,181,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0b,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --U9-Win64-Shipping.exe+3285704 - 48 8B 01 - mov rax,[rcx] + --U9-Win64-Shipping.exe+3285707 - FF 90 80 06 00 00 - call qword ptr [rax+00000680] + --U9-Win64-Shipping.exe+328570D - F3 0F 10 40 18 - movss xmm0,[rax+18] + --U9-Win64-Shipping.exe+3285712 - 48 83 C4 28 - add rsp,28 + --U9-Win64-Shipping.exe+3285716 - C3 - ret + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6 ?? ?? ?? ?? ?? 33 ?? ?? 83 ?? ?? 31 ?? ?? 0F B6",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --U9-Win64-Shipping.exe+2EA8E22 - F3 0F 10 83 F8 01 00 00 - movss xmm0,[rbx+000001F8] + --U9-Win64-Shipping.exe+2EA8E2A - F3 0F 11 47 18 - movss [rdi+18],xmm0 + --U9-Win64-Shipping.exe+2EA8E2F - 8B 83 08 02 00 00 - mov eax,[rbx+00000208] + --U9-Win64-Shipping.exe+2EA8E35 - 89 47 2C - mov [rdi+2C],eax + --U9-Win64-Shipping.exe+2EA8E38 - 0F B6 83 0C 02 00 00 - movzx eax,byte ptr [rbx+0000020C] + end + + local tResultCount = HackTool:SignatureScanMulti("F3 0F ?? ?? ?? ?? ?? ?? 73 ?? F3 0F ?? ?? ?? ?? 0F ?? ?? EB ?? 0F ?? ?? 72 ?? F3 0F ?? ?? ?? ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 0F ?? ?? F3 0F ?? ?? ?? ?? ?? ?? 73 ?? F3 0F","HUDS",PAGE_EXECUTE_READ,0x0,Process_EXEName) + + if tResultCount ~= 4 then + return ErrorOccurred("Could not find HUDS injection point, " .. Process_FriendlyName .. + " may have updated to a version that is no longer supported.\r\n\r\n" .. + "Try selecting a different version and re-enable the fix." ) + else + local tAddress = HackTool:AddAddress("HUD", HackTool:GetAddress( string.format("HUDS%d",3) )) + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --U9-Win64-Shipping.exe+3999866 - F3 0F 10 99 38 04 00 00 - movss xmm3,[rcx+00000438] + --U9-Win64-Shipping.exe+399986E - 0F 2F C3 - comiss xmm0,xmm3 + --U9-Win64-Shipping.exe+3999871 - F3 0F 10 91 28 04 00 00 - movss xmm2,[rcx+00000428] + --U9-Win64-Shipping.exe+3999879 - 73 0B - jae U9-Win64-Shipping.exe+3999886 + --U9-Win64-Shipping.exe+399987B - F3 0F 11 5C 24 20 - movss [rsp+20],xmm3 + end + + local tAddress = HackTool:AddAddress("DOF") -- r.DepthOfFieldQuality + + if HackTool:SignatureScan("8B ?? ?? E8 ?? ?? ?? ?? 8B ?? E8 ?? ?? ?? ?? 84 ?? 74 ?? 48 ?? ?? F7",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --U9-Win64-Shipping.exe+1E8FF20 - 48 8B 05 C1 35 5B 04 - mov rax,[U9-Win64-Shipping.exe+64434E8] + --U9-Win64-Shipping.exe+1E8FF27 - 48 8B CB - mov rcx,rbx + --U9-Win64-Shipping.exe+1E8FF2A - 8B 78 04 - mov edi,[rax+04] + --U9-Win64-Shipping.exe+1E8FF2D - E8 3E 4E 48 01 - call U9-Win64-Shipping.exe+3314D70 + --U9-Win64-Shipping.exe+1E8FF32 - 8B C8 - mov ecx,eax + end + + local tAddress = HackTool:AddAddress("FOG") -- r.fog + + if HackTool:SignatureScan("75 ?? B3 ?? EB ?? 32 ?? 48 ?? ?? ?? ?? 48 ?? ?? 74 ?? E8 ?? ?? ?? ?? 0F",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --U9-Win64-Shipping.exe+1CFC14D - 48 8B 05 24 17 6F 04 - mov rax,[U9-Win64-Shipping.exe+63ED878] + --U9-Win64-Shipping.exe+1CFC154 - 83 78 04 01 - cmp dword ptr [rax+04],01 + --U9-Win64-Shipping.exe+1CFC158 - 75 04 - jne U9-Win64-Shipping.exe+1CFC15E + --U9-Win64-Shipping.exe+1CFC15A - B3 01 - mov bl,01 + --U9-Win64-Shipping.exe+1CFC15C - EB 02 - jmp U9-Win64-Shipping.exe+1CFC160 + end + + return true + +end + +function Enable_Inject() + local Variables = HackTool:AllocateMemory("Variables",50) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("ScreenRatio") + + Variables:PushFloat("Hud_Left_Max") + Variables:PushFloat("Hud_Top_Max") + Variables:PushFloat("Hud_Right_Max") + Variables:PushFloat("Hud_Bottom_Max") + Variables:PushFloat("Hud_Left_Min") + Variables:PushFloat("Hud_Top_Min") + Variables:PushFloat("Hud_Right_Min") + Variables:PushFloat("Hud_Bottom_Min") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["Hud_Left_Max"]:WriteFloat(fHUD_Left_Max) + Variables["Hud_Top_Max"]:WriteFloat(fHUD_Top_Max) + Variables["Hud_Right_Max"]:WriteFloat(fHUD_Right_Max) + Variables["Hud_Bottom_Max"]:WriteFloat(fHUD_Bottom_Max) + Variables["Hud_Left_Min"]:WriteFloat(fHUD_Left_Min) + Variables["Hud_Top_Min"]:WriteFloat(fHUD_Top_Min) + Variables["Hud_Right_Min"]:WriteFloat(fHUD_Right_Min) + Variables["Hud_Bottom_Min"]:WriteFloat(fHUD_Bottom_Min) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + (codecave:jmp)HUD,HUD_cc: + movups $$1,[(allocation)Variables->Hud_Left_Max] $ctx=1 + movups [$$2],$$1 $ctx=1 + movups $$1,[(allocation)Variables->Hud_Left_Min] $ctx=1 + movups [$$2+0x10],$$1 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)ASPECT,ASPECT_cc: + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FOG,FOG_cc: + jmp $$1 $ctx=1 + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("HUD_cc",bHUD) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FOG_cc",bFog) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Out : %.2f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKASPECTFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + ForceUpdate() + +end + +function CKHUDFix_Changed(Sender) + + bHUD = Toggle_CheckFix(Sender) + Toggle_CodeCave("HUD_cc",bHUD) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFOGFix_Changed(Sender) + + bFog = Toggle_CheckFix(Sender) + Toggle_CodeCave("FOG_cc",bFog) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..abbce66 Binary files /dev/null and b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..f58a93c Binary files /dev/null and b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..1b81819 Binary files /dev/null and b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Scripts/UntilDawn.lua b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Scripts/UntilDawn.lua new file mode 100644 index 0000000..51ba1d7 --- /dev/null +++ b/PluginCache/K4sh/Modules/UntilDawn/Dependencies/Scripts/UntilDawn.lua @@ -0,0 +1,194 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 90 +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true +bDOF = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Bates-Win64-Shipping.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 100 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + FOVSlider:SetTickFrequency(10) + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field fix","CKDOFFix_Changed",255,121,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("77 ?? 48 ?? ?? FF 90 ?? ?? ?? ?? F3 0F ?? ?? ?? 48 83",tAddress,PAGE_EXECUTE_READ,0x10,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bates-Win64-Shipping.exe+3399C74 - 48 8B 01 - mov rax,[rcx] + --Bates-Win64-Shipping.exe+3399C77 - FF 90 58 07 00 00 - call qword ptr [rax+00000758] + --Bates-Win64-Shipping.exe+3399C7D - F3 0F 10 40 30 - movss xmm0,[rax+30] + --Bates-Win64-Shipping.exe+3399C82 - 48 83 C4 28 - add rsp,28 + --Bates-Win64-Shipping.exe+3399C86 - C3 - ret + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("8B ?? ?? 48 8B ?? E8 ?? ?? ?? ?? 0F ?? ?? 48 6B",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Bates-Win64-Shipping.exe+1F1BC03 - 75 05 - jne Bates-Win64-Shipping.exe+1F1BC0A + --Bates-Win64-Shipping.exe+1F1BC05 - BF 04 00 00 00 - mov edi,00000004 + --Bates-Win64-Shipping.exe+1F1BC0A - 8B 3C 37 - mov edi,[rdi+rsi] + --Bates-Win64-Shipping.exe+1F1BC0D - 48 8B CB - mov rcx,rbx + --Bates-Win64-Shipping.exe+1F1BC10 - E8 2B 90 53 01 - call Bates-Win64-Shipping.exe+3454C40 + end + + return true + +end + +function Enable_Inject() + local NearTo = HackTool:GetModuleAddress(Process_EXEName) + local Variables = HackTool:AllocateMemory("Variables", 0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + movss [(allocation)Variables->FOVIn],xmm0 + addss xmm0,[(allocation)Variables->AdditionalFOV] + movss [(allocation)Variables->FOVOut],xmm0 + %originalcode% + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + ]] + + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("DOF_cc",bDOF) + end + + Write_FOV() + +end + +function Periodic() + + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Out : %.2f", fFOVIn, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("World FOV: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/WHYDF/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..f55447c Binary files /dev/null and b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/WHYDF/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..7b2d3cc Binary files /dev/null and b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/WHYDF/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..624ec2d Binary files /dev/null and b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/WHYDF/Dependencies/Scripts/WHYDF.lua b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Scripts/WHYDF.lua new file mode 100644 index 0000000..65f0e51 --- /dev/null +++ b/PluginCache/K4sh/Modules/WHYDF/Dependencies/Scripts/WHYDF.lua @@ -0,0 +1,291 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 +fAdditionalOtherFOV = 0 +fAspectRatio = DisplayInfo:GetWidth() / DisplayInfo:GetHeight() +fAspectRatio169 = 1.778 +fFactor = 0.00872665 + +--ControlVars +bFixEnabled = true +bFOV = true +bAspect = true +bDOF = true +bFringe = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "TheElysianWoods-Win64-Shipping.exe" +-- LOTF2-Win64-Shipping.exe + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = true + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,70,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+50") + + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddFixToggle("CKARFix_Enable","Aspect ratio fix","CKARFix_Changed",255,121,180,14) + DefaultControls.AddFixToggle("CKDOFFix_Enable","Depth of field disable","CKDOFFix_Changed",255,141,180,14) + DefaultControls.AddFixToggle("CKFRINGEFix_Enable","Chromatic aberration fix","CKFRINGEFix_Changed",255,161,180,14) + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("F3 0F ?? ?? ?? 48 ?? ?? ?? 48 ?? ?? 4C ?? ?? ?? 48 ?? ?? FF",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheElysianWoods-Win64-Shipping.exe+3A670DB - 48 8B 01 - mov rax,[rcx] + --TheElysianWoods-Win64-Shipping.exe+3A670DE - FF 90 80 07 00 00 - call qword ptr [rax+00000780] + --TheElysianWoods-Win64-Shipping.exe+3A670E4 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --TheElysianWoods-Win64-Shipping.exe+3A670E9 - 48 8B 4D 30 - mov rcx,[rbp+30] + --TheElysianWoods-Win64-Shipping.exe+3A670ED - 48 8B 01 - mov rax,[rcx] + end + + local tAddress = HackTool:AddAddress("ASPECT") + + if HackTool:SignatureScan("8B 83 ?? ?? ?? ?? 89 ?? ?? 0F B6 ?? ?? ?? ?? ?? 33 ?? ?? 83",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheElysianWoods-Win64-Shipping.exe+36FAB57 - F3 0F 11 47 30 - movss [rdi+30],xmm0 + --TheElysianWoods-Win64-Shipping.exe+36FAB5C - 0F 57 C0 - xorps xmm0,xmm0 + --TheElysianWoods-Win64-Shipping.exe+36FAB5F - 8B 83 B0 02 00 00 - mov eax,[rbx+000002B0] + --TheElysianWoods-Win64-Shipping.exe+36FAB65 - 89 47 48 - mov [rdi+48],eax + --TheElysianWoods-Win64-Shipping.exe+36FAB68 - 0F B6 83 B4 02 00 00 - movzx eax,byte ptr [rbx+000002B4] + end + + local tAddress = HackTool:AddAddress("DOF") + + if HackTool:SignatureScan("48 8B ?? 8B ?? ?? E8 ?? ?? ?? ?? 48 ?? ?? 48 ?? ?? ?? 48 8D",tAddress,PAGE_EXECUTE_READ,0x03,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheElysianWoods-Win64-Shipping.exe+25079E4 - 48 8B 05 FD ED F0 03 - mov rax,[TheElysianWoods-Win64-Shipping.exe+64167E8] + --TheElysianWoods-Win64-Shipping.exe+25079EB - 48 8B CB - mov rcx,rbx + --TheElysianWoods-Win64-Shipping.exe+25079EE - 8B 78 04 - mov edi,[rax+04] + --TheElysianWoods-Win64-Shipping.exe+25079F1 - E8 AA 68 80 01 - call TheElysianWoods-Win64-Shipping.exe+3D0E2A0 + --TheElysianWoods-Win64-Shipping.exe+25079F6 - 48 63 C8 - movsxd rcx,eax + end + + local tAddress = HackTool:AddAddress("FRINGE") + + if HackTool:SignatureScan("7F ?? 89 B3 ?? ?? ?? ?? 8B ?? ?? 39 05",tAddress,PAGE_EXECUTE_READ,0x0,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --TheElysianWoods-Win64-Shipping.exe+3D0BD85 - 48 8B 05 54 98 7D 02 - mov rax,[TheElysianWoods-Win64-Shipping.exe+64E55E0] + --TheElysianWoods-Win64-Shipping.exe+3D0BD8C - 39 30 - cmp [rax],esi + --TheElysianWoods-Win64-Shipping.exe+3D0BD8E - 7F 06 - jg TheElysianWoods-Win64-Shipping.exe+3D0BD96 + --TheElysianWoods-Win64-Shipping.exe+3D0BD90 - 89 B3 DC 1D 00 00 - mov [rbx+00001DDC],esi + --TheElysianWoods-Win64-Shipping.exe+3D0BD96 - 8B 04 2F - mov eax,[rdi+rbp] + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("CompensatedFOV") + Variables:PushFloat("AdditionalFOV") + Variables:PushFloat("AspectRatio") + Variables:PushFloat("ScreenRatio") + Variables:PushFloat("factor") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + Variables["AspectRatio"]:WriteFloat(fAspectRatio169) + Variables["ScreenRatio"]:WriteFloat(fAspectRatio) + Variables["factor"]:WriteFloat(fFactor) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + $$0 [(allocation)Variables->FOVIn],$$2 $ctx=1 + fld dword ptr [(allocation)Variables->FOVIn] + fmul dword ptr [(allocation)Variables->factor] + fptan + fstp st0 + fld dword ptr [(allocation)Variables->ScreenRatio] + fdiv dword ptr [(allocation)Variables->AspectRatio] + fmulp st1,st0 + fld1 + fpatan + fdiv dword ptr [(allocation)Variables->factor] ; calculate compensated FOV + fstp dword ptr [(allocation)Variables->CompensatedFOV] ; and retrieve it + movss $$2,[(allocation)Variables->CompensatedFOV] $ctx=1 + addss $$2,[(allocation)Variables->AdditionalFOV] $ctx=1 + movss [(allocation)Variables->FOVOut],$$2 $ctx=1 + %originalcode% + jmp %returnaddress% + %end% + + (codecave:jmp)ASPECT,ASPECT_cc: + fld dword ptr [$$2] $ctx=1 + fstp dword ptr[(allocation)Variables->AspectRatio] + $$0 $$1,[(allocation)Variables->ScreenRatio] $ctx=1 + jmp %returnaddress% + %end% + + (codecave)DOF,DOF_cc: + xor $$1,$$1 $ctx=1 + nop + %end% + + (codecave)FRINGE,FRINGE_cc: + nop + nop + %end% + +]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + Toggle_CodeCave("ASPECT_cc",bAspect) + Toggle_CodeCave("DOF_cc",bDOF) + Toggle_CodeCave("FRINGE_cc",bFringe) + end + + Write_FOV() + Write_AR() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fCompensatedFOV = Variables["CompensatedFOV"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %.2f, Compensated FOV : %.2f, FOV Out : %.2f", fFOVIn, fCompensatedFOV, fFOVOut)) + end + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Write_AR() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AspectRatio"] then + if bAspect ~= true then + Variables["AspectRatio"]:WriteFloat(fAspectRatio) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function CKARFix_Changed(Sender) + + bAspect = Toggle_CheckFix(Sender) + Toggle_CodeCave("ASPECT_cc",bAspect) + Write_AR() + ForceUpdate() + +end + +function CKDOFFix_Changed(Sender) + + bDOF = Toggle_CheckFix(Sender) + Toggle_CodeCave("DOF_cc",bDOF) + ForceUpdate() + +end + +function CKFRINGEFix_Changed(Sender) + + bFringe = Toggle_CheckFix(Sender) + Toggle_CodeCave("FRINGE_cc",bFringe) + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Icons/LargeIcon.png b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Icons/LargeIcon.png new file mode 100644 index 0000000..674605f Binary files /dev/null and b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Icons/LargeIcon.png differ diff --git a/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Icons/SmallIcon.png b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Icons/SmallIcon.png new file mode 100644 index 0000000..8e40044 Binary files /dev/null and b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Icons/SmallIcon.png differ diff --git a/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Images/Background.jpg b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Images/Background.jpg new file mode 100644 index 0000000..ffe663c Binary files /dev/null and b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Images/Background.jpg differ diff --git a/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Scripts/WHammerSpaceMarineII.lua b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Scripts/WHammerSpaceMarineII.lua new file mode 100644 index 0000000..1541198 --- /dev/null +++ b/PluginCache/K4sh/Modules/WHammerSpaceMarineII/Dependencies/Scripts/WHammerSpaceMarineII.lua @@ -0,0 +1,172 @@ +require(GlobalDependencys:GetDependency("StandardBase"):GetPackageName()) + +--GAME VARS +fDefaultFOV = 85 +fAdditionalFOV = 0 + +--ControlVars +bFixEnabled = true +bFOV = true + +--PROCESS VARS +Process_FriendlyName = Module:GetFriendlyName() +Process_WindowName = "*" +Process_ClassName = "*" +Process_EXEName = "Warhammer 40000 Space Marine 2 - Retail.exe" + +--INJECTION BEHAVIOUR +InjectDelay = 500 +WriteInterval = 100 +SearchInterval = 100 +SuspendThread = false + +--Name Manual/Auto/Hybrid Steam/Origin/Any IncludeFile:Configure;Enable;Periodic;Disable; +SupportedVersions = { +{"Automatically Detect", "Hybrid", "Any", "Configure_SignatureScan;Enable_Inject;Periodic;Disable_Inject;"}, +} + +function Init_Controls() + + DefaultControls.AddHeader("Header_FixesEnableDisable","Individual Fixes",245,70,210,17) + DefaultControls.AddFixToggle("CKFOVFix_Enable","FOV fix","CKFOVFix_Changed",255,101,180,14) + DefaultControls.AddHeader("Header_FOV","In game FOV fine adjustment",15,70,210,17) + DefaultControls.AddFixedFOVSlider("FOVSlider","FOVSlider_Changed",55,100,125,35,0,90,0,1) + + FOVSlider:SetTickFrequency(10) + FOVSlider:SetLabel1Text("-20") + FOVSlider:SetLabel2Text("+70") + + +end + +function Configure_SignatureScan() + + local tAddress = HackTool:AddAddress("FOV") + + if HackTool:SignatureScan("57 48 83 ?? ?? 0F 29 ?? ?? ?? 48 8B ?? F3 0F ?? ?? ?? 48 ?? ?? ?? E8 ?? ?? ?? ?? 48",tAddress,PAGE_EXECUTE_READ,0x0d,Process_EXEName) == 0 then + return ErrorOccurred(string.format(SigScanError,tAddress:GetName())) + else + print( tAddress:GetInfo(TYPE_ADDRESS) ) + --Warhammer 40000 Space Marine 2 - Retail.exe+13041AA: 0F 29 74 24 20 - movaps [rsp+20],xmm6 + --Warhammer 40000 Space Marine 2 - Retail.exe+13041AF: 48 8B D9 - mov rbx,rcx + --Warhammer 40000 Space Marine 2 - Retail.exe+13041B2: F3 0F 10 71 6C - movss xmm6,[rcx+6C] + --Warhammer 40000 Space Marine 2 - Retail.exe+13041B7: 48 83 C1 50 - add rcx,50 + --Warhammer 40000 Space Marine 2 - Retail.exe+13041BB: E8 70 A3 93 00 - call "Warhammer 40000 Space Marine 2 - Retail.exe"+1C3E530 + end + + return true +end + +function Enable_Inject() + + local Variables = HackTool:AllocateMemory("Variables",0) + Variables:PushFloat("FOVIn") + Variables:PushFloat("FOVOut") + Variables:PushFloat("AdditionalFOV") + + Variables:Allocate() + Variables["FOVIn"]:WriteFloat(fDefaultFOV) + Variables["FOVOut"]:WriteFloat(fDefaultFOV) + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + + ResolutionChanged() + + local asm = [[ + + (codecave:jmp)FOV,FOV_cc: + %originalcode% + $$0 [(allocation)Variables->FOVIn],$$1 $ctx=1 + addss $$1,[(allocation)Variables->AdditionalFOV] $ctx=1 + $$0 [(allocation)Variables->FOVOut],$$1 $ctx=1 + jmp %returnaddress% + %end% + + ]] + + if HackTool:CompileAssembly(asm,"Fixes") == nil then + return ErrorOccurred("Assembly compilation failed...") + else + Toggle_CodeCave("FOV_cc",bFOV) + end + + Write_FOV() + +end + +function Periodic() + local Variables = HackTool:GetAllocation("Variables") + + if Variables and Variables["FOVIn"] and Variables["AdditionalFOV"] then + local fFOVIn = Variables["FOVIn"]:ReadFloat() + local fFOVOut = Variables["FOVOut"]:ReadFloat() + + PluginViewport:AppendStatusMessage( string.format("\r\n===== Fix informations =====\r\nFOV In: %0.2f, FOV Out : %.02f", fFOVIn, fFOVOut)) + end +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: +%.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function Write_FOV() + + local Variables = HackTool:GetAllocation("Variables") + if Variables and Variables["AdditionalFOV"] then + if bFOV == true then + Variables["AdditionalFOV"]:WriteFloat(fAdditionalFOV) + else + Variables["AdditionalFOV"]:WriteFloat(0) + end + end + +end + +function Disable_Inject() + + CleanUp() + +end + +function CKFOVFix_Changed(Sender) + + bFOV = Toggle_CheckFix(Sender) + Write_FOV() + Toggle_CodeCave("FOV_cc",bFOV) + ForceUpdate() + +end + +function FOVSlider_Changed(Sender) + + fAdditionalFOV = Sender:GetPosition() - 20 + lblFOVSlider.Caption:SetCaption( string.format("Value: %.0f",fAdditionalFOV) ) + + Write_FOV() + ForceUpdate() + +end + +function ResolutionChanged() + + SyncDisplayDetection() + +end + +function Init() + + Init_BaseControls() + Init_Controls() + +end + +function DeInit() + + DisableFix() + +end diff --git a/Plugins/K4sh.fws b/Plugins/K4sh.fws new file mode 100644 index 0000000..c0b174f --- /dev/null +++ b/Plugins/K4sh.fws @@ -0,0 +1,2618 @@ + + + $BASE/$PNS.fws + K4sh Plugins + + + - 12/03/2022: Added fix Horizon New Dawn\r\n + + + Flawless Widescreen plugins + + + + + + + + Horizon Zero Dawn: Complete Edition + + 100 + 64 + Horizon Zero Dawn: Complete Edition + K4sh + Memory Hack + + + + + + Horizon Zero Dawn has no known issues.\r\n\r\nThis fix will let you :\r\n - Change in game FOV (The more you raise it the more it will tank your fps)\r\n - Change HUD Scaling beyond game limitations\r\n - Remove cutscenes black bars\r\n - Remove in game depth of field + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Biomutant + + 100 + 64 + Biomutant + K4sh + Memory Hack + + + + + + Biomutant has FOV flaws with cinematics and puzzles.\r\n\r\nThis fix allows you to :\r\n Add in game extra vertical FOV (+/-)\r\n\r\nThe fix slider will work in combination with the one in game settings\r\nBe sure to set vertical FOV in game settings + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Marvel Guardians of the Galaxy + + 100 + 64 + Guardians of the Galaxy + HaYDeN + K4sh + Memory Hack + + + + + + Fixes cutscene letterbox.\r\nAllows to change in game FOV\r\nFOV fix will be added to in game and photo mode FOV + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Quarry + + 100 + 64 + The Quarry + K4sh + Memory Hack + + + + + + Allows to change camera and cinematics FOV.\r\nFOV fix values will be added to camera and cinematics.\r\nThe more you increase the FOV the more you can expect glitches due to the engine limitation.\r\nRemoves black bars on 4 sides. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Quarry + + 100 + 64 + Spider-Man Remastered + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange HUD aspect ratio.\r\nChange city map aspect ratio. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Death Stranding + + 100 + 64 + Death Stranding + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game and cinematics.\r\nPrevent sonar markers from floating.\r\nFMVs cutscenes rendering forced to 16/9 aspect ratio.\r\nForce engine and prerendered cinematics to play at in game frametime (higher than 60 fps). + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + A Plague Tale: Requiem + + 100 + 64 + A Plague Tale: Requiem + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Uncharted: LOTC + + 100 + 64 + Uncharted: LOTC + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game and photo mode.\r\nRemove cinematics black borders.\r\nOverride game aspect ratio limitation.\r\nControls in game and cinematics depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The chant + + 100 + 64 + The chant + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game.\r\nRemove black bars in cinematics and interactions (makes FOV narrower) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Broken Pieces + + 100 + 64 + Broken Pieces + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game\r\nSet aspect ratio beyond 16/9 limitation (removes black bars) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Devil In Me + + 100 + 64 + The Devil In Me + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game\r\nSet aspect ratio beyond 16/9 limitation (removes black bars) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Evil West + + 100 + 64 + Evil West + K4sh + Memory Hack + + + + + + This fix allows to :\r\nChange FOV in game\r\nChange FOV in cinematics\r\nRemove black bars in cinematics (horizontal bars still remain) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Assassin's creed Valhalla + + 100 + 64 + Assassin's creed Valhalla + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game (The wider, the more clouds artifacts will appear in the sky)\r\n- Remove black bars in cinematics or interactions (this won't affect FOV or camera) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Man of Medan + + 100 + 64 + Man of Medan + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game (cinematics,interactions)\r\n- Remove black bars in cinematics or interactions (this won't affect FOV or camera) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Little Hope + + 100 + 64 + Little Hope + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game (cinematics,interactions)\r\n- Remove black bars in cinematics or interactions (this won't affect FOV or camera) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + House Of Ashes + + 100 + 64 + House Of Ashes + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game (cinematics,interactions)\r\n- Remove black bars in cinematics or interactions (this won't affect FOV or camera) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Dead Space remake (2023) + + 100 + 64 + Dead Space remake (2023) + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game.\r\nThis will not affect inventory,store or bench tool + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Returnal + + 100 + 64 + Returnal + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game.\r\nThis will override game and photo mode setting + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Hogwarts Legacy + + 100 + 64 + Hogwarts Legacy + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game.\r\n- Remove cinematics black bars\r\n- Change Sharpening. Actual game setting is broken and revert to 0 at each start\r\n\r\n* FOV fix works as and additional one\r\n* Tone Mapping sharpening only works with game var r.Tonemapper.Sharpen set in Engine.ini config file + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The last of us part I + + 100 + 64 + The last of us part I + K4sh + Memory Hack + + + + + + This fix allows to :\r\n- Change FOV in game.\r\n- Disable TAA.\r\n- Modify render sharpening (set to 0 to disable it). + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Mass Effect Andromeda + + 100 + Mass Effect™: Andromeda + K4sh + Memory Hack + + + + + + Mass Effect Andromeda has some limitations with width and height safe zones.\r\nGame settings won't allow to modify past 90% which can be annoying playing on ultrawide.\r\n\r\nCinematics aspect ratio also is limited to 16/9.\r\n\r\nThis fix will let you relocate HUD to best fit the display.\r\nCinematics will be rendered according to your display resolution.\r\n\r\nCredits goes to Helifax for aspect ratio.\r\nI only improved the aspect ratio calculation based on game resolution + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Dead Island 2 + + 100 + Dead Island 2 + K4sh + Memory Hack + + + + + + This fix will allow to:\r\n - Remove black bars in cutscenes.\r\n - Remove HUD safe zones limits.\r\n - Modify FOV in game and cutscenes. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Gylt + + 100 + Gylt + K4sh + Memory Hack + + + + + + This fix will allow to:\r\n Modify FOV in game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Days Gone + + 100 + Days Gone + K4sh + Memory Hack + + + + + + This fix will allow to:\r\n -Modify FOV in game (acts as an additional FOV)\r\n -Set HUD safe zone (21/9,16/9 ...) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Fort Solis + + 100 + Fort Solis + K4sh + Memory Hack + + + + + + This fix will allow to:\r\n -Modify FOV in game (acts as an additional FOV).\r\n -Override 16/9 aspect ratio limitation.\r\n\r\nNote:\r\nChanging FOV may impact performance\r\nOverriding aspect will calculate compensated FOV. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Tchia + + 100 + Tchia + K4sh + Memory Hack + + + + + + This fix will allow to:\r\n -Modify FOV in game (acts as an additional FOV).\r\n -Remove cinematics black borders. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Under The Waves + + 100 + Under The Waves + K4sh + Memory Hack + + + + + + This fix will allow to:\r\n -Modify FOV in game (acts as an additional FOV).\r\n -Disable letterbox. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Starfield + + 100 + Starfield + K4sh + Memory Hack + + + + + + Starfield has an aspect ratio limited to 2.38\r\n\r\nThis fix allows to:\r\n - Modify 1st and 3rd person FOV.\r\n - Modify dialog FOV.\r\n - Modify weapon FOV.\r\n - Override aspect limitation.\r\n - Modify HUD safe zone.\r\n - Disable photomode black bars.\r\n\r\nFor aspect override, it's best to run fix prior to game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Assassin's Creed Mirage + + 100 + Assassin's Creed Mirage + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Remove cinematics black bars.\r\n - Remove chromatic aberrations.\r\n - Modify FOV in game.\r\n\r\nFor cinematics aspect override, it's best to run fix prior to game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Alan Wake II + + 100 + Alan Wake II + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n\r\nIncreasing FOV scale will impact performance.\r\nFOV scale will affect all FOV except cinematics.\r\nSpecific FOV fixes will override respectives ones. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Invincible + + 100 + The Invincible + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Sherlock Holmes : Chapter one + + 100 + Sherlock Holmes : Chapter one + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove pillar boxing (cinematics & menu).\r\n - Override aspect ratio limitation. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Kena : Bridge of Spirits + + 100 + Kena : Bridge of Spirits + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable depth of field + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Jusant + + 100 + Jusant + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove black bars (cinematics, menu).\r\n - Disable depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Stray + + 100 + Stray + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove partially letterboxing in cutscenes.\r\n - Disable depth of field.\r\n - Set HUD safe zone (21/9, 16/9 ...)\r\n\r\nIt's recommended to check FOV if you check cutscenes fix to compensate. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Firewatch + + 100 + Firewatch + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Ghostwire: Tokyo + + 100 + Ghostwire: Tokyo + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove black bars in cutscenes.\r\n\r\nIt's best to check fix FOV if you check aspect fix to compensate FOV. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Sinking City + + 100 + The Sinking City + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove black bars in cutscenes.\r\n - Disable depth of field.\r\n - Set HUD safe zone (21/9, 16/9 ...) + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Close To The Sun + + 100 + Close To The Sun + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove black bars in cutscenes.\r\n - Disable depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Metro Exodus : Enhanced edition + + 100 + Metro Exodus : Enhanced edition + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Override aspect ratio limitation. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Gunk + + 100 + The Gunk + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Override aspect ratio limitation.\r\n - Disable depth of field.\r\n - Set HUD safe zone (21/9,16/9 ...). + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Robocop : Rogue City + + 100 + Robocop : Rogue City + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game (general and weapon).\r\n - Override aspect ratio limitation.\r\n - Disable depth of field.\r\n - Anti aliasing method selection. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + I AM Jesus Christ: Prologue + + 100 + I Am Jesus Christ: Prologue + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Override aspect ratio limitation.\r\n - Disable depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Banishers : Ghosts of new Eden + + 100 + Banishers : Ghosts of new Eden + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Override aspect ratio limitation.\r\n - Disable depth of field.\r\n - Disable chromatic aberration. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Tomb Raider I-III Remastered + + 100 + Tomb Raider I-III Remastered + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game (photo mode only).\r\n\r\nDo not exceed 179° FOV or game will crash. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Callisto Protocol + + 100 + The Callisto Protocol + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOVs in game.\r\n - Remove chromatic aberration.\r\n\r\nModifying FOV will impact UI as well.\r\nStore FOV fix will impact cinematics as well. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + God of War + + 100 + God of War + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable black bars.\r\n - Remove depth of field.\r\n\r\nHihger FOV may prevent certain actions from achieving. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Pacific Drive + + 100 + Pacific Drive + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Set HUD safe zone (16/9, 21/9, ...).\r\n\r\nFOV fix is only necessary for wider displays to compensate. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Bright Memory: Infinite + + 100 + Bright Memory: Infinite + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Set HUD safe zone (16/9, 21/9, ...).\r\n\r\nFOV will be compensated for ultrawide displays. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Brothers: A Tale of Two Sons Remake + + 100 + Brothers: A Tale of Two Sons Remake + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Enable UW resolutions\r\n - Override aspect ratio limitation.\r\n\r\nGame is limited to 16/9 resolution.\r\nResolution fix will enable ultrawide resolution.\r\nIt's better to launch game fix prior to game. Otherwise, you'll have to set resolution in game settings.\r\nFOV will be compensated for ultrawide displays. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Lies Of P + + 100 + Lies Of P + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable Depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Outcast: A New Beginning + + 100 + Outcast: A New Beginning + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Cinematics black bars removal.\r\n - Set HUD safe zone (16/9, 21/9, ...).\r\n - Remove cinematics FPS limit.\r\n - Remove chromatic aberrations.\r\n - Disable depth of field.\r\n\r\nGame cinematics are limited to 30 FPS.\r\nChromatic aberrations are slightly visible on each sides. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Beast Inside + + 100 + The Beast Inside + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove black bars.\r\n - Set HUD safe zone (16/9, 21/9, ...).\r\n - Remove FPS limit.\r\n - Disable chromatic aberrations.\r\n - Disable depth of field.\r\n\r\nGame is limited to 120 FPS max.\r\nGame FOV will be preserved for ultra wide screens. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Alone In The Dark + + 100 + Alone In The Dark + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove black bars.\r\n - Set HUD safe zone (16/9, 21/9, ...).\r\n - Remove cinematics FPS limit.\r\n\r\nGame cinematics are limited to 60 FPS max.\r\nGame FOV will be preserved for ultra wide screens. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Horizon Forbidden West + + 100 + Horizon Forbidden West: Complete Edition + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify Aim/Focus, World, Cinematics FOVs in game.\r\n - Modify HUD safe zone.\r\n\r\nIt's better to set additional FOV in settings to 0 for best FOV reporting. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Ghost Of Tsushima Director's Cut + + 100 + Ghost Of Tsushima Director's Cut + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Modify HUD safe zone.\r\n - Disable letterbox in cinematics and interactions. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Tintin Reporter: Cigars of the Pharaoh + + 100 + Tintin Reporter: Cigars of the Pharaoh + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Modify HUD scaling.\r\n - Remove FPS limitation.\r\n - Disable chromatic aberrations.\r\n - Disable depth of field.\r\n\r\nFOV will be preserved for wider displays. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Expanse: A Telltale Series + + 100 + The Expanse: A Telltale Series + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Override aspect ratio limitation.\r\n - Disable chromatic aberrations.\r\n - Disable depth of field.\r\n\r\nThe game has a forced aspect ratio of 16/9.\r\nFOV will be preserved for wider displays. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Sand Land + + 100 + Sand Land + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Lords of the fallen (2023) + + 100 + Lords of the fallen (2023) + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable pillarbox in cutscenes.\r\n - Disable depth of field.\r\n\r\nFOV will be preserved when aspect fix is enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + What have you done Father? + + 100 + What have you done Father? + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable pillarbox in cutscenes.\r\n - Disable depth of field.\r\n - Disable chromatic aberrations.\r\n\r\nFOV will be preserved when aspect fix is enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Senua’s Saga: Hellblade II + + 100 + Senua’s Saga: Hellblade II + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Allow wider aspect ratios.\r\n - Disable depth of field.\r\n - Disable lens distortion.\r\n - Disable lens softness.\r\n - Remove chromatic aberrations.\r\n - Remove grain effect.\r\n\r\nFOV will be preserved when FOV and aspect fix are enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Tell me why + + 100 + Tell me why + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable letterbox.\r\n - Disable depth of field.\r\n - Remove chromatic aberrations.\r\n\r\nFOV will be preserved when aspect ratio fix is enabled.\r\nMarkers are a bit broken when letterbox fix is enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Still Wakes The Deep + + 100 + Still Wakes The Deep + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable pillarbox.\r\n - Remove chromatic aberrations.\r\n\r\nFOV will be preserved when aspect ratio fix is enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Maid Of Sker + + 100 + Maid Of Sker + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n\r\nFor FOV to take effect you need to run at least once. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Star Wars: Jedi Survivor + + 100 + Star Wars: Jedi Survivor + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game and cinematics.\r\n - Disable depth of field.\r\n - Remove pillarbox in cinematics.\r\n - Control camera distance.\r\n - Control image sharpening.\r\n - Disable fog.\r\n\r\nAdditional world FOV affects cinematics also. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Black Myth: Wukong + + 100 + Black Myth: Wukong + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove pillarbox.\r\n - Disable depth of field.\r\n - Remove chromatic aberrations.\r\n - Control image sharpening.\r\n - Disable vignetting.\r\n - Disable fog.\r\n\r\nFOV will be preserved when aspect ratio is enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + War Hammer: Space Marine 2 + + 100 + War Hammer: Space Marine 2 + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Casting Of Frank Stone + + 100 + The Casting Of Frank Stone + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Disable pillarboxing.\r\n - Disable chromatic aberrations.\r\n - Disable depth of field.\r\n\r\nFOV will be preserved when aspect fix is enabled. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + God Of War Ragnarok + + 100 + God Of War Ragnarok + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game.\r\n - Remove aspect limitation.\r\n - Disable depth of field.\r\n\r\nGame has a limitation aspect ratio of 32/9 max.\r\nFOV fix will also affect menus. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Until Dawn + + 100 + Until Dawn + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game\r\n - Disable depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Silent Hill2 Remake + + 100 + Silent Hill2 Remake + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game\r\n - Override aspect ratio limitation.\r\n - Disable depth of field.\r\n - Disable chromatic aberrations.\r\n - Disable vignetting.\r\n - Disable fog.\r\n - Unlock cinematics FPS.\r\n\r\nGame is limited to 16/9 aspect ratio.\r\nHigher FOV may result in glitches and blurry textures when aspect fix is enabled. Use it accordingly. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Unknown 9: Awakening + + 100 + Unknown 9: Awakening + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game\r\n - Remove aspect ratio limitation in cinematics.\r\n - Unlock HUD scaling.\r\n - Disable depth of field.\r\n - Disable fog\r\n\r\nUnlocking HUD scaling will override limit in HUD safe zone setting. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Empire Of The Ants + + 100 + Empire Of The Ants + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game\r\n - Override aspect ratio limitation\r\n + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + S.T.A.L.K.E.R. 2: Heart Of Chornobyl + + 100 + S.T.A.L.K.E.R. 2: Heart Of Chornobyl + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game\r\n - Disable chromatic aberrations.\r\n - Disable fog. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Indiana Jones And The Great Circle + + 100 + Indiana Jones And The Great Circle + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV in game\r\n - Modify Cinematics FOV.\r\n - Disable depth of field in cutscenes.\r\n - Unlock cinematics frametime.\r\n - Enable frame generation with cutscenes.\r\n\r\nThe game has a narrow FOV in cinematics for displays with a ratio above 21/9.\r\nCinematics FOV will be compensated for ultrawide displays.\r\nCinematics FOV won't affect world or menus FOVs.\r\nDepth of field fix should affect all the game. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Star Wars Outlaws + + 100 + Star Wars Outlaws + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Remove pillarboxing in cutscenes.\r\n - Disable depth of field.\r\n - Enable frame generation everywhere.\r\n\r\nFrame generation is natively available in game but not in cutscenes, nor in the menus or in the dialogues.\r\nThe fix aims to enable all of them. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + SpiderMan2 + + 100 + SpiderMan2 + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Disable depth of field. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Avowed + + 100 + Avowed + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV.\r\n - Disable pillaboxing in cutscenes.\r\n - Disable depth of field.\r\n\r\nPillarboxinfg fix will compensate FOV with ultrawide display. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Lost Records + + 100 + Lost Records: Bloom & Rage + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Modify FOV.\r\n - Disable pillaboxing.\r\n - Disable depth of field.\r\n - Disable chromatic aberrations.\r\n\r\nAspect ratio fix will compensate FOV in cutscenes which will be also affected by FOV fix. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Rise Of The Ronin + + 100 + Rise Of The Ronin + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control camera distance.\r\n - Unlock in game FPS.\r\n - Unlock custcenes frame rate.\r\n\r\nCutscenes fix will unlock FPS in cutscenes, main menu and maybe more.\r\nIt also affects FMVs though it doesn't feel any smoother.\r\nFPS limits will be raised to 255. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Last of Us Part II Remastered + + 100 + The Last of Us Part II Remastered + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Control camera distance.\r\n - Disable image sharpening.\r\n\r\nModifying FOV may affect performance.\r\nSharpening, when set to 0 in game still applies some slight effect to images.\r\nSet the slider to 0 to completely deactivate it.\r\nA good range result would be between 0-1.\r\nCamera distance in settings is a scale between 0.9 - 1.1 (-5 to +5 slider). + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Spirit Of The North 2 + + 100 + Spirit Of The North 2 + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Remove pillarboxing.\r\n - Disable depth of field.\r\n\r\nFOV will be compensated when aspect fix is checked.\r\nFOV increase fix will likely alter negatively performances. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Sinking City Remastered + + 100 + The Sinking City Remastered + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Remove pillarboxing.\r\n - Disable depth of field.\r\n - Disable chromatic aberrations.\r\n\r\nFOV will be compensated when aspect fix is checked. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Spirit Of The North + + 100 + Spirit Of The North + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Remove pillarboxing.\r\n - Disable depth of field.\r\n\r\nFOV will be compensated when aspect fix is checked.\r\nFOV increase fix will likely alter negatively performances. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Mindseye + + 100 + Mindseye + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Force aspect ratio.\r\n - Disable depth of field.\r\n\r\nFOV will be compensated when aspect fix is checked. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + The Alters + + 100 + The Alters + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Force aspect ratio.\r\n - Disable depth of field.\r\n\r\nFOV will be compensated when aspect fix is checked. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + Blades Of Fire + + 100 + Blades Of Fire + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Force aspect ratio.\r\n\r\nFor aspect fix to work properly, it's necessary to run this plugin prior to the game.\r\nShould you run the game first, just go to game settings, change aspect and apply.\r\nThe aspect and width should be fixed. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + + South Of Midnight + + 100 + South Of Midnight + K4sh + Memory Hack + + + + + + This fix allows to:\r\n - Control in game FOV.\r\n - Force aspect ratio.\r\n\r\nFOV will be compensated when aspect fix is checked. + + + + + + + + + Memory Hack + This is the step summary + + + + + + + \ No newline at end of file