Initial plugins and other stuff commit

This commit is contained in:
2025-07-17 18:11:51 +02:00
parent ad73e69184
commit db591110de
360 changed files with 27932 additions and 0 deletions

View File

@@ -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

View File

@@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 617 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 375 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 326 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 71 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 874 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 827 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 63 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@@ -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

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Some files were not shown because too many files have changed in this diff Show More