Filtering Enemy & Player Values

A dedicated forum for support, assistance, and quick help on using Cheat Engine usage.


Post Reply
Rienfleche
Cheater
Cheater
Posts: 10
Joined: Sun Jun 04, 2023 5:47 am
x 3

Filtering Enemy & Player Values

Post by Rienfleche »

how to filter enemy value and character value, i can find the address script but it affect enemy too.

example like this code i make for agarest war GOG version. (It's Gain SP after being Hit) but affect enemies as well.
i want to know how to make the cmp for ally only

Code: Select all

{ Game   : Agarest.exe
  Version: 
  Date   : 2023-06-19
  Author : Rienfleche

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(AddSP,Agarest.exe,2C 07 00 01 90 7C 01 00 00) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  add [eax+0000017C],#999

code:
  add [eax+0000017C],edx
  jmp return

AddSP+03:
  jmp newmem
  nop
return:
registersymbol(AddSP)

[DISABLE]

AddSP+03:
  db 01 90 7C 01 00 00

unregistersymbol(AddSP)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Agarest.exe+F6865

Agarest.exe+F6842: 8D 51 05              - lea edx,[ecx+05]
Agarest.exe+F6845: EB 09                 - jmp Agarest.exe+F6850
Agarest.exe+F6847: 8D A4 24 00 00 00 00  - lea esp,[esp+00000000]
Agarest.exe+F684E: 8B FF                 - mov edi,edi
Agarest.exe+F6850: 8B 04 8E              - mov eax,[esi+ecx*4]
Agarest.exe+F6853: 69 C0 B0 10 00 00     - imul eax,eax,000010B0
Agarest.exe+F6859: 05 68 25 AE 06        - add eax,Agarest.exe+6632568
Agarest.exe+F685E: 52                    - push edx
Agarest.exe+F685F: 50                    - push eax
Agarest.exe+F6860: E8 FB 2C 07 00        - call Agarest.exe+169560
// ---------- INJECTING HERE ----------
Agarest.exe+F6865: 01 90 7C 01 00 00     - add [eax+0000017C],edx
// ---------- DONE INJECTING  ----------
Agarest.exe+F686B: 83 C4 08              - add esp,08
Agarest.exe+F686E: 39 B8 7C 01 00 00     - cmp [eax+0000017C],edi
Agarest.exe+F6874: 7E 06                 - jle Agarest.exe+F687C
Agarest.exe+F6876: 89 B8 7C 01 00 00     - mov [eax+0000017C],edi
Agarest.exe+F687C: 41                    - inc ecx
Agarest.exe+F687D: 3B CB                 - cmp ecx,ebx
Agarest.exe+F687F: 7C CF                 - jl Agarest.exe+F6850
Agarest.exe+F6881: 33 D2                 - xor edx,edx
Agarest.exe+F6883: 39 95 68 FE FF FF     - cmp [ebp-00000198],edx
Agarest.exe+F6889: 7E 7E                 - jle Agarest.exe+F6909
}

And This Max Money address [Agarest.exe+EAEA78] get reset if i restart the computer

Code: Select all

{ Game   : Agarest.exe
  Version: 
  Date   : 2023-06-20
  Author : Rienfleche

  This script does blah blah blah
}

[ENABLE]

aobscanmodule(MaxMoney,Agarest.exe,08 A3 78 EA 33 01) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  mov eax,#999999999

code:
  mov [Agarest.exe+EAEA78],eax
  jmp return

MaxMoney+01:
  jmp newmem
return:
registersymbol(MaxMoney)

[DISABLE]

MaxMoney+01:
  db A3 78 EA 33 01

unregistersymbol(MaxMoney)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Agarest.exe+80E8B

Agarest.exe+80E79: 8B E5                          - mov esp,ebp
Agarest.exe+80E7B: 5D                             - pop ebp
Agarest.exe+80E7C: C3                             - ret 
Agarest.exe+80E7D: CC                             - int 3 
Agarest.exe+80E7E: CC                             - int 3 
Agarest.exe+80E7F: CC                             - int 3 
Agarest.exe+80E80: 55                             - push ebp
Agarest.exe+80E81: 8B EC                          - mov ebp,esp
Agarest.exe+80E83: A1 78 EA 33 01                 - mov eax,[Agarest.exe+EAEA78]
Agarest.exe+80E88: 03 45 08                       - add eax,[ebp+08]
// ---------- INJECTING HERE ----------
Agarest.exe+80E8B: A3 78 EA 33 01                 - mov [Agarest.exe+EAEA78],eax
// ---------- DONE INJECTING  ----------
Agarest.exe+80E90: 3D FF C9 9A 3B                 - cmp eax,3B9AC9FF
Agarest.exe+80E95: 7E 0C                          - jle Agarest.exe+80EA3
Agarest.exe+80E97: C7 05 78 EA 33 01 FF C9 9A 3B  - mov [Agarest.exe+EAEA78],3B9AC9FF
Agarest.exe+80EA1: 5D                             - pop ebp
Agarest.exe+80EA2: C3                             - ret 
Agarest.exe+80EA3: 3D 01 1F 0A FA                 - cmp eax,FA0A1F01
Agarest.exe+80EA8: 7D 0A                          - jnl Agarest.exe+80EB4
Agarest.exe+80EAA: C7 05 78 EA 33 01 01 1F 0A FA  - mov [Agarest.exe+EAEA78],FA0A1F01
Agarest.exe+80EB4: 5D                             - pop ebp
Agarest.exe+80EB5: C3                             - ret 
}
User avatar
bbfox
Table Maker
Table Maker
Journeyman Hacker
Journeyman Hacker
Posts: 166
Joined: Sat Jul 23, 2022 8:59 am
x 368

