Page 1 of 1

How to search for invincible-like statuses?

Posted: Mon Nov 22, 2021 12:54 pm
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?

Re: How to search for invincible-like statuses?

Posted: Mon Nov 22, 2021 1:12 pm
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.

Re: How to search for invincible-like statuses?

Posted: Mon Nov 22, 2021 1:20 pm
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?

Re: How to search for invincible-like statuses?

Posted: Mon Nov 22, 2021 2:07 pm
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?

Re: How to search for invincible-like statuses?

Posted: Mon Nov 22, 2021 2:15 pm
by Zhronne
Nah, not emulated, just a GoG version, DRM-free.

Re: How to search for invincible-like statuses?

Posted: Mon Nov 22, 2021 5:16 pm
by LeFiXER
It's worth trying this table by ndck76.

Re: How to search for invincible-like statuses?

Posted: Wed Nov 24, 2021 8:49 pm
by ApeDemon66
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.

Re: How to search for invincible-like statuses?

Posted: Wed Nov 24, 2021 9:32 pm
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.

Re: How to search for invincible-like statuses?

Posted: Sun Jan 01, 2023 2:11 am
by EphenSteve
Idk if anyone said it but it's usually called a "blink" state. I've always found them by doing what someone above said with the pause while scanning and doing an unknown scan at different times you can also uses the speed hack to slow it down to give you a lot more time. its almost always a really fast timer with numbers that decrease to 0 really fast. say in any sega genesis or snes game when you take a hit you can search unknown then unpause and re pause a split second later and search decreased then wait till its not blinking anymore then search for 0 then take another hit and scan increased then decreased etc. Usually does the trick unless they do something weird where it starts off at a different number than 0.