|
-
Jul 31st, 2001, 02:42 PM
#1
Thread Starter
Addicted Member
Game Logs
Ok, i would like to make an application that will monitor my halflife / quake3 / unreal tournament games, and process the data, into a html file, for viewing on my clan's website.
Now, the problem isent the html stuff, thats easy, i need to know how to monitor for each kill in the game. Who killed who, with what weapon.
I know theirs other apps out their made for this pourpose already, but i want to make my own. I could get the source code for halflife's game logging system (HLStats) but its all done in C++,, and im still learning c++.
How would i monitor for these actions?
Thanks for any help at all. Im gettin a bit desprate on this one :P
-
Aug 1st, 2001, 08:35 PM
#2
Thread Starter
Addicted Member
They have a small scripting language (if you can even call it that)
Nothing complex though. Only allows internal commands to be executed, no file IO that i know of.
I just want to know how these other people do it. Its obious that it CAN be done, i just need to know how.
-
Aug 2nd, 2001, 02:05 AM
#3
Retired VBF Adm1nistrator
Well unless they're written a proxy which parses the stuff being send inbetween the server and client, I'd say they're using that scripting language.
Is there a reference for it anywhere ?
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 2nd, 2001, 03:37 AM
#4
Thread Starter
Addicted Member
hrmm, i take it you arnt a hardcore gamer? hehe
Each Death/Kill/Suicide is displayed in the 'console'. I just need to know how to pull it out from their.
-
Aug 2nd, 2001, 03:43 AM
#5
Retired VBF Adm1nistrator
I am aware of what the console is.
And I am also away that games like Quake allow you to write your own modified gamex86.dll file (in quake2 anyway ...)
As this is a proper C/C++ compiled file, you should be able to use it to write to files.
So you could write your own little function on the gamex86.dll file, and then use a bind or some other approach in the game to call the function when a kill occurs.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 2nd, 2001, 03:54 AM
#6
Retired VBF Adm1nistrator
Try messing around with the ClientObituary() function in p_client.c
Code:
void ClientObituary (edict_t *self, edict_t *inflictor, edict_t *attacker)
{
int mod;
char *message;
char *message2;
qboolean ff;
if (coop->value && attacker->client)
meansOfDeath |= MOD_FRIENDLY_FIRE;
if (deathmatch->value || coop->value)
{
ff = meansOfDeath & MOD_FRIENDLY_FIRE;
mod = meansOfDeath & ~MOD_FRIENDLY_FIRE;
message = NULL;
message2 = "";
switch (mod)
{
case MOD_SUICIDE:
message = "suicides";
break;
case MOD_FALLING:
message = "cratered";
break;
case MOD_CRUSH:
message = "was squished";
break;
case MOD_WATER:
message = "sank like a rock";
break;
case MOD_SLIME:
message = "melted";
break;
case MOD_LAVA:
message = "does a back flip into the lava";
break;
case MOD_EXPLOSIVE:
case MOD_BARREL:
message = "blew up";
break;
case MOD_EXIT:
message = "found a way out";
break;
case MOD_TARGET_LASER:
message = "saw the light";
break;
case MOD_TARGET_BLASTER:
message = "got blasted";
break;
case MOD_BOMB:
case MOD_SPLASH:
case MOD_TRIGGER_HURT:
message = "was in the wrong place";
break;
}
if (attacker == self)
{
switch (mod)
{
case MOD_HELD_GRENADE:
message = "tried to put the pin back in";
break;
case MOD_HG_SPLASH:
case MOD_G_SPLASH:
if (IsNeutral(self))
message = "tripped on its own grenade";
else if (IsFemale(self))
message = "tripped on her own grenade";
else
message = "tripped on his own grenade";
break;
case MOD_R_SPLASH:
if (IsNeutral(self))
message = "blew itself up";
else if (IsFemale(self))
message = "blew herself up";
else
message = "blew himself up";
break;
case MOD_BFG_BLAST:
message = "should have used a smaller gun";
break;
default:
if (IsNeutral(self))
message = "killed itself";
else if (IsFemale(self))
message = "killed herself";
else
message = "killed himself";
break;
}
}
if (message)
{
gi.bprintf (PRINT_MEDIUM, "%s %s.\n", self->client->pers.netname, message);
if (deathmatch->value)
self->client->resp.score--;
self->enemy = NULL;
return;
}
self->enemy = attacker;
if (attacker && attacker->client)
{
switch (mod)
{
case MOD_BLASTER:
message = "was blasted by";
break;
case MOD_SHOTGUN:
message = "was gunned down by";
break;
case MOD_SSHOTGUN:
message = "was blown away by";
message2 = "'s super shotgun";
break;
case MOD_MACHINEGUN:
message = "was machinegunned by";
break;
case MOD_CHAINGUN:
message = "was cut in half by";
message2 = "'s chaingun";
break;
case MOD_GRENADE:
message = "was popped by";
message2 = "'s grenade";
break;
case MOD_G_SPLASH:
message = "was shredded by";
message2 = "'s shrapnel";
break;
case MOD_ROCKET:
message = "ate";
message2 = "'s rocket";
break;
case MOD_R_SPLASH:
message = "almost dodged";
message2 = "'s rocket";
break;
case MOD_HYPERBLASTER:
message = "was melted by";
message2 = "'s hyperblaster";
break;
case MOD_RAILGUN:
message = "was railed by";
break;
case MOD_BFG_LASER:
message = "saw the pretty lights from";
message2 = "'s BFG";
break;
case MOD_BFG_BLAST:
message = "was disintegrated by";
message2 = "'s BFG blast";
break;
case MOD_BFG_EFFECT:
message = "couldn't hide from";
message2 = "'s BFG";
break;
case MOD_HANDGRENADE:
message = "caught";
message2 = "'s handgrenade";
break;
case MOD_HG_SPLASH:
message = "didn't see";
message2 = "'s handgrenade";
break;
case MOD_HELD_GRENADE:
message = "feels";
message2 = "'s pain";
break;
case MOD_TELEFRAG:
message = "tried to invade";
message2 = "'s personal space";
break;
}
if (message)
{
gi.bprintf (PRINT_MEDIUM,"%s %s %s%s\n", self->client->pers.netname, message, attacker->client->pers.netname, message2);
if (deathmatch->value)
{
if (ff)
attacker->client->resp.score--;
else
attacker->client->resp.score++;
}
return;
}
}
}
gi.bprintf (PRINT_MEDIUM,"%s died.\n", self->client->pers.netname);
if (deathmatch->value)
self->client->resp.score--;
}
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Aug 2nd, 2001, 03:56 AM
#7
Retired VBF Adm1nistrator
And this page here : http://www.inside3d.com/q2tut/q2tut-11.shtml
Shows that it is definitely possible to do File I/O from inside the gamex86.dll file.
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|