Hello 😁
This post is about cheats for the videogame Mindball Play 4.19.2.0 (x64).
Sample video:
The cheat table looks like this:
The pointers are defined by the assembly script "Build player1's pointers" who is activated. One can activate the bottom script, who is the featured one in the shown video above.
This is how that featured script looks inside:
The Lua part describes these hotkeys:
- Press "Shift+Up" to throttle speed modulus (I mean, accelerate a lot faster).
- Press "Shift+Down" to brake/reverse (it actually throttle the speed modulus backwards).
- Hold "Shift" & press "Left"/"Right" to steer faster.
I'll explain this cheat in detail (watch the above screenshot for understand):
To let these hotkeys work, first Lua defines a function for know the relative speed (from the line 3
to 14
).
After that it defines a function to describe when the speed vector is modified (it will be used after executed the hotkeys), in the line 15
.
From the line 20
to 24
it makes sure the pointer is correctly built to avoid game crashes.
In the line25
it defines the address who belongs to player 1.
The lines 26
, 27
& 28
define the absolute coordinates (don't confuse with "absolute value" term) of the marble (player 1).
Note: In this particular game, the vertical axis is the "Z". So, to define hotkeys to throttle speed modulus & change the angle to steer easily, one should work in the plane X-Y.
Now let's focus on the function "DefineRelativeSpeed" who is executed (because it's already defined) in the lines 31
, 46
, 61
& 71
. I'll explain its 'interior'.
Remembering trigonometry topics, I use the parts "X" & "Y" of the speed vector, to define a radius "r" & an angle (In Lua script I called it "OldAngle", because it's before it can be modified by the hotkeys).
In the line 4
, I defined the radius.
In the line 5
I defined the angle.
In the line 6
, I defined the player's viewpoint calling it "CameraAngle".
And to let the "X" & "Y" coordinates be relative, I used formulae to define a 'relative angle' (the angular part of the relative coordinates) calling it "RelAngle", & defined the unmodified relative speed's "X" & "Y" in lines 12
& 13
. I did all that from the line 7
to 14
.
When hotkeys are used, I define the new speed getting the rectangular coordinates using the absolute speed's radius & the sin/cos of the reltive speed's anlge, from the line 15
to 18
. These rectangular coordinates belong to the modified relative speed (the one from the viewpoint of player, after hotkeys).
Now I'll explain what the hotkeys do actually:
The "Shift" pressed key 'switch' is executed in line 29
.
Let's focus on "Shift+Up". First it remembers what is the relative speed (line 31
). In line 32
, it asks if the ball is not rolling backwards (for let you understand). If not, then it overwrite the radius "r" 'saying' that now, the radius is the one of the relative speed, plus 75. If the ball is going backwards then it substracts 75.
Once did that, the relative modified speed is translated to the absolute speed, in the line 39
where the 'new' speed is defined by its rectangular coordinates. Therefore, they're set in the player's real speed vector coordinates in lines 40
& 41
.
The "Shift+Down" hotkey does all the same than the "Shift+Up", but reversed.
As for "Shift+Left", it remembers the relative speed (line 61
) & its radius is defined in line 62
. After that it defines a new angle calling it "NewAngle". It's the same that "OldAngle" but adding it 0.0375 (it's formally described in line 63
). With this modified information, the new modified speed vector's coordinates are described in line 64
. The modified absolute speed vector is set in the player's real speed vector coordinates in lines 65
& 66
.
The "Shift+Right" hotkey does all the same than the "Shift+Left", but substracting 0.0375 to the angle in line 73
.
All these mentioned hotkeys have an additional modification: It multiplies the "Z" vertical axis (the one from absolute speed) by 0.875. This is for avoid the mable go too high when throttling/steering, since it bounces often when doing that.
Watching the video again, one can view how the marble's speed modulus & angle are modified drastically using those hotkeys.