Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


(solved I think...) What did I do wrong with conversion?

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Devon999
Newbie cheater
Reputation: 0

Joined: 03 May 2022
Posts: 23

PostPosted: Tue May 17, 2022 8:48 am    Post subject: (solved I think...) What did I do wrong with conversion? Reply with quote

There is a cheat table for UE engine games that I found and it does an automatic scan to figure out several pointers, etc... It's called Basic UE4 Win64 Base Table.

I was using that table to successfully generate the NoClip/Fly script after doing the scan and processing, but I can't convert that script into one that will load for my game without the ue4 scanning step being needed.

The first code below is the original that works but needs a long scan to be done first so it can use the custom UE names. The second code is my most recent try to convert it to using the pointers/offsets those names convert from. Am I entering the converted pointers wrong or...? When I click the script it just doesn't turn on.

Original
Code:
{$lua}
if syntaxcheck then return end
local str1='[[[[[[GEngine]+Engine.GameInstance]+GameInstance.LocalPlayers]]+Player.PlayerController]+Actor.Character]'
[ENABLE]

if not RelativeLocationZoffset then
  local address=getAddress('['..str1..'+Character.CapsuleComponent]')
  local value=readInteger(address+getAddress('ActorComponent.RelativeLocation+Vector.Z'))
  local list=groupscan(string.format('4:%u',value),address,address+0x1000)
  RelativeLocationZoffset={}
  for i=1,#list do
    RelativeLocationZoffset[i]=getAddress(list[i])-address
  end
end

local address=getAddressSafe(str1..'+Actor.bActorEnableCollision')
if address then
local bActorEnableCollision=readBytes(address,1) & ~ getAddress('Actor.bActorEnableCollision.Bit')
writeBytes(address,bActorEnableCollision)
end

updown = createTimer()
updown.Interval = 5
updown.OnTimer = function(t)
  local address=getAddressSafe('['..str1..'+Character.CapsuleComponent]')
  if address then
    if isKeyPressed(0x5802) then
      for i=1,#RelativeLocationZoffset do
        writeFloat(address+RelativeLocationZoffset[i], readFloat(address+RelativeLocationZoffset[i])+20)
      end
    end
    if isKeyPressed(0x5801) then
      for i=1,#RelativeLocationZoffset do
        writeFloat(address+RelativeLocationZoffset[i], readFloat(address+RelativeLocationZoffset[i])-20)
      end
    end
  end
  local address=getAddressSafe('['..str1..'+Character.CharacterMovement]+MovementComponent.MovementMode')
  if address then
  writeBytes(address,5)
  end
end

[DISABLE]
updown.destroy()

local address=getAddressSafe(str1..'+Actor.bActorEnableCollision')
if address then
local bActorEnableCollision=readBytes(address,1) | getAddress('Actor.bActorEnableCollision.Bit')
writeBytes(address,bActorEnableCollision)
end

local address=getAddressSafe('['..str1..'+Character.CharacterMovement]+MovementComponent.MovementMode')
if address then
writeBytes(address,1)
end


My early attempt
Code:

{$lua}
if syntaxcheck then return end
local str1="[[[[[[SummerCamp.exe+3255B88]+e20]+38]]+30]+380]"
[ENABLE]

if not RelativeLocationZoffset then
  local address=getAddress('['..str1..'+3D8]')
  local value=readInteger(address+getAddress('164'))
  local list=groupscan(string.format('4:%u',value),address,address+0x1000)
  RelativeLocationZoffset={}
  for i=1,#list do
    RelativeLocationZoffset[i]=getAddress(list[i])-address
  end
end

local address=getAddressSafe(str1..'+86')
if address then
local bActorEnableCollision=readBytes(address,1) & ~ getAddress('2')
writeBytes(address,bActorEnableCollision)
end

