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 


Resolving enemy addresses

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
Eighty7
How do I cheat?
Reputation: 0

Joined: 27 Jun 2026
Posts: 2
Location: United States

PostPosted: Tue Oct 20, 2026 11:45 pm    Post subject: Resolving enemy addresses Reply with quote

I made this option in my script for changing enemy speed.
I tried to make this same option with the pointer of the initial enemy's speed, however, since there are many enemies, it doesn't work on all of them.
I'm looking for a way to resolve all enemies with some sort of valid base (without having to lag my game to hell with aob scans, I don't mind scans i just dont like re-resolving the enemies with scans every time new enemies are loaded)

Code:

local instancestatus = getAddressSafe("Backrooms-Win64-Shipping.exe+4E2CBE0") -- value that changes every game instance to help for rescanning automatically

local speedaddresses = {}
local speedinstancechange = nil

-- 00 00 ?? ?? 00 00 96 43 00 00 96 43 00 00 16 44 00 00 16 44 00 00 00 45 00 00 00 00 00 00 00 40 00 00 00 00 10 3E F8 3C 00 00 00 45 00 00 00 00 < speed AOB, takes too long to scan for

local function getenemyspeed(awn)
    speedaddresses = getaobaddress("01 00 02 00 00 00 00 41") -- movement mode for the enemy, acts as a good base and scans fast (not the enemy base, enemy speed is +18C from the base address, and enemy state is 18F)

   if awn then
      for i = 1, #speedaddresses do
         speedaddresses[i] = speedaddresses[i] + 0x27 -- (bool value that effects how they roam, overdriving the normal value of the bool effects the speed extremely)
      end
   else
      for i = 1, #speedaddresses do
         speedaddresses[i] = speedaddresses[i] + 0x24 -- (speed)
      end
   end
end

local answer = nil

local est = createTimer(f)
est.Interval = 1
est.Enabled = false
est.OnTimer = function()
    local currentvalue = readByte(instancestatus)
   
    if currentvalue ~= speedinstancechange then
      if answer then
         getenemyspeed(true)
      else
         getenemyspeed()
      end

        speedinstancechange = currentvalue
    else
      if answer then
         for i = 1, #speedaddresses do
            writeByte(speedaddresses[i], tonumber(cspeed.Text))
         end
      else
         for i = 1, #speedaddresses do
            writeFloat(speedaddresses[i], tonumber(cspeed.Text))
         end
      end
    end
end

local result = nil

local function enablespeed(enabled)
    if enabled then
      speedinstancechange = readByte(instancestatus)
   
      result = messageDialog("Use entity state rather than speed?", mtConfirmation, mbYes, mbNo)

      if result == mrYes then
         getenemyspeed(true)
         showMessage([[
            Entity state is a byte value.
            The higher the integer the faster the speed is.
            The current value will be displayed in the value input for speed.
         ]])
         
         cspeed.Text = tostring(readByte(speedaddresses[1]))
         
         answer = true
      else
         getenemyspeed()
         
         answer = false
      end

        est.Enabled = true
    else
        est.Enabled = false
    end
end

local t1 = toggleelem(p1, 15, 85, "Enable", enablespeed)


I tried to make an AA script to just automatically apply a custom value to the enemy speed on the code that loads the speed value (I think), however, it crashes no matter what kind of hook is made on it, and it also works on player speed, or really anything that moves.

I also tried to find out if all the enemies were stored in the same memory region and possibly find a base, but that also didn't work since they appear to be randomly loaded.



setup.PNG
 Description:
The full function for the speed setup, also has stuff like movement mode getting loaded (I highlighted the important one/the speed one)
 Filesize:  55.84 KB
 Viewed:  959 Time(s)

setup.PNG


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