View Full Version : Hacking 101

Fish Beans
07-28-2004, 05:00 PM
So you want to learn to hack eh? What could be better than making your own hacks so you don't have to wait for the public ones to be updated, or even better than that, having access to hacks not available to the general public? Well, don't expect to make anything as sophisticated as a drop hack fresh out of the gates, or even something as mundane as a map hack. This tutorial will cover the basics of hacking, and hopefully get you started on your way to joining the ranks of Drakken and Indulgence.

Before we get started, let's cover what we'll need.

1. Memory Searcher - This is the most important tool to a game hacker. Without this, virtually nothing can be accomplished. Artmoney is a much better searching tool, but TSearch will be used for its ease of use for beginners.

2. TMK - Many people bash TMK relentlessly, and for good reason. It has very limited power and creates huge files. I suggest learning C++ or ASM to make hacks in later, or VB if you're lazy.

3. A purpose - Well duh, you need to know what you're trying to accomplish. This tutorial will cover a mineral hack for Starcraft.

Let's begin. Start by loading Starcraft, then Alt-Tabbing out to your desktop, then start TSearch. Click the Open Process button and choose Starcraft.exe. Now you're ready to begin hacking. Switch back to Starcraft and start a game, it doesn't matter what type, although the addresses for Brood War will differ from those found in the original game.

Once the game started, look at your minerals. You should have 50. Pause the game and switch to TSearch. There is a picture of a magnifying glass just below the Open Process button, this is the New Search button. Clicking it brings up a dialogue box with two drop down lists and an edit field. The top box is the search type, we'll be using Exact Value because we know exactly what out minerals are, 50. The middle field is for the exact value search, type 50 into it.

The bottom box is for the size of the value we're looking for. This will change depending on what you're looking for. On/Off switches are generally bytes (Bytes can hold values between 0 and 255). Values that are larger than 255 but smaller than 65,535 are 2 Bytes. 4 Bytes are for values lower than 4,294,967,296. You may be thinking that we are going to use 1 Byte because our value is lower than 255, but that's not the case. The size of a value doesn't change in game (if you exceed the maximum value a number of things can happen), so you must take into consideration the maximum that you could have.

Select 4 Bytes as minerals can occasionally exceed 65,535. Click the OK button and TSearch will begin its search. You will be presented with a box telling you how many addresses were found, and if speech was enabled, an audio alert as well. You probably have several million addresses, which is obviously too many to work with, so we must continue the search. Switch back to Starcraft and do something to change your minerals, have one of your workers mine for a bit. We'll say you now have 66 minerals, so pause the game and go back to TSearch. There is now a second magnifying glass next to the New Search button, this is the Continue Search button. Clicking it brings up the same dialogue box, but all you need to change is the value this time. Type in 66 and hit OK. Once the search is completed you should far fewer addresses, however it's probably still too many to work with. Repeat the changing of minerals and continuation of searches until you have two or three addresses.

There is a green + with a box around it just below the button with the crosshairs and "Search" written on it. Click it to add all the addresses to the cheat table. Now you can manipulate the values stored at the addresses. So for the top one, replace what's in the value field with 1, the one directly below it with 2, and the third with 3 (assuming you have three addresses). Switch back to Starcraft and see if anything changed. Your minerals should have changed to one of the values, that's your real value. The way Starcraft works is there is one real value, a second value for the onscreen display (so the minerals can count down/up when you do something to change them) and a third value which I have no clue what is for. Now that we have our address, we're ready to make our trainer.

Open up TMK and type in a name for your project. I'm not going to go in depth about TMK, but I will go over the basics of making your trainer. Make a new button by clicking on the far left button on the third button group from the right on the toolbar. You can move this button around the screen by clicking and dragging it. Give it functionality by right clicking it and selecting "Write Memory Address". Here you can either use the Wizard or type in the code yourself, it is faster just to type it unless you are unfamiliar with the hexadecimal number system. We'll assume you can work a hex calculator or can do the conversions in your head. Type in POKE FFFFFFFF XX XX XX XX where FFFFFFFF is the address you found in TSearch (it is displayed under the address bar of the cheat table), and XX XX XX XX is the value you want to change your minerals to. Each XX represents one byte, and the Xs must always come in pairs. If you want to change your minerals to 100, you'd type in POKE FFFFFFFF 64 (64 is the hex representation of 100). If you want 65535, type POKE FFFFFFFF FF FF. Hit Apply to close the box.

To rename the button select Properties from the right click drop down box. The same can be done for the title bar by clicking anywhere there is not a button and doing the same. Now for the last part, TMK must know what process to Poke your value to, so in the far left portion of the screen, there are three pages selectable, click the middle one (build settings). Click the bar that says Process Name and find Starcraft.exe from the list above it, or you can just type in Starcraft.exe. The .exe name will be the name of your file, feel free to choose whatever you want for that.

Now to actually make your trainer. The far right button group on the toolbar has four buttons, from left to right they are "Stop", "Debug", "Build" and "Run". You can click Build to create your trainer, and Run will show you how your trainer turned out without actually having to build it.

If you find that after restarting Starcraft your trainer doesn't work any more, you've run into what is referred to as DMA. Dealing with DMA is outside the scope of this tutorial, but will be addressed in my next two tutorials.

That's all there is to basic game hacking, there are many tutorials out there on more advanced topics, and the members of the Gamethreat Network and BWHacks are always willing to help, provided you're not a dumbass asking stupid questions