Disclaimer
This is my first plugin, and the result of my first foray into Sourcepawn. Every part of it down to the format of this post was unabashedly plagiarized from another plugin/friendly user on #sourcemod. Specific code in the mod is directly copied from James Richardson's all4dead plugin and Voiderest's l4d damage plugin. I claim no rights to this code. Well, none that matters, anyway.
History
Once upon a time, when some of my friends were really bored with Left 4 Dead, they started racing eachother to the safehouse instead of properly playing the game and seeing how far they would get. The basic rule was that you couldn't help people behind you.
However, this rule was not strictly enforced, and there was no in-game motive to support this gameplay. It did add to the tension of the game and refocused the gameplay on getting from point A to point B, but it failed to instill fear into the players or keep them entertained or challenged for long.
Summary
The centerpiece of this mod is that the tank is invincible to all damage and spawns as soon as the survivors leave the safehouse. To prevent all games from ending right there, taking damage will drastically slow the tank, and if the tank is set on fire, his overall speed is further reduced for 30 seconds, or until he is reignited.
There are a few caveats to this gameplay mode.
First, this is only playable in
versus as of yet.
On No Mercy 4, since you can't leave your companions behind when on the elevator, the tank will stop when the button in the elevator is pushed, and will be able to move again once the doors close.
If the tank gets frustrated, he will die and another will spawn 3 seconds later. This is to prevent the tank from camping a chokepoint ahead of the survivors.
This mod disables itself in the finale since I haven't figured out how to implement it during that time. The tank dies as soon as the finale starts.
CVar(s):- Chase4Dead_max_speed - Normally 210, this determines how fast the tank moves when it's not being hurt.
- Chase4Dead_spawn_delay - Normally 10.0, this is a float amount of time in seconds that the tank is frozen after spawning.
More cvars will come as I develop the code.
Installation:- Copy Chase_4_Dead.smx to the Sourcemod plugins directory (default: <gamedir>/addons/sourcemod/plugins/)
- Change the map on your server (or restart it) to force the plugin to load.
- Thank Milo for letting me copy his post this much.
Usage:
This plugin is pretty much incompatible with anything that spawns a tank. Setting the tank on fire with an ignite command may also prevent it from working. Two tanks should never be in existence at the same time. The code will fix itself on every mapchange after a survivor leaves.
Notes:- This mod is still in its infancy, so there are definitely a lot of balance and fairness issues. Any suggestions are appreciated.
- Any suggestions on how to increase code stability or efficiency are also appreciated.
- Any suggestions on how much of an abomination and eyesore this mod is have already been acknowledged. I know I'm a terrible programmer, and my memory isn't so bad I don't need a reminder.
- This mod isn't meant to be played like regular Left 4 Dead, and the survivors are supposed to have a harder time. I'm aware of all the features this mod excludes that were intended by the original game makers. This game mode was inspired by a game idea that practically excluded the concept of teamwork, so I do expect to make sacrifices in the team play that the vanilla game holds sacred.
Possible features to be added in future versions:- Recalculation of the speed modifier so weapon damage decreases tank speed instead of health. This will make shotguns a viable choice.
- Controlling every aspect of this mod with cvars so hosts can customize it to their heart's content.
- Compatibility with campaign mode. This is mainly held off because of the tank's status when on fire. Both an increase of speed and auto-suicide take away the point of this mod.
- Buff the survivors in some way to prevent their situation from being hopeless.
- Implement this mod in some form in the finale.
- Make fixes for the elevator and other contingencies a lot less arbitrary.
- Make event hooks that prevent the mod from bugging up if the tank disconnects.
- Prevent the campaign tank from suiciding and assuming a limbo pose. Play this in campaign and go back and look for the tank if he stops chasing you to see what I mean.
- Probably reduce zombie mobs to make running through the level less frustrating.
Version history- Version 1.0
- Mod shown to public to gauge interest.
- Many aspects of the mod not tested extensively.
- I have no idea what I'm doing.
- Version 1.0.1
- Fixed a bug I added when I accidentally commented out crucial tank-tagging code
- Made a public plugin cvar
- Version 1.1
- Fixed tank spawns so the tank is frozen for (default: 10) seconds after spawning to allow survivors to pass him
- Put survivors in control of spawning the tank so he spawns near
- Made each tank spawn truly random
- Created an Autoexec config
- Version 1.1.1
- Fixed the tank spawner I broke with the last update
- Version 1.1.2
- Fixed the tank spawning with less than 6000 health
- Fixed the tank in finale being given the spawn delay
- Hopefully
- Version 1.1.3
- Added some campaign mode support
- Still working on the bug where if the tank kills you all you never see him again
Feedback
Please bear in mind that I am an amateur at this and I only posted this mod because I was afraid my inexperience would ruin the code to the point that it would be unimprovably muddled by my bad code discipline. Is it a bad idea? Yes, but that's never stopped me before. I just want to stay interested in this game. I don't really expect this to be approved, I just want to see if further improvements will be a waste of time or not. As far as I know, the whole thing works like it's supposed to. The main reason I'm posting this mod now is that I have had no success in convincing my friends to play this mod, because they have all flocked back to TF2, and so I need somebody to test out the experience with a full server, the way it's meant to be played.