It's us who decide how it's stored in the function so yes this is possible to do.I have a new idea.
For the search and replace maybe the game stores it splitly.
The first four are the replace, and the last four are search
if the last four are missing, then the last replace value is used isntead
and as for the glitch, maybe the starting offset is too early or the ending offset is too large? Then when it finds the value in the code it changes it to whatever else, making things break.
In my case it was replacing 5112 with 7ffe.
This is the principle of the function I made: it's searching a given range for a value and replace any of them by another value.
This is unfortunately unsafe and should be use with caution.
Now, @itsRyan didn't you said that an object is defined with a flag too like [2bytes(id) + 1 bytes (flag)] ?
Because if you have more specific infos on an object, we should search for all of them, it'll decrease the false positive of the function.
Last edited by Nanquitas,