How to add Float Big Endian

Ask about cheats/tables for single player games here
Post Reply
wicked_laugh
What is cheating?
What is cheating?
Posts: 2
Joined: Fri Mar 03, 2017 2:09 pm
Reputation: 0

How to add Float Big Endian

Post by wicked_laugh » Fri Mar 03, 2017 2:10 pm

So the old forum is gone. I missed out on this how to http://forum.cheatengine.org/viewtopic.php?t=551054. Any one able to help a fella out? Thanks!

panraven
Cheater
Cheater
Posts: 31
Joined: Fri Mar 03, 2017 12:03 am
Reputation: 17

Re: How to add Float Big Endian

Post by panraven » Fri Mar 03, 2017 8:29 pm

Could you try these ?
Run this lua code 1st, In 1) Table/Lua Engine ; or 2) In a script subrround by {$lua} ... {$asm} tags

Code: Select all

function toBE(n,sz)
   if type(sz)=='string' then sz = sz:lower()end
   sz = sz or 4
   local ifmt = type(sz)=='number' and 'I'..sz or sz
   local ofmt = sz=='f' and "I4" or sz=='d' and "I8" or "I"..sz
   local p,u = string.pack,string.unpack
   return (u("<"..ofmt,p(">"..ifmt,n)))
end
This is a quick conversion of some type to 4bytes or 8 bytes Big Endian equivalent integer.

To search BE float, which is 4 bytes, select 4byte type (not float), and enter something like : toBE(1.5,'f')
'f' is for float, 'd' is for double which is 8bytes.

But this method only for exact value search (ie. you know the in game float value exactly, not just approx.),
since there is no ce rounding to include possible tolerance, even in-between will not work.

bye~


ADDED:
google cache of OP's link:
http://webcache.googleusercontent.com/s ... clnk&gl=hk

There are custom type scripts for BE float and double.

wicked_laugh
What is cheating?
What is cheating?
Posts: 2
Joined: Fri Mar 03, 2017 2:09 pm
Reputation: 0

Re: How to add Float Big Endian

Post by wicked_laugh » Sat Mar 04, 2017 2:45 am

Hmmm. I should have been more detailed in my request. Stupid me. I was actually looking to add Float Big Endian code to the Auto Assembler, but I will try this out when I get home to see if it works. Thanks!

Post Reply

Who is online

Users browsing this forum: Franka