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 


Change Input and Display Values

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
FryGuy
Newbie cheater
Reputation: 2

Joined: 19 May 2014
Posts: 22
Location: United States

PostPosted: Mon Aug 29, 2016 10:26 pm    Post subject: Change Input and Display Values Reply with quote

So I've been working on a table and I've got quite a few pointers now but some of the values I've found are different than the values in game.

For example, say I've found a value for health and it shows up as 100 in game but the value in Cheat Engine is 120.
So my question is how can I display the value of Health in my table as [value-20] and change the input from my table to [value+20]?

What would be the best way to go about doing this? Is there an option in Cheat Engine itself or is it a problem for LUA? Are there any tutorials that already go over this and if so could I get a link?

Thanks in advance.

_________________
Hitler! I hope you have an awsome day!


Last edited by FryGuy on Mon Aug 29, 2016 11:10 pm; edited 1 time in total
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Mon Aug 29, 2016 10:58 pm    Post subject: Reply with quote

It would be easier to just change the display values to match the actual values.
Back to top
View user's profile Send private message
FryGuy
Newbie cheater
Reputation: 2

Joined: 19 May 2014
Posts: 22
Location: United States

PostPosted: Wed Aug 31, 2016 4:15 pm    Post subject: Reply with quote

Maybe a better example would be something like the Pokemon Uranium table. All the values in the game are the [Real Value * 2 + 1]. Is it possible to write something in background that converts the number to its real value and then displays it on the table. Then, when the user enters a number, change the entered value to back to the number needed by the game?
_________________
Hitler! I hope you have an awsome day!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Thu Sep 01, 2016 12:19 am    Post subject: This post has 1 review(s) Reply with quote

Look up custom value types. If you'd like an example, DB made the 4 byte * 8 flash type here.
_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
FryGuy
Newbie cheater
Reputation: 2

Joined: 19 May 2014
Posts: 22
Location: United States

PostPosted: Thu Sep 01, 2016 11:29 am    Post subject: Reply with quote

Perfect! Thank you! That is exactly what I was looking for. It worked like a charm. Very Happy

One more question though. Is there anyway to include it in a table so that, when shared, other users can use the custom type without having to add it themselves?

_________________
Hitler! I hope you have an awsome day!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Thu Sep 01, 2016 12:50 pm    Post subject: Reply with quote

Open up the Lua script window and put this in:
Code:
registerCustomTypeAutoAssembler([[
your AA custom type here
]])

It's up to the users to execute the Lua script when they use the table. I think CE automatically executes it by default (or CE at least asks), so that shouldn't be a major problem.

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
FryGuy
Newbie cheater
Reputation: 2

Joined: 19 May 2014
Posts: 22
Location: United States

PostPosted: Thu Sep 01, 2016 1:06 pm    Post subject: Reply with quote

Awesome! Thank you.

However would the script try to add the new type every time the table is launched?
Also I'm sure many of those who use cheat engine regularly probably don't appreciate having too many extra types added to their search menu. Is there a way to remove them as well?

If not it's all good. I've already got the functionality I asked for. Very Happy

_________________
Hitler! I hope you have an awsome day!
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4711

PostPosted: Thu Sep 01, 2016 1:24 pm    Post subject: Reply with quote

CE seems to give an error when registering a custom type that has the same name as an already-defined custom type. I don't believe there's any "official" way of checking which custom types exist already, but it's possible to get around that by using the GUI:
Code:
local valTypes = getMainForm().VarType.Items
for i=0,valTypes.Count-1 do
  if valTypes[i] == "Custom Type Name Here" then
    return
  end
end

registerCustomTypeAutoAssembler([[
...
]])

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
FryGuy
Newbie cheater
Reputation: 2

Joined: 19 May 2014
Posts: 22
Location: United States

PostPosted: Thu Sep 01, 2016 3:52 pm    Post subject: Reply with quote

Thanks! That's exactly everything I needed. I guess I hadn't looked at the Pokemon Uranium thread in a while lol. Custom types had already been discussed. Thanks for helping for helping me anyway!

Cheers Very Happy

_________________
Hitler! I hope you have an awsome day!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking 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