- basic knowledge of hosting your own server and knowing how to set up bc2 R34 dedicaded server
- basic knowledge with mod tools, that means you're able to edit vehicle spawns, player spawns etc. on your own!
1. You will need: Cheat Engine. It will be used to view memory addresses that show the player location.
Friendly reminder: Since the program is freeware it has some bloatware so make that custom installation is checked upon installing.
2. Now that you have installed cheat engine, you will need the following cheat table: MediaFire link.
3. Open the cheat table that you've downloaded and skip the tutorial (if prompted) as you wont be needing it (can always be accessed via help menu). You should see something like this: Screenshot.
If bottom window is empty that means that you haven't opened the cheat table that you've downloaded. Go open it (or if you are already in cheat engine press ctrl + O and load the cheat table)
4. Now, if you already haven't. Start your server, join it and spawn (you should run the server on the same machine from which you are joining, it shouldn't be a remote server). I strongly suggest password protecting it (vars.gamePassword passcode) so nobody else joins as this was tested with only 1 player on the server.
At this point you might want to run the game windowed at his point (by pressing alt + Enter in-game) and lowering the game resolution so it takes only a part of your screen.
5. In cheat engine click the blinking button and select Frost.Game.Main_Win32_Final.exe (the server exe), open it and keep the code list: Screenshot. If you have spawned in you should see the addresses have values with your player coordinates. If you see random changing numbers that means that you've loaded the wrong executable, probably your game instead of your server.
Some maps use different addresses, there are multiple copies of player location to ensure that there is always at least 1 good address with the player location. Now you need to understand the syntax, it's pretty simple, a vehicle spawn:
Code: Select all
is interpreted as:
<complex name="Transform">ROT 1/0/-ROT 3/*zero*/0/1.0/0/*zero*/some numbers that don't seem to do anything (probably vertical orientation)/0/more numbers that don't do anything/*zero*/AXIS 1/AXIS 2/AXIS 3/*zero*</complex>
where, AXIS 1..3 are -X, +Z, +Y coordinates of the player. ROT 1 and ROT 3 show where player is pointing. You will only be changing those.
When editing the rotation of the vehicle you need to step out of the vehicle, as rotation addresses are for the player, not vehicles (unlike player position). If you happen to be in water, when copying the addresses, you should increase the AXIS 2's value by 1, because the vehicle (boat) will spawn under water and snap to surface (as shown as a warning in the server console upon loading the level)
It is very important that when copying the orientation values that you must copy the negative value of ROT 3 e.g. ROT 3 = 0.488. In the mod tools you should write -0.488 for the ROT3, or spawn will be pointing in the wrong direction. Whereas ROT 1 is copied directly.
Note that, because of the Pythagorean identity ROT 1 squared plus ROT 3 squared must equal 1 so when editing copy the both values of ROT with as many decimal places as there are.
So, to recap, process of an exact new vehicle spawn is as follows: Get into the vehicle and drive it were you want it to be. Copy XYZ coordinates from cheat engine. Exit the vehicle, and without moving the mouse, minimize the game and copy the ROT 1 and ROT 3 values to corresponding fields. Change the sign of the ROT 3. Save DBX, Archive, and you're good to go!
Proof of concept screenshot:
Disclaimer: Some of you will run the server on EA, some on Rome. That's fine. But some of you that plan to run it on EA are probably wondering will they get banned by PunkBuster? Answer is no because you will inject cheat engine into the server exe, not the client exe. That's why it's important to have the server on the same machine. I would suggest, if hosting on EA, to disable PB when doing this just to be extra safe.
This can also be used without mod tools, if you only need to obtain the player location for any other purposes, like creating protected map zones with rconnet for example.
If someone finds a map where player location does not work (and does on others!) let me know which map is it so I can add it in the cheat table. If there is something someone would like to add they should post a message and let me know so I can add it.