Page 1 of 1

R/W Encoded value

Posted: Thu Dec 17, 2020 7:08 am
by sanitka
I have set of values which are encoded - by XOR, xor value changes dynamically.

What is the best approach of implementing editing such a value ?

My idea is:
// to simplify description I am skipping decoding and encoding process
- hook frequently used function
- get the value
- if ("myvalue" is -1 (default)) then "myvalue" = value, "oldvalue" = value // ie. get the value from game
- otherwise if (value == "oldvalue") then value = "myvalue", "oldvalue" = "myvalue" // ie. write the "myvalue" to the game
- otherwise "myvalue" = value, "oldvalue" = value // ie. prevent manual overwrite of value changed "in-game" like during level up, etc.

or is there any way how to simply "hook CE GUI" and on manual value change call a script which encodes changed value to memory ?