How to search for invincible-like statuses?

Memory scanning, code injection, debugger internals and other gamemodding related discussion
Post Reply
Zhronne
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Nov 22, 2021 12:52 pm
Reputation: 0

How to search for invincible-like statuses?

Post by Zhronne »

Hi. Most of the time you would assume that any game where you have specific moments where you become invincible is a value somewhere that changes between two values: one denotes when invincibility is active and one when it's not.

As such I guess you should go with changed/unchanged searches, alternating searches when you are invincible and when you are not and looking for values that changed.


This is pretty basic I guess, but sometimes I just can't seem to find this value, like in the recent R-Type Final 2, your spaceship is invincible only for the few seconds of the beginning of a stage, the invincibility effect is also denoted by a graphical thing.
I can't seem to find this memory address though.


Anybody who had to search for similar things in other games have some tips on how should I proceed?
Last edited by Zhronne on Mon Nov 22, 2021 1:19 pm, edited 1 time in total.

User avatar
LeFiXER
Expert Cheater
Expert Cheater
Posts: 256
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 88

Re: How to search for invincible-like statuses?

Post by LeFiXER »

Scan for 1 while it's active (make sure pause process is ticked when scanning), and scan for 0 while it's inactive until you narrow it down. It's usually something like that. The data type should be a byte value but it hasn't been unheard of for developers to use bigger data sizes and for that reason I recommend selecting all types.

Zhronne
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Nov 22, 2021 12:52 pm
Reputation: 0

Re: How to search for invincible-like statuses?

Post by Zhronne »

I usually pause the game manually and then alt-tab to Cheat Engine 7.3 64bit.
The "pause process while scanning" seems to make this game hang up irreversibily.

Do you think that makes a difference? I don't think it should?

User avatar
LeFiXER
Expert Cheater
Expert Cheater
Posts: 256
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 88

Re: How to search for invincible-like statuses?

Post by LeFiXER »

Use CE to pause the game. It suspends the process so values possibly can't change whereas in-game pause doesn't always stop the values from changing in the background/other threads. Is it emulated?

Zhronne
What is cheating?
What is cheating?
Posts: 3
Joined: Mon Nov 22, 2021 12:52 pm
Reputation: 0

Re: How to search for invincible-like statuses?

Post by Zhronne »

Nah, not emulated, just a GoG version, DRM-free.

User avatar
LeFiXER
Expert Cheater
Expert Cheater
Posts: 256
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 88

Re: How to search for invincible-like statuses?

Post by LeFiXER »

It's worth trying this table by ndck76.

User avatar
Geo
Fearless Donors
Fearless Donors
Posts: 223
Joined: Sat Mar 03, 2018 7:31 am
Reputation: 164

Re: How to search for invincible-like statuses?

Post by Geo »

If there's an obvious visual indicator, searching for it directly is definitely a plausible option, whether it's a boolean or decrement based value, but sometimes I prefer to find the health or whatever relates to damage, see what writes to it when hit, then look at the code for any condition before it that would skip the whole getting damaged code/function. If you can find the condition, you most likely found the "invincibility" value/flag tthat's being checked and can get the address from the code by placing a breakpoint. Alternatively, you could look at the code and see how it's constructing the pointer to get it. Looking at the code can definitely require more skill than some people have, but it can save a lot of time in the long run.

User avatar
LeFiXER
Expert Cheater
Expert Cheater
Posts: 256
Joined: Wed Mar 24, 2021 9:35 am
Reputation: 88

Re: How to search for invincible-like statuses?

Post by LeFiXER »

Geo wrote:
Wed Nov 24, 2021 8:49 pm
If there's an obvious visual indicator, searching for it directly is definitely a plausible option, whether it's a boolean or decrement based value, but sometimes I prefer to find the health or whatever relates to damage, see what writes to it when hit, then look at the code for any condition before it that would skip the whole getting damaged code/function. If you can find the condition, you most likely found the "invincibility" value/flag tthat's being checked and can get the address from the code by placing a breakpoint. Alternatively, you could look at the code and see how it's constructing the pointer to get it. Looking at the code can definitely require more skill than some people have, but it can save a lot of time in the long run.
Some very good points here although for this particular game it's a one-shot-player-is-dead kind of deal. I can't remember if there was a shield or not in the game but that could also be another possibility.

Post Reply

Who is online

Users browsing this forum: No registered users