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 


dotNet Decimal type

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Fri Dec 18, 2020 3:23 pm    Post subject: dotNet Decimal type Reply with quote

This plugin adds the .net Decimal type to CE using a dotNet DLL

how to use:
Copy the dll anywhere, and in ce's settings go to plugins, click add new, find the dll, and when it's added check the checkbox
(requires .net to be installed on your system...)

https://cheatengine.org/download/dotnetDecimal.zip

Instead of settings you can of course use the lua command loadPlugin(pathtodll) and put that in autorun

_________________
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
View user's profile Send private message MSN Messenger
panraven
Grandmaster Cheater
Reputation: 54

Joined: 01 Oct 2008
Posts: 941

PostPosted: Fri Dec 18, 2020 3:55 pm    Post subject: Reply with quote

I'm working on it.
https://pastebin.com/DbSbwfR2
There is no value2bytes yet.

I'm suppose to do exact input with OnValueChange.

Updated:
done https://pastebin.com/idpjH5bL

_________________
- Retarded.
Back to top
View user's profile Send private message
Csimbi
I post too much
Reputation: 92

Joined: 14 Jul 2007
Posts: 3102

PostPosted: Sat Dec 19, 2020 5:09 am    Post subject: Reply with quote

Thank you both!

Will this work in the data dissect window, too?
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Sat Dec 19, 2020 7:16 am    Post subject: Reply with quote

yes, data dissect suports custom types. just select it from the types when adding an entry
_________________
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
View user's profile Send private message MSN Messenger
ap13ski
How do I cheat?
Reputation: 0

Joined: 17 Dec 2020
Posts: 3

PostPosted: Wed Dec 30, 2020 4:14 pm    Post subject: Reply with quote

Very interesting finding, gentlemen.

First of all, plugging in an additional library has not worked. CE does not search for matching decimal numbers.

I wrote a simple program to test it.

Code:

        Random rnd = new Random();
        decimal value = 0;
        public Form1()
        {
            InitializeComponent();
            UpdateLabel();
        }
        private void UpdateLabel() { label1.Text = "Value: " + Convert.ToString(value); }

        private void button1_Click(object sender, EventArgs e)
        {
            value = Convert.ToDecimal(rnd.Next(1, 100) + rnd.Next(1, 100) * 0.01);
            UpdateLabel();
        }

        private void button2_Click(object sender, EventArgs e) { UpdateLabel(); }
        private void button4_Click(object sender, EventArgs e) { AddValueAndUpdate(1); }
        private void button6_Click(object sender, EventArgs e) { AddValueAndUpdate(0.5); }
        private void button5_Click(object sender, EventArgs e) { AddValueAndUpdate(-0.5); }
        private void button3_Click(object sender, EventArgs e) { AddValueAndUpdate(-1); }

        private void AddValueAndUpdate(double add)
        {
            value += Convert.ToDecimal(add);
            UpdateLabel();
        }


To my surprise, I found this decimal value in memory as a standard number of int type, written without a separator.

And when I changed the value in CE, it also changed in the program. This is the real decimal value in the program, because I was able to apply the increment and decrement operations to it correctly.

I don't know what to do with this information. I'll try to do tests in live conditions at games.



113.png
 Description:
Operations on the value.
 Filesize:  12.69 KB
 Viewed:  12972 Time(s)

113.png



112.png
 Description:
The found number of int type.
 Filesize:  6.84 KB
 Viewed:  12972 Time(s)

112.png



111.png
 Description:
View of the program.
 Filesize:  4.89 KB
 Viewed:  12972 Time(s)

111.png


Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Wed Dec 30, 2020 5:31 pm    Post subject: Reply with quote

check the rounding type and try disablibg fast scan

and add the address as a decimal but decrease the address by 4

_________________
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
View user's profile Send private message MSN Messenger
ap13ski
How do I cheat?
Reputation: 0

Joined: 17 Dec 2020
Posts: 3

PostPosted: Wed Dec 30, 2020 6:40 pm    Post subject: Reply with quote

Dark Byte wrote:
check the rounding type and try disablibg fast scan

It works! [Rounding (default) + no Fast scan]
Thanks a lot!

Dark Byte wrote:
and add the address as a decimal but decrease the address by 4

Could you please explain a little more? It works fine without offset.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 457

Joined: 09 May 2003
Posts: 25262
Location: The netherlands

PostPosted: Thu Dec 31, 2020 3:50 am    Post subject: Reply with quote

I meant when you where searching for 4 byte. The result of that is 4 bytes after the actual start of decimal
_________________
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
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Cheat Engine Extensions 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