Guys:
Has anyone taken the time to edit the mohstats PHP files for Spearhead? Just wondering if anyone already has... before I go ahead and do it myself...
Thanks!
Ziskey
Drebbin
03-05-2003, 05:10 PM
I was wondering the same. You mentioned that you were actually able to get Spearhead to output kills and deaths, etc. I cant even get it to do that, my log basically has no useful information for mohstats to use. What is your secret? What do you have the logfile and developer cvar's set to? Let me know if you would.
Thanks
Felix
03-06-2003, 04:32 PM
I have done it for aestats, the same approach might work for other statsprograms aswell, see http://www.mohadmin.com/nuke/modules.php?name=Forums&file=viewtopic&t=1362 (or spearhead stats? thread)
/J
Drebbin
03-10-2003, 04:11 PM
Ok HOW did you get that to work? :)
Could you pm me a copy of your log file, and your shortcut, etc. I am pulling my hair out tryin to get these to work.
Lestat
03-11-2003, 08:37 PM
Here is my config.php file for mohstats I had to modify a few thnis in it. Being EA took out all the sayings out in Spearhead. They had kept it at a short and sweet. Figures EA releasing half a$$ work once again. If they decide to throw these features back I kept it in the config. But this is what I had to modify. Just match it with yours and you should be on a roll...
<?php
/* mohstats configuration */
/* output directory */
$dir = "output";
/* cache file */
$cache = "cache";
/* url to base directory of website */
$html_base = "http://198.31.220.59/Fraghqstats/";
/* title */
$html_title = "MoH: Spearhead Stats For FragHQ.com Server updated every 24 hours";
/* path to directory containing templates */
$include = "include";
/* Extension of generated files */
$extension = "html";
/* Make alpha.html containing list of all players seen if set.
Warning: this will be huge if your server is somewhat active */
$generate_alpha = false;
$weapons = array
(
/* Weapon Description Skill Modifier */
'club' => array('Pistol Whip', 0.4),
'pistol' => array('Pistol', 0.2),
'rifle' => array('Rifle', 0.3),
'sniper' => array('Sniper Rifle', 0.3),
'smg' => array('Sub-Machine Gun', 0.2),
'mg' => array('Machine Gun', 0.2),
'rocket' => array('Rocket', 0.1),
'shotgun' => array('Shotgun', 0.1),
'grenade' => array('Grenade', 0.1),
'gravity' => array('Gravity', 0.1),
'mine' => array('Landmine', 0.1),
'kill' => array('/kill', 0.0)
);
$maps = array
(
/* Map Description */
'dm/mohdm1' => 'Southern France',
'dm/mohdm2' => 'Destroyed Village',
'dm/mohdm3' => 'Remagen',
'dm/mohdm4' => 'The Crossroads',
'dm/mohdm5' => 'Snowy Park',
'dm/mohdm6' => 'Stalingrad',
'dm/mohdm7' => 'Algiers',
'obj/obj_team1' => 'The Hunt',
'obj/obj_team2' => 'V2 Rocket Facility',
'obj/obj_team3' => 'Omaha Beach',
'obj/obj_team4' => 'Bridge',
'unknown' => 'Unknown'
);
$weapon_awards = array
(
/* Weapon Kill Award, Death Award, Suicide Award */
'club' => array('Seal Basher', '', ''),
'pistol' => array('', '', ''),
'rifle' => array('', '', ''),
'sniper' => array('', 'Target Practice', ''),
'smg' => array('', '', ''),
'mg' => array('', '', ''),
'rocket' => array('Newbie', '', ''),
'shotgun' => array('Redneck Award', '', ''),
'grenade' => array('', '', ''),
'gravity' => array('', '', 'Lemming Award'),
'kill' => array('', '', ''),
'mine' => array('', '', 'Minesweeper')
);
$location_awards = array
(
/* Location Kill Award, Death Award */
'head' => array('Aimbot Award', ''),
'left foot' => array('', ''),
'left hand' => array('', ''),
'lower torso' => array('', ''),
'lower left arm' => array('', ''),
'lower left leg' => array('', ''),
'lower right arm' => array('', ''),
'lower right leg' => array('', ''),
'middle torso' => array('', ''),
'neck' => array('', 'Giraffe Award'),
'pelvis' => array('Elvis Award', ''),
'right foot' => array('', ''),
'right hand' => array('Kitten Savior', ''),
'unknown' => array('', ''),
'upper torso' => array('', ''),
'upper left arm' => array('', ''),
'upper left leg' => array('', ''),
'upper right arm' => array('', ''),
'upper right leg' => array('', '')
);
$aliases = array
(
'--alias--' => '--name--'
);
/* These are used to parse the logfile. Don't change them unless
the logfile format changes (or you edit localization.txt to
change your kill messages. */
$regexp = array
(
"/^(.*) was clubbed by (.*)$/" => 'club',
"/^(.*) was bashed by (.*)$/" => 'club',
"/^(.*) was gunned down by (.*) in the ([\w ]+)$/" => 'pistol',
"/^(.*) was gunned down by (.*)$/" => 'pistol',
"/^(.*) was sniped by (.*) in the ([\w ]+)$/" => 'sniper',
"/^(.*) was sniped by (.*)$/" => 'sniper',
"/^(.*) was perforated by (.*)'s SMG in the ([\w ]+)$/" => 'smg',
"/^(.*) was perforated by (.*)'s SMG$/" => 'smg',
"/^(.*) was machine-gunned by (.*) in the ([\w ]+)$/" => 'mg',
"/^(.*) was machine-gunned by (.*)$/" => 'mg',
"/^(.*) took (.*)'s rocket in the face$/" => 'rocket',
"/^(.*) took (.*)'s rocket right in the kisser$/" => 'rocket',
"/^(.*) was blown away by (.*)$/" => 'rocket',
"/^((.*)) blew himself up$/" => 'rocket',
"/^(.*) was hunted down by (.*)$/" => 'shotgun',
"/^(.*) was pumped full of buckshot by (.*)$/" => 'shotgun',
"/^(.*) was rifled by (.*) in the ([\w ]+)$/" => 'rifle',
"/^(.*) is picking (.*)'s shrapnel out of his teeth$/" => 'grenade',
"/^((.*)) tripped on his own grenade$/" => 'grenade',
"/^((.*)) played catch with himself$/" => 'grenade',
"/^((.*)) cratered$/" => 'gravity',
"/^((.*)) took himself out of commision$/" => 'kill',
"/^((.*)) blew up$/" => 'mine'
);
?>
Drebbin
03-11-2003, 09:31 PM
Actually I meant could you send me your server.cfg file, I cannot get mine to output the correct content to the log file. If you could do that, it would be much appreciated.
Lestat
03-11-2003, 10:42 PM
Put this in server.cfg
//Stats
seta logfile 3
seta g_log "qconsole.log"
seta g_logsync 1
seta sv_chatter 1
put this on the command line for executing the server
+set developer 2 +set dedicated 2 +set sv_chatter 1 +set chat 1 +set logfile 3 +exec server.cfg
Drebbin
03-12-2003, 08:57 AM
Already have everything you mentioned. No matter what I do, it doesnt output correctly to the log, when I run mohstats on the log file, everything comes out blank.
Drebbin
03-12-2003, 02:25 PM
Sure think so, it is like the log file doesnt contain any of the information that mohstats is looking for. Even if I skim through the log file, you dont see any of the kill messages like "Bill was bashed by Jim". Just shows a bunch of useless junk. I am cornfused. :)
Lestat
03-12-2003, 04:12 PM
This will log all that stuff... Make sure your using the right cfg file that you are placing this info in.
//Stats
seta logfile 3
seta g_log "qconsole.log"
seta g_logsync 1
seta sv_chatter 1
put this on the command line for executing the server
+set developer 2 +set dedicated 2 +set sv_chatter 1 +set chat 1 +set logfile 3 +exec server.cfg
Drebbin
03-12-2003, 07:33 PM
Almost seems like repeating yourself when adding some of those to the cfg file, and to the shortcut, but hey it worked beautifully. I really apprecaite all the info, as do the people who play on my server :)
Thanks again...
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.