|
Cheat Engine The Official Site of Cheat Engine
|
View previous topic :: View next topic |
Author |
Message |
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Sun Sep 01, 2019 4:28 pm Post subject: Floats Filtering ? |
|
|
Is there a way I can search for a a range of floats (ex 1000.0 - 5000.0) and then filter the results that are WHOLE numbers only?
a setting or a script perhaps?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Mon Sep 02, 2019 12:43 am Post subject: |
|
|
Do a Float value type and tick "Lua Formula"
Then do a scan with:
Code: |
(value>1000.0) and (value<5000.0) and ((value % 1)==0)
|
the `((value % 1)==0)` part makes it so that there is nothing after the decimal seperator
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Mon Sep 02, 2019 6:07 pm Post subject: |
|
|
Thank you Dark Byte! This works WELL!
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Sep 03, 2019 3:58 pm Post subject: |
|
|
or you can use CustomType for this:
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'mod Float(Int)',0
ByteSize:
dd 4
UsesFloat:
db 1
CallMethod:
db 1
ConvertRoutine:
[64-bit]
mov eax,[rcx]
[/64-bit]
[32-bit]
mov eax,[esp+4]
mov eax,[eax]
[/32-bit]
movd xmm0,eax
cvtps2dq xmm1,xmm0 // convert single to integer
cvtdq2ps xmm1,xmm1 // convert integer to single
ucomiss xmm0,xmm1
je @f
mov eax,7FC00000 // NaN
@@:
ret
ConvertBackRoutine:
[64-bit]
movd xmm0,ecx
cvtps2dq xmm0,xmm0 // convert single to integer
cvtdq2ps xmm0,xmm0 // convert integer to single
movss [r8],xmm0
[/64-bit]
[32-bit]
push ebp
mov ebp,esp
push eax
push ebx
mov eax,[ebp+8]
mov ebx,[ebp+10]
movd xmm0,eax
cvtps2dq xmm0,xmm0 // convert single to integer
cvtdq2ps xmm0,xmm0 // convert integer to single
movss [ebx],xmm0
pop ebx
pop eax
pop ebp
[/32-bit]
ret |
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(PreferedAlignment,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'mod Double(Int)',0
ByteSize:
dd 8
PreferedAlignment:
dd 4
UsesFloat:
db 1
CallMethod:
db 1
ConvertRoutine:
[64-bit]
movsd xmm0,[rcx]
[/64-bit]
[32-bit]
mov eax,[esp+4]
movsd xmm0,[eax]
[/32-bit]
cvtsd2ss xmm0,xmm0 // convert double to single
movd eax,xmm0
cvtps2dq xmm1,xmm0 // convert single to integer
cvtdq2ps xmm1,xmm1 // convert integer to single
ucomiss xmm0,xmm1
je @f
mov eax,7FC00000 // NaN
@@:
ret
ConvertBackRoutine:
[64-bit]
movd xmm0,ecx
cvtps2dq xmm0,xmm0 // convert single to integer
cvtdq2ps xmm0,xmm0 // convert integer to single
cvtss2sd xmm0,xmm0 // convert single to double
movsd [r8],xmm0
[/64-bit]
[32-bit]
push ebp
mov ebp,esp
push eax
push ebx
mov eax,[ebp+8]
mov ebx,[ebp+10]
movd xmm0,eax
cvtps2dq xmm0,xmm0 // convert single to integer
cvtdq2ps xmm0,xmm0 // convert integer to single
cvtss2sd xmm0,xmm0 // convert single to double
movsd [ebx],xmm0
pop ebx
pop eax
pop ebp
[/32-bit]
ret |
_________________
|
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Tue Sep 03, 2019 7:02 pm Post subject: |
|
|
This is even moar AWESOME!
Small issue, you can't make any non integer changes to the results. is it possible to fix that, or will I need to change the code type each time?
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Sep 04, 2019 3:29 am Post subject: |
|
|
Those scripts use this trick: "mov eax,7FC00000 // NaN "
It makes all floating-point values with fractions treated as NaN (not a number). CE rejects NaN from scan results.
Just change type to regular float/double. Then change to desired value with fractions.
tip: highlight entries with "mod Float(Int)" type, then press ALT+ENTER.
Check attached image below.
Description: |
|
Filesize: |
5.08 KB |
Viewed: |
8026 Time(s) |
|
_________________
|
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Wed Sep 04, 2019 8:28 am Post subject: |
|
|
Tricky!
That's what I though.. I guess there is no good way to do searches for 0.25,0.5.1.5,etc..... ??
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Wed Sep 04, 2019 9:30 am Post subject: |
|
|
Simple math, fractions 0.25, 0.5, 0.75 multiplied by 4 will give a whole number.
You can achieve this with Lua, tick "Lua formula" and "simple values only":
there would be many results with 0 value, so you can do:
Code: | (value~=0) and ((value*4) % 1 == 0) |
Or try other customType scripts:
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'mod Float(quarter)',0
ByteSize:
dd 4
UsesFloat:
db 1
CallMethod:
db 1
ConvertRoutine:
[64-bit]
mov eax,[rcx]
[/64-bit]
[32-bit]
mov eax,[esp+4]
mov eax,[eax]
[/32-bit]
movd xmm0,eax
addss xmm0,xmm0 // multiply by 4
addss xmm0,xmm0
cvtps2dq xmm1,xmm0 // convert single to integer
cvtdq2ps xmm1,xmm1 // convert integer to single
ucomiss xmm0,xmm1
je @f
mov eax,7FC00000 // NaN
@@:
ret
ConvertBackRoutine:
[64-bit]
mov [r8],ecx
[/64-bit]
[32-bit]
push ebp
mov ebp,esp
push eax
push ebx
mov eax,[ebp+8]
mov ebx,[ebp+10]
mov [ebx],eax
pop ebx
pop eax
pop ebp
[/32-bit]
ret |
Code: | alloc(ConvertRoutine,1024)
alloc(ConvertBackRoutine,1024)
alloc(TypeName,256)
alloc(ByteSize,4)
alloc(PreferedAlignment,4)
alloc(UsesFloat,1)
alloc(CallMethod,1)
TypeName:
db 'mod Double(quarter)',0
ByteSize:
dd 8
PreferedAlignment:
dd 4
UsesFloat:
db 1
CallMethod:
db 1
ConvertRoutine:
[64-bit]
movsd xmm0,[rcx]
[/64-bit]
[32-bit]
mov eax,[esp+4]
movsd xmm0,[eax]
[/32-bit]
cvtsd2ss xmm0,xmm0 // convert double to single
movd eax,xmm0
addss xmm0,xmm0 // multiply by 4
addss xmm0,xmm0 //
cvtps2dq xmm1,xmm0 // convert single to integer
cvtdq2ps xmm1,xmm1 // convert integer to single
ucomiss xmm0,xmm1
je @f
mov eax,7FC00000 // NaN
@@:
ret
ConvertBackRoutine:
[64-bit]
movd xmm0,ecx
cvtss2sd xmm0,xmm0 // convert single to double
movsd [r8],xmm0
[/64-bit]
[32-bit]
push ebp
mov ebp,esp
push eax
push ebx
mov eax,[ebp+8]
mov ebx,[ebp+10]
movd xmm0,eax
cvtss2sd xmm0,xmm0 // convert single to double
movsd [ebx],xmm0
pop ebx
pop eax
pop ebp
[/32-bit]
ret |
_________________
|
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Wed Sep 04, 2019 11:07 pm Post subject: |
|
|
Works like a charm..
Is there a way to do a bunch different scans at one time?
for example I want to scan for all these values at once.
Code: |
34020001
34030001
24050001
24060001
24070001
34080001
34090001
340A0001
340B0001
340C0001
340D0001
340E0001
340F0001
34180001
34190001
34100001
34110001
34120001
34130001
34140001
34150001
34160001
34170001
|
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Thu Sep 05, 2019 3:34 am Post subject: |
|
|
execute this code in lua first:
Code: |
list={}
list[0x34020001]=true
list[0x34030001]=true
list[0x24050001]=true
list[0x24060001]=true
list[0x24070001]=true
list[0x34080001]=true
list[0x34090001]=true
list[0x340A0001]=true
list[0x340B0001]=true
list[0x340C0001]=true
list[0x340D0001]=true
list[0x340E0001]=true
list[0x340F0001]=true
list[0x34180001]=true
list[0x34190001]=true
list[0x34100001]=true
list[0x34110001]=true
list[0x34120001]=true
list[0x34130001]=true
list[0x34140001]=true
list[0x34150001]=true
list[0x34160001]=true
list[0x34170001]=true
|
and then do a lua formula scan of
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Thu Sep 05, 2019 12:38 pm Post subject: |
|
|
Is there a good way to make a selectable list for these types? Lets say I could have several lists that I could select in a pull down menu for opcodes
|
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Tue Sep 10, 2019 3:00 pm Post subject: |
|
|
How do you unselect the list?
|
|
Back to top |
|
|
theboy181 Advanced Cheater Reputation: 0
Joined: 26 Jan 2018 Posts: 90
|
Posted: Mon Oct 14, 2019 6:32 pm Post subject: |
|
|
Where are these scripts saved ?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25287 Location: The netherlands
|
Posted: Tue Oct 15, 2019 12:51 am Post subject: |
|
|
registry
_________________
Do not ask me about online cheats. I don't know any and wont help finding them.
Like my help? Join me on Patreon so i can keep helping |
|
Back to top |
|
|
Csimbi I post too much Reputation: 94
Joined: 14 Jul 2007 Posts: 3108
|
Posted: Fri Nov 15, 2019 2:34 pm Post subject: |
|
|
mgr.inz.Player wrote: | or you can use CustomType for this: |
Any clues why CE throws this error (see attachment) when I try to add your custom type?
Your code looks legit to me.
Thanks!
Description: |
|
Filesize: |
8.6 KB |
Viewed: |
7171 Time(s) |
|
|
|
Back to top |
|
|
|
|
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
|
|