gideon25 wrote: ↑Thu Mar 24, 2022 1:41 am
Game v1.03.2 + Additions
[1.] Fixed some scripts and pointers for Game patch 1.03.2
[2.] Added new code that should take care of the flashing bars for the Immune to Negative Status Effects script.
[3.] Added cwchuang's Noclip additions that added controller support for the noclip script
Here
[4.] Added some more world flags under the World Flags by CarlosM/NPC (WIP) including
PATCHES with the ability I assume to set him to alive (all of the flags are done by Discord people, not me).
[5.] Removed the no camera rotation script at the top of table as it did not work (you will have to use the one in the camera section).
[6.] Removed the teleport scripts as they did not work and im not fixing them right now (may never fix them).
Has anyone figured out how the player coordinates work now?
The offset
0x70,
0x74,
0x78 for
X,
Y,
Z (i will be calling the vector of these 3 values
a) still work but the "meaning" of the values seemingly changed. I don't know how it worked before
1.03.2 but if the cheat table did work back then something must have changed.
What I figured out so far:
Whenever one of the coordinates hits a value higher than
32.0 or lower than
-32.0 the value gets "reset" to exactly
0.0 or a value close to
0 (I haven't figured out which one it is). The reset of one of the coordinates apparently doesn't affect the other two values.
My hypotheses:
This leaves me to believe that the vector
a doesn't represent the absolute position of the character but rather an offset to another point (which i will be calling
b) which is at most
32.0 units on every axis (
sqrt(322+322+322)=~55.42 units total) away. The actual and absolute position of the character would be calculated like this:
pos = a + b.
If my assumption is correct that poses two new questions and several sub-questions:
- How exactly does b work?
- Can the coordinates of b take only fixed values which are exactly 32.0 units appart? If so, the possible values for b would split space into cubes with a side length of 32.0 and whenever a coordinate of a gets reset it gets re-expressed with the according coordinate of the closest possible value for b. This would also allow b to not take values 32 but only 1 units apart which would change the character position formula to this: pos = a + 32 * b.
- Can the coordinates of b take arbitrary values that are determined anew every time a coordinate of a is reset? If so, how is a new value of b determined after a reset? Most likely (but not necessarily) the value would be set to the coordinate of the absolute position of the character and the corresponding coordinate of a would be set to 0.0.
- What type is used for b's values? If above sub-question 1 is true b's coordinates might be saved as integers (short, int, long long?). Alternatively or if above sub-question 2 is true the coordinates would be saved as floating-point types (float, double?).
My conclusion:
To me finding the memory location of
b (presuming it exists) with so little information seems pretty difficult and I am not expecting me to solve the problem. Maybe my findings and hypotheses are of help to someone who is more proficient in the use of Cheat Engine and the likes?
P.S.: It might be of help to investigate how the position of other objects (NPC's, props, etc.) are saved in memory.