View previous topic :: View next topic |
Author |
Message |
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Tue Oct 25, 2005 1:30 pm Post subject: "Value Between" and Floats |
|
|
I am currently working on Black and White 2, which makes use of a lot of floats. I'm attempting to do a "Value Between" scan, and see that I am unable to use negative numbers.
The funny thing, is that if I leave a negative number in the box while doing any other type of scan, then change to a "Value Between" scan, the first value is allowed to stay negative, however I cannot set the 2nd value to a negative number (hitting - does nothing. Tried Copy/paste as well)
Thanks,
- Zhoul
|
|
Back to top |
|
|
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Tue Oct 25, 2005 1:43 pm Post subject: |
|
|
Also affecting "Bigger then" scans
|
|
Back to top |
|
|
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Tue Oct 25, 2005 5:54 pm Post subject: |
|
|
In working with floats, I must say that something is terribly wrong, either in the code that works with them, or some setting on my PC (such as number formatting).
I'm searching for floats that range from 1 to -1 (usually numbers like 0.569492342). I know a certain number is around -0.94 . When I finally widdle the list down, my number does not appear anywhere, and other numbers like..
5.89323423423E-43 are appearing, even after doing "Smaller Then 1" scans.
It appears to really have an issue, if I do searches for numbers that go past 2 decimal places.
To speed things up, I'm doing truncated scans mostly, but im not sure if your code truncates up to the last character I'm searching for, or if it truncates at a set decimal place /shrug
Suggestions?
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Tue Oct 25, 2005 11:26 pm Post subject: |
|
|
you are using 5.1.1 ?
_________________
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 |
|
|
The_MAZZTer Newbie cheater Reputation: 0
Joined: 25 Oct 2005 Posts: 11 Location: THE INTERNETS
|
Posted: Wed Oct 26, 2005 5:56 am Post subject: |
|
|
Zhoul wrote: | 5.89323423423E-43 are appearing, even after doing "Smaller Then 1" scans. |
Haha, that IS smaller than one. Brush up on your E notation.
5.89323423423E-43 == 0.000000000000000000000000000000000000000000589323423423
When searching, even if a value appears as a floating point number, keep in mind programmers will try and use whole numbers for calculations whenever possible because it is much faster.
For example if you have a money value with dollars and cents ($123.45), the programmer will likely opt to store together in a cents value (12345) or in two separate whole numbers (123, 45).
_________________
|
|
Back to top |
|
|
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Wed Oct 26, 2005 11:18 am Post subject: |
|
|
Ahhh, I've never seen E+ , so I figured the program was replacing the E+ with an E- , then the scan would pick up any value with E- , because it had a - sign in it.
And yeah, 5.1.1 .
|
|
Back to top |
|
|
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Thu Oct 27, 2005 10:13 am Post subject: |
|
|
The_MAZZTer wrote: | Zhoul wrote: | 5.89323423423E-43 are appearing, even after doing "Smaller Then 1" scans. |
Haha, that IS smaller than one. Brush up on your E notation.
5.89323423423E-43 == 0.000000000000000000000000000000000000000000589323423423
When searching, even if a value appears as a floating point number, keep in mind programmers will try and use whole numbers for calculations whenever possible because it is much faster.
For example if you have a money value with dollars and cents ($123.45), the programmer will likely opt to store together in a cents value (12345) or in two separate whole numbers (123, 45). |
So I just found another negative float.. Are you trying to tell me that
-7.68877529168708E24
and 5.89323423423E-43
Are both negative to CE? If so, why isnt the - sign in front of the 2nd one? ;P I knew I wasnt a crack head.
|
|
Back to top |
|
|
Dark Byte Site Admin Reputation: 458
Joined: 09 May 2003 Posts: 25296 Location: The netherlands
|
Posted: Thu Oct 27, 2005 10:29 am Post subject: |
|
|
-7.68877529168708E24=-7688775291687080000000000
5.89323423423E-43=0.000000000000000000000000000000000000000000589323423423
it depends on your scan, if you scanned for smaller than 1 then both fit the requirements
Oh yes, regarding the E
See it as : Move the decimal seperator XX ammounts to the right. (so a negative E value moves it to the left)
_________________
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 |
|
|
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Thu Oct 27, 2005 12:09 pm Post subject: |
|
|
I think the main reason I thought/think there could be an issue, is because when I was searching for negative floats, numbers like 5.89323423423E-43 were coming up. According to your definition, that number is still positive. No?
I'm all about knowing E notation, it just appeared odd to me that there was no rhyme or reason to its use in cheat engine, or the reporting there of.
|
|
Back to top |
|
|
SunBeam I post too much Reputation: 65
Joined: 25 Feb 2005 Posts: 4022 Location: Romania
|
Posted: Thu Oct 27, 2005 9:18 pm Post subject: |
|
|
Hi. I am currently hacking the same game. I must say I never thought about Floats. I mostly use 4 bytes/2 bytes for bars...
All I found for B&W2 is 4 bytes related, and trust me most of it all is ...
|
|
Back to top |
|
|
Zhoul Master Cheater Reputation: 1
Joined: 19 Sep 2005 Posts: 394
|
Posted: Thu Oct 27, 2005 9:25 pm Post subject: |
|
|
Riiight...
Take a look at my B&W2 table
http://forum.cheatengine.org/viewtopic.php?t=4073
As you can see, all things related to creature stats are indeed floats. Sure, they could be 'found' as 4 byte values, but that doesn't mean the game defined them as such. Also, It would be very confusing to 'work' with the values in 4-byte form, as opposed to float form.
The pointers in that table work with v1.1 - so give it a go yourself.
Now you are right in that the majority of values in the majority of games work with 4-byte values, but surely , not black & white 2.
On my most updated table (not yet on this site) there is only 1 value that is set as a 4-byte value, and thats the tribute value. Why? Because tribute is, at least to some extent, encrypted. So the easiest way for me to modify it is in its 4-byte form.
Cheers
|
|
Back to top |
|
|
|