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 


General Guidance Disabling HUD, Value Type Prediction

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
GetPushPop
How do I cheat?
Reputation: 0

Joined: 15 Jun 2016
Posts: 6

PostPosted: Thu Jun 16, 2016 1:51 am    Post subject: General Guidance Disabling HUD, Value Type Prediction Reply with quote

This is my first exposure to CE or memory scanning. I've spent several frustrating hours trying to find a value associated with displaying the HUD in Shadow Of Mordor during normal gameplay. (I know, I know, I'm two years late to that party...)

I've noticed that by default the "All" scan type does not include byte or 2-byte types. Can anyone tell me why this is the case? Are these types so uncommon?

I managed to locate a variable (and create a corresponding script) which keeps the chosen "photo mode instagram filter" active during normal play. Which is pretty neat, and gave me hope that disabling the HUD is possible.

I found that value very quickly by scanning for a byte-type, which made me think other related toggles would be easy to locate. I've since spent several hours disproving that optimistic theory.

I don't really know what I'm looking for / at. I'm seeing some 0/1 toggles, but also 0/256's and 0/65,535's - doesn't that seem like they're using the wrong value type for boolean values?

What I'm after has got to be a bool or state enum or integer (the numeric concept, not necessarily the value type). However, I've spent a solid hour with each scan type, and still haven't found a value that affects whether the HUD is displayed.

Does anyone have a suggestion as to what value type I'd be looking for, or alternate methods of achieving the desired result, or am I really stuck filtering through 2 billion records for 45 fruitless minutes at a time?

My sincere thanks for any insight,
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Jun 16, 2016 2:26 am    Post subject: Reply with quote

Not all games have an option to turn off the entire hud or even separate elements. Therefore finding a 0/1 to toggle it is not always the case. In some cases, you will have to find where the game is causing it to be drawn and kill the draw calls for it instead. Some games make this easy with a single call to draw the whole hud, while others draw different elements at different stages.
_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
GetPushPop
How do I cheat?
Reputation: 0

Joined: 15 Jun 2016
Posts: 6

PostPosted: Thu Jun 16, 2016 3:57 am    Post subject: Reply with quote

Rats. I was afraid it might be more complicated than I'd like. Thanks for the rapid response!

I didn't just look for on/off until the results were in the thousands and wouldn't filter further.

I was looking for changed values based on whether the normal gameplay UI was being displayed, but the most exhaustive scans still had 1000+ candidates.

I couldn't narrow it any further without assuming one state or another was a zero.

Does this mean this might be a fruitless endeavor? Any suggestions on an alternate approach?

Many thanks,
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Thu Jun 16, 2016 3:27 pm    Post subject: Reply with quote

Dig into the game to see if there is a developer console that offers the ability to toggle the UI. If so you could make use of that to do it.

Search for strings that are displayed on the UI, something that is visible every frame that possibly has a changing value. Something like:
Health: 99

You could look for something like:
Health: %d

Trace back to how that is called and you can sometimes find the entire hud rendering function.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Thu Jun 16, 2016 7:05 pm    Post subject: Reply with quote

