ROACHQUAKE  Version 1.2

A mod for Quake 2 that makes the BFG turn your opponents into roaches!

By David M. Pochron (david@enigmaticsoftware.com)

DOWNLOAD (version 1.2 released 12/3/2006)

Players and server admins: Download the RoachQuake 1.2 .EXE, game DLL, and models here

To view the source or edit the roach model: Download the source code here

FEATURES
INSTALLATION

To install RoachQuake, unzip the entire contents of the .ZIP file into the Quake 2 folder. If you're using an unzip utility, make sure you have the creation of folders option enabled. If you want the details, The RoachQuake.exe file and roachquake folder should go in the Quake 2 folder, the gamex86.dll should go in the roachquake folder, and the "roach" player model folder should go in either baseq2\players or roachquake\players.

Option: The RoachQuake executable and game DLL is compatible with single-player Quake 2, so if you prefer you can backup and replace the quake2.exe and gamex86.dll with the versions included in RoachQuake. (Just rename the RoachQuake.exe to Quake2.exe.) If you do this also make sure the roach model is in baseq2\players instead of roachquake\players.

USAGE

To start the program, simply run it from the included shortcut icon. (Note that you will have to edit the shortcut to point to where you have Quake 2 installed.) Then connect to the IP address of the server you wish to play on. (Of course, it's better to use a game browser to do this, but you'll have to configure it to run the RoachQuake executable if you didn't replace the original quake2.exe with the RoachQuake.exe.)

If you don't want to use the shortcut, the command line parameters (if you installed the game DLL into the roachquake folder it came in) to enable the mod are:

RoachQuake.exe +set game roachquake

To start a server, go to the multiplayer menu and select the start server option. You will need to configure the deathmatch flags in order to take advantage of the new features. (The settings default to regular Quake 2 mode since I wanted this to remain compatible with everything.) The options are fairly self-explanatory, but just in case:

Note: If roach mode, BFG blast effect, and hurt user are enabled the standard Q2 rule of the BFG blast effect where the victim of the BFG projectile must see both the projectile and the person who fired it is not used. Instead, the victim only has to see the projectile to get turned into a roach (the second condition is disabled). This is because if the victim had to see the person doing the shooting the person doing the shooting would never get any frags because they would also have to get turned into a roach in order to turn others into a roach.

Testing the setup

Want to quickly see if you have installed it correctly (by turning yourself into a roach)? Start it up with the included shortcut, go to the multiplayer menu and enable the "make BFG into Roach Gun" option and the "BFG can hurt user". Then select fact1 (Receiving Center) from the map list (or any map that has easy access to a BFG) pick it up and fire it at a nearby wall. When it hits the wall you should shrink down. If that works then you're probably good to go to start a server!

Some recommended settings

For standard RoachQuake, I recommend:

BFG roach mode turned on (duh :-)
faster BFG projectiles turned on
mass damage effect turned off
damage beams from BFG projectile turned off
splash damage turned on
hurt user turned on

For a weapon a bit more like the Quake 3 BFG:

BFG roach mode turned off
faster BFG projectiles turned on
mass damage effect turned off
damage beams from BFG projectile turned off
splash damage turned on
hurt user turned on (this actually doesn't matter)

Of course, it's also fun to turn all of the damage modes on in roach mode and create a room full of roaches, all scurrying to get away! :-)

If you want to run a dedicated server, just follow the same steps as you would to run a normal Q2 dedicated server and set the DM flags from the command line as needed.

Note: There is a server-only command (available to the person sitting at the console) that allows the server operator to turn any smart-mouthed player into a roach immediately. Just type "sv shrink <playernum | playername>" and repace the argument with a number from 1 to the max # of clients or use the player's actual name (case insensitive). Be careful how you use this since turning players into roaches randomly for no reason is likely to give your server a bad rep!

Note that because of the new BFG modes I have stopped the server from removing the BFG from maps when infinite ammo is selected in the deathmatch options. That feature is now obsolete since the BFG can be changed to a standard weapon if you want to use infinite ammo.

WIELDING A ROACHY WEAPON....

When you turn someone into a roach, you can either kill them the usual way (rockets, railgun, etc.) or you can step on them! (Much more fun and satisfying!) Just run over them and they'll turn to gibs. Note that you only get credited a frag when you kill a roach, and not for turning players into roaches. So if you create a roomful of roaches and someone else comes in, they can steal all of your frags if they stomp on the roaches first! You'll have to use strategy when you have created several victims in order to try and maximize your frags (unless your objective is revenge against a particular player for stepping on you earlier! :-)

Note that when players are turned into roaches you'll see a picture of a roach in the scoreboard instead of their usual player image. Check this from time to time of you are away from the action since you will want to make a beeline to where the roaches are in order to get some extra frags.

The invulnerability powerup is no protection against roachification! Use this to stymie someone who hogs this powerup. Note that although they can still be turned into a roach, they can't be squished until the protection wears off, so the powerup is still useful.

Use the roach gun to get back at players who go around with 200 armor and fully loaded power armor! Although those items still function when the player is turned into roach, the damage from being stepped on is so great that their armor won't really help them that much.

The quad damage has no effect on the roach gun. The gun works the same whether you are quadded up or not.

You cannot roachify a player who is already a roach, and doing so does not restart the timer to becoming normal again - the victim will turn back to normal after the count from the first roachification expires.

ON BEING A ROACH....

There are some things you can and can't do when you are turned into a roach:

When you get turned into a roach, you're only option is to escape! Run as fast as you can for protected areas where feet will have a hard time stepping on you and hope that your attacker loses you or goes after someone else. Deep water is particularly good for stomping avoidance. Also, since you are a lot smaller now you can get into places you normally couldn't before. This is a double-edged sword - watch out for grates that have wide gaps - you very well might fall through! If you get stuck in an area that you can't get out of, go to the console and type "kill" to suicide and lose a frag.

Also be aware that when your time as a roach runs out (randomized between 20 and 22 seconds, in tenths of a second) you need to be in an area that is large enough to contain your person in a crouched position. Otherwise you'll have a horrendous death and a frag will be subtracted from your score. When you unshrink and you are trapped in a tight space, you have 1.2 seconds to get into a better spot before you become a mangled mess on the floor.

LINUX

There isn't a Linux executable in this release because I haven't been had time to get Quake 2 to compile under Linux yet. If you're able to compile the Quake 2 source on Linux then chances are the mod will compile fine for you as well. If anyone has any tips for getting Quake 2 to compile under Linux feel free to e-mail me! :-)

FAQ

Q: How did this mod begin?
A: When the Q2 engine source was released, I wanted to do a version of the DN3D shrinker gun - and the BFG fit the bill perfectly. (They even look and shoot alike.) The first thing I did was code the player hitbox size change feature in the main engine, then I realized the engine had no way of scaling player models while the game is running! So I came up with the idea of turning players into roaches, and figured out how to make the server temporarily cause the other clients to see a roach model instead of the player's selected model. Then it was just a matter of coding all the of rules and options in the game DLL and engine menu. Notice in the source code I continued to use "shrink" in the comments, even after I switched to the roach idea. That's because it's a lot easier to type "shrink" than "roachify". :-)

Q: I can't find any servers! How can I test this thing?
A: You'll have to set it up on a LAN. If you just want to see what the roach model looks like, scroll to it in the player skin setup menu. If you want to see what it's like to be a roach, go to the console and type "sv shrink 1" (without the quotes). This will immediately turn you into a roach and you can try running around until it wears off.

Q: Can I replace the Quake2.exe with the RoachQuake .exe?
A: Yes! The RoachQuake.exe can be used in lieu of the regular Quake2.exe. It is fully compatible with single-player mode and should work with all mods. It also has all of the features and bugfixes present in my Quake 2 Compilation Project.

Q: Why is it just as hard to kill a roach with the weapons as it is when they are a normal human player? Shouldn't they be like super-weak or something?
A: The point of the mod is to STEP on them, not shoot them!

Q: How come the roach gun doesn't work in single player mode?
A: The mod is only for multiplayer mode. However, setting the other BFG DM options (speed, mass damage, etc.) will affect the BFG in single player mode.

Q: I connected to a RoachQuake server and when the players get turned into roaches, all I see is the default Grunt model instead of roaches. What's wrong?
A: You need to download the mod and install the model and skins in the proper folder. Also the server may not be running from the roachquake game folder. If you want to make sure the roach always displays, put the roach model and skins in baseq2\players\roach.

Q: Can't I just turn downloads on and let the server send me the roach model files?
A: Yes, this can work, but it's not easy because you have to connect when someone is turned into a roach. Plus you will still need the executable to get smooth motion as a roach. It's easier to just download the mod.

Q: I connected to a RoachQuake server and when I get turned into a roach, my movement is strange.
A: You need to install the RoachQuake executable. It's also possible your game browser program is probably still running the original Quake2.exe instead of the RoachQuake.exe. If you can't get your game browser to run RoachQuake.exe, back up the Quake2.exe and rename RoachQuake.exe to Quake2.exe. (RoachQuake is Q2 compatible.)

Q: Hey! You said jumping was disabled but I'm able to jump as a roach!
A: Either the server is running a customized version of my mod with the jumping re-enabled, or you aren't using the RoachQuake client. If it's the latter, then it doesn't matter how much jumping you do - even if you see yourself jumping the server doesn't see you jumping and you'll just make it all the easier for others to step on you.

Q: I want to run a server and only use the modified BFG without the roach gun. Do the clients that connect to my server need to download and install RoachQuake?
A: No! The other mods to the BFG don't require clients to download anything. You can even run the game from the standard baseq2 folder instead of the roachquake game folder.

Q: Why doesn't the roach animate?
A: It took me two weeks just to make that roach model, and my attempts at getting it to animate didn't work out. (I need better tools than Q2 modeller.) If you feel up to it, feel free to animate this roach model and send it to me! I'll include it in an update and give you the credit. I have included a 3D Studio file and the fully-boned Animation Master source model in the source code .ZIP file.

Q: Why is the roach model black?
A: See above. I couldn't figure out how to get Q2 modeller to edit the skin.

Q: I'm a server operator and I want to modify the source so the player hitbox is even smaller when the player is a roach or even change their speed while shrunken. Can I do this?
A: That's not a good idea. The smaller the hitbox, the more problems you'll encounter where the player gets stuck on sloped floors on maps. 22 units wide and across is the minimum safe value, and even that causes problems in maps like strike. (See below) Also, changing the adjustment I made to the player's speed when they are a roach needs to be the same on both client and server if network prediction is to work smoothly, so you'll have to get everyone to download your own customized client.

Q: I'm getting hung up on some invisible brush or something in the map "strike" on the sloped path near the middle of the map where the rocket launcher is when I'm a roach!
A: Yeah, I don't know what's causing that. The smaller hitbox causes problems with some maps. Just avoid the turn when you're a roach. (In fact, dive into the water since you usually can't get stepped on in water.)

Q: I'm hiding in a corner and I return to normal but the server kills me. What happened?
A: Stay out of tight corners when you think you're about to return to normal. The mod will try to shift you over if you don't fit, but it can only do so much.

Q: I'm running a server and the players get turned into roaches but other players have to jump up high onto them in order to squash them. What's wrong?
A: You have the game DLL installed, but forgot to install the RoachQuake executable.

Q: I want to add the roach gun to my own mod. May I do this?
A: Yes! Feel free to take whatever source code from my mod you need. Note however that since my mod uses the GPL'ed version of the Q2 game DLL source, you too will have to release your mod's source code under the GPL since that license supercedes the original game DLL-source-only licence. I don't know whether it is legal to use my RoachQuake executable for the hitbox change feature and reverse engineer into your non-GPL DLL the additions I made to my game DLL in order to get around the GPL. (I'm not a lawyer.) Personally, I think it's much better to just release your source and improve the Q2 community as a whole anyway.

Q: Can I modify your source and put up my own customized RoachQuake server?
A: Feel free to do so! Again, just pay attention to the GPL, however.

Q: Where are the Visual Studio 6 workspace and project files?
A: I recently upgraded to VC++ 7 .NET, so there aren't any. If you need to compile with VC++ 6, just duplicate the original id Q2 source release folder and overwrite the source files there with the Roachquake source files. I believe the project settings should be the same. You can also use the batch files I created in a development environment command line window and compile it from there.