updown = createTimer()
updown.Interval = 5
updown.OnTimer = function(t)
  local address=getAddressSafe('['..str1..'+3D8]')
  if address then
    if isKeyPressed(0x5803) then
      for i=1,#RelativeLocationZoffset do
        writeFloat(address+RelativeLocationZoffset[i], readFloat(address+RelativeLocationZoffset[i])+20)
      end
    end
    if isKeyPressed(0x5800) then
      for i=1,#RelativeLocationZoffset do
        writeFloat(address+RelativeLocationZoffset[i], readFloat(address+RelativeLocationZoffset[i])-20)
      end
    end
  end
  local address=getAddressSafe('['..str1..'+3D0]+1AC')
  if address then
  writeBytes(address,5)
  end
end

[DISABLE]
updown.destroy()

local address=getAddressSafe(str1..'+86')
if address then
local bActorEnableCollision=readBytes(address,1) | getAddress('2')
writeBytes(address,bActorEnableCollision)
end

local address=getAddressSafe('['..str1..'+3D0]+1AC')
if address then
writeBytes(address,1)
end




edit:
UPDATE----------
Now it half works with NoClip working but the hotkey to raise or lower Z pos throws nil arithmetic error. The section trying to write + or -20 is where there's an issue. I am 100% sure the address and offsets are right when testing outside the script. What am I doing wrong how I write that section?
Code:
{$lua}
if syntaxcheck then return end
local str1='[[[[[[7FF6B1565B88]+e20]+38]]+30]+380]'
[ENABLE]

local address=getAddress(str1..'+86')
if address then
writeBytes(address,8)
end

updown = createTimer()
updown.Interval = 5
updown.OnTimer = function(t)
  local address=getAddressSafe('['..str1..'+3D8]')
  if address then
    if isKeyPressed(0x5803) then
        writeFloat(address'+164]', readFloat(address'+164]')+20)
    end
    if isKeyPressed(0x5800) then
        writeFloat(address'+164]', readFloat(address'+164]')-20)
    end
  end
  local address=getAddressSafe('['..str1..'+3D0]+1AC')
  if address then
  writeBytes(address,5)
  end
end


[DISABLE]
updown.destroy()

local address=getAddressSafe(str1..'+86')
if address then
--local bActorEnableCollision=readBytes(address,1) | getAddress('2')
writeBytes(address,10)
end

local address=getAddressSafe('['..str1..'+3D0]+1AC')
if address then
writeBytes(address,1)
end






edit:
---NEWEST UPDATE:
I got it to work like this. I had to improvise a little and switch which Z offset I used. If anybody thinks I should change anything plz let me know...


Code:
{$lua}
if syntaxcheck then return end
local str1='[[[[[[SummerCamp.exe+3255B88]+e20]+38]]+30]+380]'
[ENABLE]

local address=getAddress(str1..'+86')
if address then
writeBytes(address,8)
end

updown = createTimer()
updown.Interval = 20
updown.OnTimer = function(t)
  if address then
    if isKeyPressed(0x5803) then
        writeFloat('[[[[[[[SummerCamp.exe+3255B88]+e20]+38]]+30]+380]+3d8]+198', readFloat('[[[[[[[SummerCamp.exe+3255B88]+e20]+38]]+30]+380]+3d8]+198')+20)
    end
    if isKeyPressed(0x5800) then
        writeFloat('[[[[[[[SummerCamp.exe+3255B88]+e20]+38]]+30]+380]+3d8]+198', readFloat('[[[[[[[SummerCamp.exe+3255B88]+e20]+38]]+30]+380]+3d8]+198')-7)
    end
  end
  local address=getAddressSafe('['..str1..'+3D0]+1AC')
  if address then
  writeBytes(address,5)
  end
end

[DISABLE]
updown.destroy()

local address=getAddressSafe(str1..'+86')
if address then
writeBytes(address,10)
end

local address=getAddressSafe('['..str1..'+3D0]+1AC')
if address then
writeBytes(address,1)
end
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites