PDA

View Full Version : finding team address with TSEARCH tutorial:


caliber1942
15th June 2005, 18:57
this will be quick as it is very similar to all the other bf games:

First, fire up the game in single player mode.

Start as the US team and then PAUSE:

alt-tab out to TSEARCH and then attach it to bf2.exe.

Start a search. since you are on the US team, use 2 as the value and leave the type as 4 Bytes (LONG). it will take some few seconds and then you will have 300,000 found values or more.

alt-tab back to the game. un-pause and then die and switch sides. after spawning to the MEC team, alt-tab back to TSEARCH and then do a search next.

enter 1 as the value, keep it as type 4 Bytes (LONG), and then start the search. You should have way less (100-200 or so).

Ok, keep this up (switching teams and entering the appropriate number 1 or 2 in TSEARCH) until you no longer are having any progress eliminating addresses.

you will have like 20-30 addresses now that all change when you change sides. only one of them is the true team address. what i do, and this is true for many searches, is go to each of them singly and see if it changes the game. that's right, you just change the value from 1 to 2 (or 2 to 1) and see if it changes the team you are on in the game.

how do you do this? simply copy all of the found addresses in the address table to the Cheats list window where you can then change the value of each address.

OK, some tips on this:
1) change it from 1 to 2 or 2 to 1. don't throw some other number in there as it will probably crash at some point.
2) changing the value at one address might cause one of the other addresses to change as well. keep an eye out for this, but this is normal.
3) make sure that you truly have found the correct address. sometimes (although i didn't find this to be true when doing this in bf2) two addresses may affect the team you are on but only one is the right one. run through them all and make sure there aren't two of them and weed the wrong one out.
4) change it back to what it was if it was the wrong address. for instance if you changed it from 1 to 2 while trying to see if you change teams, then if it didn't work, change the address back to 1. this prevents problems from occurring and crashes and false positives, etc.
5) once you have worked out the address, remember that likely the next time you run the game or even the next map this address will change. this address is a dynamic address, which means that it is temporarily stored and moves sometimes. you need to use the autohack feature to find areas of code that read and write to that address and then use that information to find the static pointer (defeat DMA) or use a code cave to help.

edit: future work/plans:

1) make it where both teams are showing at once (find code that displays the teams or decides which team to display and modify it or remove the compares that allow one or the other to be displayed)
2) possibly create a radar hack that displays enemies all over the map, not just where the radar shows them here and there. play around with radar.
3) possibly try to discover the code that controls the color of the map icons for players/vehicles as well as the icons in the game action window over players and vehicles. the idea here is to have the enemies red and friendlies blue if at some point they both can be displayed at once. or at least have the enemies red while you are swapping teams, etc.
4) play around with zoom, accuracy, player types, etc.

hope this helps!

cal

Spontaneous
15th June 2005, 19:07
Cool but its the same as the other bf games. Pretty much will be covered on the BF General forums(once everything is organized). The whole idea behind the BF General forum is to cover things that work for all the games, such as this. Thanks anyways man. What you might think about doing is add the finishing touchs(I see you had future plans at the bottom), maybe make it more generalized so it refers to all the games, post it in the general forums and I will make sure when I finish up the organizing that I link to your thread in the main How to make your own hack(new thread will be made and updated from the old one).

CaptainCox
15th June 2005, 19:28
Yea not bad Caliber, been at it whole friggin day (skipped work eaven ;) )
To find the Dynamic team addy is very easy, and the DMA as well, the prob realy starts when starting to think how to get the enemy SPOTTED at all times and everywhere. Been tinkering with this and that but so far... I guess one have to be a bit creative here to find a clever way to search for it thats all.
As most ppl prob have noticed the Red "Spotted" markers fade after some secs, so that makes it pretty hard to eaven start searching for changed or whatever, another idea is to dig deeper in to a 2nd ort 3rd level DMA but its pretty tedious, but again Hacking is just that LOL.
Anyhow if some smart ass comes up with a good concept to search for the Red Markers, shout it out...;)

caliber1942
15th June 2005, 19:42
i don' t think that the "enemy spotted" method is going to amount to much in the long run. what we need is the area of code that controls the minimap when it draws the player's teammates onto the map. if we can find that code, then likely we can modify it and make it where it draws both teams and also you could likely change the color of the icons that get drawn. it seems to me that when the enemy is spotted (red) or when your "team" (green) is in the screen or on the map, the same icon shapes are used. likely, the same graphic is used and just blitted using a different color. therefore, i think it would be possible to change the color of the player icons and tags (for instance, the enemy tags are red when you move the mouse over them, instead of blue). i don't know how to go about isolating functions and code to this degree yet. any pointers and help in this would be great-

