Saturday, June 23, 2007

HOWTO: Drop Bad Flags Instantly

Bad flags are annoying, are they not? This is especially true in situations such as grabbing Jamming when your opponent has Cloaking. And those time limits! On servers with bad flag drop such as 15 seconds or more, waiting can be ever so dull. Wide Angle isn't so awfully bad if you get used being able to utilize it; but, let's face it; there are certainly other more desirable flags.

Here's an edit that will allow you to drop bad flags instantly even on servers that do not allow dropping of bad flags (an added bonus). Most players probably won't notice; however, there is a chance that the more experienced players might very well notice -- even if after a while -- as well as administrators especially if they're already monitoring you out of suspicion.

Open LocalPlayer.cxx in the /src/bzflag/ directory of the extracted source, and find the following lines:

// drop bad flag if timeout has expired
if (!isPaused() && dt > 0.0f && World::getWorld()->allowShakeTimeout() &&
getFlag() != Flags::Null && getFlag()->endurance == FlagSticky &&
flagShakingTime > 0.0f) {
flagShakingTime -= dt;
if (flagShakingTime <= 0.0f) { flagShakingTime = 0.0f; server->sendDropFlag(getPosition());


First, look at the second line:

if (!isPaused() &&amp; dt > 0.0f && World::getWorld()->allowShakeTimeout() &&

Let's remove "World::getWorld()->allowShakeTimeout() &&" so that it reads like this:

if (!isPaused() &&amp; dt > 0.0f &&

Next, let's look at the fifth line:

flagShakingTime -= dt;

Let's change "-= dt" to "= 0.0f" so that the line reads like this:

flagShakingTime = 0.0f;

The above will allow you to drop bad flags instantly on servers that allow for dropping of bad flags. To be able to drop flags on servers that don't allow dropping, we need to edit elsewhere. Take note, however, that experienced players will most likely notice your dropping bad flags if you are playing on a server that doesn't allow it. To add the ability, find the following lines:

// if it's bad then reset countdowns and set antidote flag
if (getFlag() != Flags::Null && getFlag()->endurance == FlagSticky) {
if (World::getWorld()->allowShakeTimeout())
flagShakingTime = World::getWorld()->getFlagShakeTimeout();

Look at the third line:

if (World::getWorld()->allowShakeTimeout())

Remove "->allowShakeTimeout()" so that it reads like this:

if (World::getWorld())

Next, let's look at the forth line:

flagShakingTime = World::getWorld()->getFlagShakeTimeout();

Replace "= World::getWorld()->getFlagShakeTimeout();" with "= 0.05f;" so that it reads like this:

flagShakingTime = 0.05f;

I originally tried the number to "0.0f". When I tested it on my server not allowing bad flag dropping, and no win limit, it didn't work; I picked up a bad flag and it didn't drop. So, 0.05f "works". All of this tip works even if there are easier and/or more efficient ways of accomplishing the same ends :)

When you're finished, save your file, compile your new client, and...

Have fun!

Related post:
HOWTO: Drop Bad Flags Like Regular Flags

New Blog for BZFlag Cheat News

BZFlag Cheat News has a new home:

http://bzflagcheatnews.blogspot.com/

Previous articles have been reposted there.

See you soon ;)

Friday, June 22, 2007

HOWTO: Speed Hacking

Brought to you by Felipe :)

Here are some tips that will allow you to get the most of your tank's speed without having to depend on the high speed flag. You can optionally add quick turn to your tank, as well. Even without extreme speed, and handful of servers may kick you. Most won't at the time of this post. A few more servers may kick you for extreme speed. Nevertheless, you will enjoy always being able to chase down other tanks...

Open LocalPlayer.cxx in /src/bzflag/ of the extracted source. With your favorite text editor, find the following lines:

if (flag == Flags::Velocity) {
fracOfMaxSpeed *= BZDB.eval(StateDatabase::BZDB_VELOCITYAD);

Look at the first line. Remove the "== Flags::Velocity" so that this section reads like this:

if (flag) {
fracOfMaxSpeed *= BZDB.eval(StateDatabase::BZDB_VELOCITYAD);

This will give you high speed regardless of flag save Thief and Burrow. Additionally, you will see further down these lines:

} else if ((flag == Flags::Burrow) && (getPosition()[2] <>
fracOfMaxSpeed *= BZDB.eval(StateDatabase::BZDB_BURROWSPEEDAD);

You can change "BZDB_BURROWSPEEDAD" to BZDB_VELOCITYAD" so that the lines read like this:

} else if ((flag == Flags::Burrow) && (getPosition()[2] <>
fracOfMaxSpeed *= BZDB.eval(StateDatabase::BZDB_VELOCITYAD);

This will give you high speed with Burrow. You can also play around some of these variables. For example, I substituted "BZDB_BURROWSPEEDAD" and "BZDB_VELOCITYAD" with "BZDB_THIEFVELAD" so that I could drive at the speed of Thief on my own server. Some servers will undoubtedly kick you for driving too fast when you drive at Thief speed without Thief... but then, some won't :)

For EXTREME speed, find the following lines:

// can't go faster forward than at top speed, and backward at half speed if (fracOfMaxSpeed > 1.0f) fracOfMaxSpeed = 1.0f;
else if (fracOfMaxSpeed < -0.5f) fracOfMaxSpeed = -0.5f;

Change the numbers so that the lines read like this:

// can't go faster forward than at top speed, and backward at half speed if (fracOfMaxSpeed > 0.0f) fracOfMaxSpeed = 9.0f;
else if (fracOfMaxSpeed < fracofmaxspeed =" -9.0f;">

Again, play around with the numbers to find a speed that you like. Naturally, you will stick out like a sore thumb when you drive so unbelievably faster than everyone else. Hehehe...

For the original instructions, see Felipe's comments to Flying Without Wings & Extended Jumping. When you're finished, save the file, compile your new client, and ...

Have fun!

Related Post:
HOWTO: Quick Turn Always

HOWTO: Quick Turn Always

Brought to you by Felipe :)

Here's a simple edit that will allow you to have Quick Turn at all times without the Quick Turn Flag. Find the following lines of LocalPlayer.cxx in the /src/bzflag/ directory of the extracted source:

// boost turn speed for other flags
if (flag == Flags::QuickTurn) {

Remove "== Flags::QuickTurn" so that the lines read like this:

// boost turn speed for other flags
if (flag) {

For the original instructions, see Felipe's comments to Flying Without Wings & Extended Jumping. When you're finished, save the file, compile your new client, and ...

Have fun!

Related post:
HOWTO: Speed Hacking

Thursday, June 21, 2007

HOWTO: Flying Without Wings & Extended Jumping (UPDATED)

This gem comes to us courtesy of blogger, Felipe :)

Scenario: You and another tank are jumping and shooting at one another. Wouldn't it be nice to be able to slide in one more jump in mid air? Now you can! You can 1-up those annoying players who keep coming at you with Wings. What's cool is that you are not limited to any number of jumps, and this can be especially useful on servers with Wings flap limits ;) But, this tip doesn't stop there...

You can jump no matter what -- regardless of whether or not the server allows jumping (the good folks at Hepcat will love you for it, hehehe...), or if you have the Burrow flag, or even if you have the No Jumping flag! When Burrowed, the jump isn't instantaneous, so you will need to press and hold jump to get airborne. And, it doesn't matter if you are sealed in a building with Oscillation Overthruster. Now, you can jump from inside a building to pick off players who think that they are safe by staying top of your building . Muwahahahaha! >:)

Not only all of that, but you can also control your tank in the air while jumping. The one shortcoming, though, is that you you can only control your tank in mid air you don't have a flag. With any flag (including Wings), you will not be able to control your direction.

UPDATE: Now, you can fly regardless of what flag you have! Imagine being able to fly high to target a Winged tank with your guided missile... or shockwave in air. Or, on a CTF server with no jumping allowed, you can place your team's flag on top of a pillar since the other team won't be able to jump up to get it >:) The possibilities are practically endless... See the comments to this post to see how this was updated.

We're going back to LocalPlayer.cxx for this. You can find it in /src/bzflag/ after you have extracted the source. Use your favorite text editor's search function to locate "can't jump while burrowed". You will come across this section:

FlagType* flag = getFlag();

// can't jump while burrowed
if (getPosition()[2] <>
return;
}

if (flag == Flags::Wings) {
if (wingsFlapCount <= 0) { return; } wingsFlapCount--; } else if ((location != OnGround) && (location != OnBuilding)) { // can't jump unless on the ground or a building if (flag != Flags::Wings) return; if (wingsFlapCount <= 0) return; wingsFlapCount--; } else if ((flag != Flags::Bouncy) && ((flag != Flags::Jumping && !World::getWorld()->allowJumping()) ||
(flag == Flags::NoJumping))) {
return;
}

// add jump velocity (actually, set the vertical component since you


Let's do away with most of this section so that it reads like this:

FlagType* flag = getFlag();

// add jump velocity (actually, set the vertical component since you

The above allows us to jump whenever we want. Now, let's add some ability steer in air. Search for "can't control motion in air unless have wings", and you will come to a section that looks like this:

// can't control motion in air unless have wings
if (getFlag() == Flags::Wings) {
float speed = desiredSpeed;


Specifically, let's look at the second line of the above:

if (getFlag() == Flags::Wings) {

Let's remove "== Flags::Wings" so that the line reads like this:

if (getFlag()) {

Save the file, compile your new client, and you're done. Many thanks to Felipe for sharing this one with us ;) You can view the original instructions in the comments of the previous post, The Infamous BZFlag F5 Cheat. Please take a look at the previous HOWTO posts if you haven't already done so. And, let's keep those tips rolling in >:) As always...

Have fun!

Monday, June 18, 2007

TIP: The Infamous BZFlag F5 Cheat

Grab yourself a copy of the 2.0.4 version of BZFlag, and use F5 -- the screenshot function -- to insert artificial lag. One method is to press and hold F5 to insert the lag. This is a great technique for dodging bullets and capturing another team's flag.

You can also press and hold F5 to get to other places you normally couldn't get to... like the other side of a wall. Again, this is if you you use the older 2.0.4 version of BZFlag. The delay for taking a screenshot until you release F5 was "fixed" in version 2.0.8. You can read about how it works in this discussion:

my.bzflag.org/bb/

"
The basic case is this: the tank moves along velocity vector, then collisions are checked. If the tank has moved too far along in one time step, it is now inside (or on the other side(the F5 cheat!)) of the object it 'collided' with." [emphasis added]

It's briefly mentioned here, too:

http://www.answers.com/topic/bzflag

"
F5: To F5 is to take a screenshot of BZFlag, which also creates a small lagspike and makes your tank unhittable for a short interval of time."

As you can imagine, this has been around for quite a while. It's posted here at BZFlag Cheat just in case you didn't get an opportunity to take advantage of it previously >:) Some more information about the F5 technique is easy to find with your favourite search engine. Here's an example:

Google search

Keep in mind that it is not entirely undetectable especially among experienced players. Use it wisely ;) Here's an example of a player, soxs, who got banned for it:

http://gu.bzleague.com/index.php?link=shame

So, now you can enjoy enhanced gaming without having to modify or add a single line of code to your client!
To control disk space, don't forget to empty your screenshots folder when you're finished playing. And as always...

Have fun!

Related posts:
HOWTO: Classic God Mode
HOWTO: Shoot While in a Building with Oscillation Overthruster

Sunday, June 10, 2007

HOWTO: Shoot While in a Building with Oscillation Overthruster

Imagine that you have Oscillation Overthruster (OO) and you're chasing another player with OO. The other player dodges you by hiding in a building or some other structure (for example, while playing Hide-N-Seek Hills). You can go after the player to maintain your chase; however, what if the player stops while you're both sealed? You can't shoot if you're both sealed. Moreover, you can almost imagine the other player saying something like, "Haha! You can't shoot me here!"

Now, you can have the last laugh as the other tank goes Kaboom! Thrills and laughs abound now that buildings are no longer safe havens for other players with OO. But, why stop there? Snipe other players from the safety of buildings...

To do that, we're going to visit LocalPlayer.cxx (in /src/bzflag/ of the extracted source).

Use the search feature of your favorite text editor and look for "case Exploding". You will come to a section like this:

case Exploding:
firingStatus = Deceased;
break;
case InBuilding:
firingStatus = (getFlag() == Flags::PhantomZone) ? Zoned : Sealed;
break;
default:
if (isPhantomZoned())


Let's do away with the "case InBuilding" section so that the modified file now looks like this:

case Exploding:
firingStatus = Deceased;
break;
default:
if (isPhantomZoned())


Next, search for "make sure we're allowed to shoot". You will come to a section that looks like this:

// make sure we're allowed to shoot
if (!isAlive() || isPaused() ||
((location == InBuilding) && !isPhantomZoned())) {
return false;
}

Let's do a quick edit so that it now looks like this:

// make sure we're allowed to shoot
if (!isAlive() || isPaused()) {
return false;
}


Note that the above edit will only allow you to be able to shoot while sealed in a building.

Save your new file, and you're done. In case you haven't already checked, take a look at the previous HOWTO posts for more tips. When you're finished, compile your client and...

Have fun!

Realted posts:
TIP: The Infamous BZFlag F5 Cheat
HOWTO: Flying Without Wings & Extended Jumping

Saturday, June 09, 2007

HOWTO: Seeing Cloaked Tanks

Have you enjoyed being able to see those pesky Stealth tanks on your radar? Be sure to read the previous HOWTO posts in case you've missed them :)

Anyway, here's a simple trick that will allow you to see cloaked tanks. As a note, this will not affect lasers; lasers will still pass through cloaked tanks. You will be able to see them, though. Think of it as training wheels until you get better at using your radar :)

I assume that you have already downloaded the source and have extracted the source from the tarball. Enter the extracted directory and go to the /src/bzflag/ directory and open Player.cxx with your favorite text editor. Use the search feature of your editor (e.g., ctrl+f for some text editors) and search for "cloak". The first thing you will find is:

// set the alpha target
if (effectFlag == Flags::Cloaking) {
alphaTarget = 0.0f;
} else {
alphaTarget = 1.0f;
}


Notice the line alphaTarget = 0.0f; Let's change 0.0f to 0.5f so that the line reads like this:

alphaTarget = 0.5f;

The effect will be that it is slightly translucent but not as much as zoned tanks (i.e., tanks with the Phantom Zone flag). Alternatively, you can use 1.0f instead of 0.5f.

Moving on. Search for "cloak" again. You now come to a section like this:

}

// is this tank fully cloaked?
const bool cloaked = (flagType == Flags::Cloaking) &&amp; (color[3] == 0.0f);

if (cloaked && !seerView) {
return; // don't draw anything
}

// setup the visibility properties
if (inCockpit && !showTreads) {
tankNode->setOnlyShadows(true);
} else {
tankNode->setOnlyShadows(false);
}

Let's remove the check for seeing if a tank is cloaked and not drawing anything if it is. The newly edited section should like this:

}

// setup the visibility properties
if (inCockpit && !showTreads) {
tankNode->setOnlyShadows(true);
} else {
tankNode->setOnlyShadows(false);
}


Save the file, compile your client, and . . .

Have fun!

Related post:
HOWTO: Seeing STEALTH Tanks on Radar