I've posted around about this thing but have been dragging my heels in releasing it. If you've ever been on VSP recently you've noticed a couple funny reload activated rages. Here's the platform for them.
DRAIN OVER TIME PLATFORM
What is it?
It's a platform for rages that, instead of consuming all of a person's rage, consumes only part of a person's rage. This consumption can be done at the beginning of the rage, at the end of the rage, and even throughout the duration of the rage in roughly 100ms intervals.
How does it work?
It just runs a 100ms looping timer in the background if the user has the dot_base ability. It uses global forwards (like FF2) to inform DOT subplugins that the rage has been activated, deactivated, ticking, the user dies (important in a duo boss), etc.
How are these rages used?
By default, DOT rages use the RELOAD key, but ATTACK3(aka Special) is an option. Only recommended for those rare cases where RELOAD causes problems. (like it does with my "teleport sniper" example below) A lot of players have no idea ATTACK3 even exists...
Some examples of rages/bosses using DOT?
Beam rage (not public at this time)
Cheese Sandwich uses a "manic mode" rage which is just a combined version of dot_model_swap, dot_weapon_swap, and dot_sentry_knockback_immunity rages in the public version. That's old footage, so it's missing the RELOAD overlay.
Do I need to mess with FF2 source files?
Not at all. The platform itself is a subplugin of FF2, and I use reflection to allow subplugins to communicate with drain_over_time.ff2. (since natives are not an option -- load order)
Can DOTs and standard rages coexist in one file?
Yes.
What rages are included?
What's there is pretty simple, but it's definitely usable with a live hale. It's mainly intended for demonstration purposes...some rages like the looping sound are just stupid.
See the sample .cfg files for documentation on the individual rages...below are just some summaries.
dot_weapon_swap - Swap out one weapon for another for the duration of the DOT
dot_model_swap - Swap out one model for another for the duration of the DOT. Compatibility is a concern you need to manage.
dot_sentry_knockback_immunity - Makes player immune to sentry knockback while the DOT is active.
dot_looping_sound - Plays a sound to all in a fixed interval. (lol)
dot_teleport - A more or less direct port of the otokiru War3 teleport rage, with the same bugs and exploits which that one had.
I'm hoping this platform will catch on and there'll be more variety in rages and how they're executed. Anyway, here's what each file does and how to install them:
dots_materials_dir.zip - Relative to your base dir for TF2 assets, these materials (location hardcoded) are used for an animating overlay that informs the user their DOT rage is usable. I used server-side animation to get around the issue where overlays are lost when the boss is set on fire.
dots_sourcemod_dir_v1_0_0.zip - Unzip these inside your sourcemod directory. It's just binaries, source, includes.
engivag.cfg and
teleport_sniper.cfg - Just a couple tweaked old standards who have been given DOT abilities. Engivag has more typical DOT abilities, while Sniper has a ported version of Otokiru's War3 teleport which is a one-use ability. Though there are some useful things in public_dots.sp, with some of the rages it's only meant to demonstrate functionality.
dot_template.sp - A minimal DOT source file that should show you where to put stuff.
Credit for some code bits go to the FF2 team and Friagram for a couple of pointers re: cleanup.