Since TF2 does not log healing done by medics and engies (with their dispenser) and the teleports, I wrote some monthes ago this plugin who writes this data at player disconnection (and there's a disconnect event at each map change) so no stat can be lost.
It's written as "triggers" events because I wrote this plugin to parse that data with
Psychostats to give skill bonus to medics and engies.
Examples:
Code:
Healing:
L 01/15/2009 - 23:44:06: "player1<109><STEAM_0:0:xxxx><Blue>" triggered "healed" (heal "17050")
L 01/15/2009 - 23:44:06: "player2<95><STEAM_0:0:xxxxx><Red>" triggered "healed" (heal "0")
L 01/15/2009 - 23:44:08: "player3<105><STEAM_0:0:xxxx><Red>" triggered "healed" (heal "0")
or for Teleports:
L 01/15/2009 - 22:35:09: "player1<80><STEAM_0:0:xxxxxx><Blue>" triggered "teleported" (teleport "1")
L 01/15/2009 - 22:35:09: "player2<87><STEAM_0:0:xxxxxx><Red>" triggered "teleported" (teleport "34")
L 01/15/2009 - 22:35:09: "player3<58><STEAM_0:0:xxxxxx><Blue>" triggered "teleported" (teleport "0")
Guess I could skip the log line when teleport or healing is 0.
sdktools needed.
For Psychostats: perhaps you can do cleaner, but here is how I did. Edit the file lib/Game/halflife/
tf2.pm
Find this line in the
sub event_plrtrigger:
Code:
} elsif ($trigger eq 'revenge') {
and insert above it:
Code:
} elsif ($trigger eq 'healed') {
my $props = $self->parseprops($propstr);
my $compteur ;
for ($compteur=0, $compteur <= int($props->{heal} / 150), $compteur++)
{
$self->plrbonus('healing', 'enactor', $p1) ;
}
} elsif ($trigger eq 'teleported') {
my $props = $self->parseprops($propstr);
my $compteur ;
for ($compteur=0, $compteur <= int($props->{teleport} / 5), $compteur++)
{
$self->plrbonus('teleport', 'enactor', $p1) ;
}
With this example code, a medic or an engy will get 1 skill point per 150 hp healing, and engies will get 1 skill point for 5 teleportations. Change the numbers in bold to edit the ratio.
I was using 200hp for healing and 10 teleports but thought it was not enough, adjust as you wish.