I’m sure many of you have used the mountain climbing ‘trainers/hacks’. But do you actually understand how they work? That is what I wish to explain, the what, why and how of mountain climbing. Lets begin with an introduction to the subject material.
Assumed knowledge:Quick revision, there are three ‘primary’ trigonometric functions, sine, cosine and tan (and their inverse function). We will be dealing with cosine in this guide.
- Basic trigonometry knowledge
- Basic game-hacking knowledge (addresses, pointers, offsets, etc)
Note: All of the following is done in degrees, not radians.
The mountain climb value is static in memory and is stored as a float (although most people give 4-byte values, this is wrong). The value stored in memory is “0.642787635326385” (approximately), but what does this mean exactly? It is the result of a trigonometric equation, or to be more specific, result of the ‘cosine’ function applied to a currently unknown angle. To find this angle we simply need to use the ‘inverse cosine’ function against our resultant.
arcos(0.642787635326385) = 49.999998
= 50 (approx)
The reason we get 49.999998 is because computers can only store numbers to a certain accuracy in normal circumstances, because of this when we reverse the ratio we get an approximate angle (which ends up being rounded to 50).
What does this mean to us exactly? 50° is just an angle, how does this help us? Well, think about it, when walking around there are certain mountains we can climb, and ones we can’t. Why? Because some mountains are too steep to climb according to the game engine. But how does the engine know? That is where the mountain climb value comes in. 50° is the maximum size of the angle we’re allowed to walk up in terrain, let me explain with a diagram.
As you can see in the diagram, at any given point the game must work out whether we’re ‘allowed’ to walk up the terrain or not, based on the angle that the terrain inclines at. So by changing the value in the mountain climbing address, you are effectively changing the angle at which you can walk on. For example:So as you can see, in terms of the float, the lower the number you put in the address, the steeper the terrain you can climb.
- cos(60) = 0.5
- cos(70) = 0.34202
- cos(80) = 0.173648
I hope this has helped to explain mountain climbing and how it works. If you have any questions don’t hesitate to ask.
P.S. This is my own original work (Chazwazza of MMOwned) steal it and I hunt you down.