spon, you are probably right in that this is repeative and said before. but i was hoping that it would also start some discussion similar to like what capt.cox was discussing about the map and how to go about making it more useful, so perhaps you can leave it here for the newbs who keep asking for this info about finding the team address for bf2 in this particular part of the forum (bf2) and also so that more info about the teams and mini map can be discussed.

any more discussion about the map and about the team addresses and how to use it or hack further would be welcome and appreciated-

best,
cal

thanks,
cal

CaptainCox
15th June 2005, 20:14
Hmm yea, it is maybe the traditional way to go about it ;).
I found some addys that does tamper with the stuff in the minmap, for e.g was searching for the Team DMA, there is 2 other dynamic addys that also shows the team addy, these 2 will change when you change the one actualy changing teams. othewise they are not changeble, with other words the one holding the dynamic team addy kind of controls theese 2. I breakpointed them to look for offsets to calc DMA etc and some of the pointers you find doing that will for e.g switch the scoreboards around or flip the little colored bars at the very bottom of the minmap from red to blue etc, so sure they are doing something related to team but... another idea with emphasis on IDEA is to find the general area where the minmap gets drawn is to use the sliders setting the transparancy for the icons in the minimap, and search for that as you would viewdistance etc, its a long shot but maybe worth a try.

caliber1942
15th June 2005, 21:09
not a bad idea. we will have to come up with more ideas like that to find addresses that might lead us to the code itself. any other ideas are welcome. i will tinker more and post any findings myself here.

best,
cal

CaptainCox
15th June 2005, 21:23
Maybe its me or somet but searching for e.g 0.14 Float when that slider is set to 14% does nothing I tried in hex and without decimals, but it wont find it....wierd.

xollox
15th June 2005, 21:32
Has anyone looked into what exactly the UAV does to show enemies on the map?
My (uneducated) guess is when it's drawing the minimap it sees if the UAV is activated and if that player is within the radius of the UAV and draws it (red) if that's true. It could be the key to the minimap hack...or I could be totally off (I haven't opened it up in Olly yet.)

When you mention the slider, I'm assuming you're talking about fog/view distance. In bf1942 it was stored as a whole number in a 4 byte variable. You might want to try that if you haven't already.

Spontaneous
15th June 2005, 21:40
OMG could it really be xollox? Welcome back man. Havent seen you in ages. Your the one that taught me the beginnings of bf hacking when I got into it and I a very grateful. It is really nice to see you back.

As for fog/viewdist, sparten found it using the dec as a float, that is where cox is getting it from. I also told sparten the same thing about the 4 byte and he said he found it the float way. Now I havent checked but there also might be console commands(might have to unlock the console somehow) that you can change fog/viewdist which might be helpful in finding the true values(as when you use the slider, your finding the overall % level, not the value for each thing). I have IDA Pro running now to see if I can find any console commands relating to fog/viewdist

xollox
15th June 2005, 21:50
Thanks (: I'm glad I had a positive impact on someone during my time here.

Now that we have a new target, it's time for me to surface again and try my hand at hacking it.

BF2 is awesome. BF2 with "OMG H4X!" would be even better...

caliber1942
15th June 2005, 22:59
capt. cox- i agree! has been kind of a pain trying to find that address. i have done lots of different types of searches and combinations.... still haven't gotten it. guess i will keep plugging along and trying. maybe it is the "reverse" of the number (when slider is at 0, the value is actually 255 or some other number or 100 for that matter) for when the calculation for transparency is done later (255 might mean totally opaque while 0 is transparent). anyways, still working on it.

cal

Edit: don't know if this is useful but i found the addresses for the rgb of the hud (0-255). did it by 4 byte search of the actual value (if the slider said 255, search for 4 byte 255), etc.. maybe this way i can search for rgb values (for instance if i know the rgb for the color of the player icons on the map, maybe i can change them), etc. still trying to find the transparency thingie, though-

CaptainCox
16th June 2005, 00:00
Cool stuff man, I have been banging my head with tags here (i know not related to map) and did the "Classic search" 50-70 etc and no go, I am throing in the towel for tonight, gona press on after work in the morn, no doubt. I know it works on Viewdist, i mean searching for 0.18 float if its set to 18% etc but the transparacy seems different, i dont know why and i am not eaven sure its the right way, but at least we are starting to look at the prob from many diff angels here and that is good for sure ;)

caliber1942
16th June 2005, 17:38
hopefully i'll have more time today to mess with the map some more. right now, dma hack works fine for displaying the opponents troops. i need to figure out which line of code controls the display of the troops based on the player's team number. will be working on that.