I'd start with a boolean and work up from there. Try 1 for on and 0 for off. If you can access certain points in the game (such as a shop for buying items, or a game menu etc.) where the hud is not showing, you can use that for your searches. Just be sure that any game menu isn't just an overlay (i.e. the hud is still showing, but it's hidden behind something). If 0/1 bool doesn't work, try changed/unchanged. If that doesn't work, there are other methods that are more time consuming and difficult, depending.

Tip: Try searching for float type. (3f800000 hex for on and 0 for off).
Back to top
View user's profile Send private message
GetPushPop
How do I cheat?
Reputation: 0

Joined: 15 Jun 2016
Posts: 6

PostPosted: Fri Jun 17, 2016 12:03 am    Post subject: Reply with quote

Ah, some new tricks to try out. This is great, thank you both for your time!

@atom0s - Finding the function that makes the draw call in such a roundabout way is rather sneaky. Seems like a long shot, but it's worth a try. Hunting for a single boolean certainly hasn't worked.

@METHOS - My best efforts to narrow this down to a single bool left me with 1000+ candidates, and I was only vaguely confident of my searches in the first place. I never did search for a float though, so I'll give that a try.

Now let's share a moment of silence for the bygone era where PC games weren't half-assed ports, didn't actively discourage modders, and actually exposed their consoles...
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jun 17, 2016 12:05 am    Post subject: Reply with quote

1000 results is negligible. Add them all to your list and change 100 or so at a time to 0. If none of them work, use Ctrl+Z to undo the change and remove them for your list. Move on to the next 100 or so.
Back to top
View user's profile Send private message
GetPushPop
How do I cheat?
Reputation: 0

Joined: 15 Jun 2016
Posts: 6

PostPosted: Fri Jun 17, 2016 9:12 am    Post subject: Reply with quote

Aye, sadly I've done so a few times without success. Eventually CTD'd during each attempt.

Which wouldn't be so bad, but scanning takes anywhere from half a second to a full five minutes of non-responsive waiting. Is there a fixable reason scan times are so wildly different? One early "changed / unchanged" might take an instant, while the next takes several minutes.

Now I'm CTD-ing while trying to find what reads/writes to a given candidate. The crash is instantaneous when the game regains focus. It was working fine last time...

This is kind of a bummer, huh? Someone should invent a machine that does this kind of work for humans... ;)

I'll keep trying; I'm stubborn that way.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jun 17, 2016 3:11 pm    Post subject: Reply with quote

If the target crashes while attaching the debugger to check what writes/accesses, try using a different debug method, such as VEH.

If you search for an initial, unknown value, then scan for 0 (for example), your scan will take a long time. If your initial scan is an exact scan for 0, then you scan for unchanged, it will take a long time. etc. etc. If, however, you search for an initial scan of 1, then scan for 0, it won't take as long.
Back to top
View user's profile Send private message
GetPushPop
How do I cheat?
Reputation: 0

Joined: 15 Jun 2016
Posts: 6

PostPosted: Fri Jun 24, 2016 2:28 am    Post subject: Reply with quote

Thanks for the continued support!

Having had no luck with specific values or types, I'm forced to try All and un/changed scans.

The first "unchanged" scan was taking about an hour, and I finally realized why: My SSD was full.

In AppData/temp, cheat engine had borrowed an unfathomable 74GB. For a single scan. I had just purged it immediately prior. The scan hanged halfway through, so I imagine it wanted twice that space to continue.

This is more than twice the weight of the game files in their entirety. Obviously this is a deal-breaker for continuing this memory editing adventure. What in the heck is going on here, and can I make it stop?

Thanks,
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jun 24, 2016 2:46 am    Post subject: Reply with quote

Since I don't want my SSD to die prematurely, I set up my CE temp folder on an internal, disk drive. You could use an external, too.

Obviously, your scans won't be as fast, but my scans don't take long anyways.
Back to top
View user's profile Send private message
GetPushPop
How do I cheat?
Reputation: 0

Joined: 15 Jun 2016
Posts: 6

PostPosted: Fri Jun 24, 2016 3:16 am    Post subject: Reply with quote

So a temporary cache of ~80 gigs for a "recommended 8GB ram" game is not wildly abnormal? That's rather startling. Anyhow, thanks for the rapid response - I'll consider pampering my SSD.
Back to top
View user's profile Send private message
++METHOS
I post too much
Reputation: 92

Joined: 29 Oct 2010
Posts: 4197

PostPosted: Fri Jun 24, 2016 3:48 am    Post subject: Reply with quote

I don't know. I would check your temp folder and delete everything first, just in case. Those items are supposed to be deleted automatically, after a few days (assuming CE closed properly), so you could have data in there that is not related.

That said, doing an unknown, initial scan will essentially make a copy of the game.
Back to top
View user's profile Send private message
Dark Byte
Site Admin
Reputation: 471

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

PostPosted: Fri Jun 24, 2016 3:54 am    Post subject: Reply with quote

no need to use all when using changed/unchanged. just use 4 or 8 bytes and figure oit the type later on

and if you can debug you could try the d3d snapshot function.
use it and look through the screensbots to find the draw call for the gui.
then look at the stack, trace back, and inject code that skips that specific render

_________________
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 -> 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