Re: Some things about Cheat Engine I wish I would have known earlier

Post by bbfox »

Since no expert has responded, let me, as someone who only understands the general usage, provide an answer.

Rienfleche wrote: Sat Jun 24, 2023 7:12 am

how to filter enemy value and character value, i can find the address script but it affect enemy too.

example like this code i make for agarest war GOG version. (It's Gain SP after being Hit) but affect enemies as well.
i want to know how to make the cmp for ally only

This is a technique called Shared OpCode. Just find a tutorial and study how to implement it.

Rienfleche wrote: Sat Jun 24, 2023 7:12 am

And This Max Money address [Agarest.exe+EAEA78] get reset if i restart the computer

Code: Select all

[ENABLE]

aobscanmodule(MaxMoney,Agarest.exe,08 A3 78 EA 33 01) // should be unique
alloc(newmem,$1000)

label(code)
label(return)

newmem:
  mov eax,#999999999

code:
  mov [Agarest.exe+EAEA78],eax
  jmp return

MaxMoney+01:
  jmp newmem
return:
registersymbol(MaxMoney)

[DISABLE]

MaxMoney+01:
  db A3 78 EA 33 01

unregistersymbol(MaxMoney)
dealloc(newmem)

{
// ORIGINAL CODE - INJECTION POINT: Agarest.exe+80E8B

Agarest.exe+80E79: 8B E5                          - mov esp,ebp
Agarest.exe+80E7B: 5D                             - pop ebp
Agarest.exe+80E7C: C3                             - ret 
Agarest.exe+80E7D: CC                             - int 3 
Agarest.exe+80E7E: CC                             - int 3 
Agarest.exe+80E7F: CC                             - int 3 
Agarest.exe+80E80: 55                             - push ebp
Agarest.exe+80E81: 8B EC                          - mov ebp,esp
Agarest.exe+80E83: A1 78 EA 33 01                 - mov eax,[Agarest.exe+EAEA78]
Agarest.exe+80E88: 03 45 08                       - add eax,[ebp+08]
// ---------- INJECTING HERE ----------
Agarest.exe+80E8B: A3 78 EA 33 01                 - mov [Agarest.exe+EAEA78],eax
// ---------- DONE INJECTING  ----------
Agarest.exe+80E90: 3D FF C9 9A 3B                 - cmp eax,3B9AC9FF
Agarest.exe+80E95: 7E 0C                          - jle Agarest.exe+80EA3
Agarest.exe+80E97: C7 05 78 EA 33 01 FF C9 9A 3B  - mov [Agarest.exe+EAEA78],3B9AC9FF
Agarest.exe+80EA1: 5D                             - pop ebp
Agarest.exe+80EA2: C3                             - ret 
Agarest.exe+80EA3: 3D 01 1F 0A FA                 - cmp eax,FA0A1F01
Agarest.exe+80EA8: 7D 0A                          - jnl Agarest.exe+80EB4
Agarest.exe+80EAA: C7 05 78 EA 33 01 01 1F 0A FA  - mov [Agarest.exe+EAEA78],FA0A1F01
Agarest.exe+80EB4: 5D                             - pop ebp
Agarest.exe+80EB5: C3                             - ret 
}

There are several ways to solve this. Here is one of the method:

replace

Code: Select all

mov [Agarest.exe+EAEA78],eax 

to:

Code: Select all

db A3 78 EA 33 01

This may solve the issue (unless machine code changed everytime)


I create tables to suit my preferences. Table is free to use, but need to leave the author's name and source URL: https://opencheattables.com.
Table will not be up-to-date. Feel free to modify it, but kindly provide credit to the source.

Alex Darkside
Cheater
Cheater
Posts: 11
Joined: Sun Aug 21, 2022 12:08 pm
x 7

Re: Some things about Cheat Engine I wish I would have known earlier

Post by Alex Darkside »

Rienfleche wrote: Sat Jun 24, 2023 7:12 am

And This Max Money

(Google translation)

In this case, you can make the script much simpler, without using injections, jumping into allocated memory, and saving addresses. It is enough to replace with "nop" the two instructions that are located immediately after the injection point in your script.

For example, like this:

Code: Select all

[ENABLE]

Agarest.exe+80E90:
 db 90 90 90 90 90 90 90

[DISABLE]

Agarest.exe+80E90:
 db 3D FF C9 9A 3B 7E 0C
Post Reply