Page 1 of 1

Trying to find a "jump" value to "nop"

Posted: Tue Sep 01, 2020 9:39 am
by Stalin15
Red Alert 2 has this function where it checks if there is a building near another to make sure the "build adjacent" works, if it's not close, the build will turn red and you can't deploy.

I did find the value, all thanks to TibEd for I was able to edit out the value itself, so I found it with Cheat Engine and I wanted to find out what accesses to it, this is the result;


And this is what it shows in the disassembler;


I tried to nop some jne but it gives nothing. Any idea what I can do?

For reference, what I want to do is the "Infinite Adjacent (place buildings anywhere on the unshrouded parts of the map)" from this Tiberian Sun trainer
viewtopic.php?t=1838

Re: Trying to find a "jump" value to "nop"

Posted: Tue Sep 01, 2020 9:41 pm
by handlingcfg
i dont know what steps you did, my guess you move cursor near a bulding, then search, you move away and search and find a variable
(if its not try this, most likely its 0 and 1)

after finding this i would try find out what writes to that adress and replace code with always positive value

Re: Trying to find a "jump" value to "nop"

Posted: Wed Sep 02, 2020 8:10 am
by Stalin15
handlingcfg wrote:
Tue Sep 01, 2020 9:41 pm
i dont know what steps you did, my guess you move cursor near a bulding, then search, you move away and search and find a variable
(if its not try this, most likely its 0 and 1)

after finding this i would try find out what writes to that adress and replace code with always positive value
Damn, you're a saviour.
I was expecting that not to work because of how Red Alert 2 coding is set, and yet it does.

I've found the value, it was a Byte from 0 to 1, so I just went to search for the command that sets 0 to 1 and made it so the 0 is always set to 1 and there we go, it works!

Thanks a lot.