Sign in to follow this  
roby65

Detecting game state from rendering calls within directx hook

Recommended Posts

Hi,

 

i'm working on a Smart Directx Hook that should render its things only when game is not in main menu / paused game / with console open, and i'm looking for some way to detect this knowing what directx functions are called.

My first idea was to get a crc from every loaded texture, and knowing what textures are drawed i could know what was the game state.

Only problem is that this method is not reliable: the game i hook ( Fallout : New Vegas / Fallout 3 ) it's a very modded game, and also the loading screens can be changed, and i want to be able to support mods without breaking the game state detection.

Are there other ways to accomplish this?

Google didn't help me

 

Roby

Share this post


Link to post
Share on other sites
Hmm. Never did anything like this myself. Depending on the loaded stuff and the version of the application (defining offset in the heap to where the menu-related stuff is kept),
there's bound to be a byte that changes back and forth when you enter/exit the menu.
Try to grab a dump of the memory allocated for the application in and outside the menu several times to find it,
then look into means of accessing this place from your app.

But I've got no idea whether it would work. Just seems less hackish than looking at loaded textures...

Share this post


Link to post
Share on other sites
Hmm. Never did anything like this myself. Depending on the loaded stuff and the version of the application (defining offset in the heap to where the menu-related stuff is kept),
there's bound to be a byte that changes back and forth when you enter/exit the menu.
Try to grab a dump of the memory allocated for the application in and outside the menu several times to find it,
then look into means of accessing this place from your app.

But I've got no idea whether it would work. Just seems less hackish than looking at loaded textures...

This would be my 2nd idea, but it's not reliable too:

this game has a lot of versions and the user could be using one of these, so i should find the offset for every game version, and if the game gets a new update, this would break the state detection until i find the new offset.

Also the uk, eu and usa version has different offsets too, so for every version i should do the offset find 3 times.

 

Roby

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this