Insurgency

Insurgency

View Stats:
Falzar Jul 27, 2014 @ 11:14pm
For Admins planning to run SM + HLStatsX/Psychostats/Other Stat Systems
Hi all, I made a SourceMod plugin that fixes most of Insurgency 2014's horrible logging. Previously weapon names were logged as "player<#>", but now they are correctly named in the HL Log Standard. Stuff like headshots, shots-per-hitarea are also correctly logged and outputted. An example can be found here on my server: Brutus.SG Psychostats[brutusstats.no-ip.org]

I posted here because AlliedModders' New Plugins section is constantly flooded, so as to increase visibility, you can find my plugin here: AlliedModders[forums.alliedmods.net]

Good luck with your servers, and please raise any issues to me either here, send me a PM or on the AlliedModders page!

-Falzar
Last edited by Falzar; Jul 27, 2014 @ 11:15pm
< >
Showing 61-75 of 135 comments
Slim Abodibbah Jan 14, 2015 @ 12:09pm 
Aha. So now I use the plugins provided by your github. Only thing I need to do is to get the deamon started. But I need no configure to the database.cfg in sourcemod or anything?
And while you are here, do you know how I can change weapons for the bots on Co-Op? I searched everywhere..
jballou Jan 15, 2015 @ 12:07pm 
Sourcemod doesn't talk to the DB directly, so nope. And to change bot weapons wou need to create a custom theater, used to be guides on the Play Insurgency forums, but they've been down for like 2 months now.....
Falzar Jan 15, 2015 @ 5:10pm 
To set up the database, here's what we did over at Brutus.SG Modded Servers
1) Get a copy of hlstatsxce, find the install.sql within the archive

2) Do a Find & Replace, replace the CHARSET variable to utf8mb4 for ALL table creation queries

3) Using MySQL Workbench or whichever tool of your preference, make a new schema (whichever name you want). For Table Collation, select utf8mb4_general_ci.
Why all the utf8? Because players with funny symbols in their names ♥♥♥♥ up the data entry and causes the db to desync from an improper charset :D

4)Open up that schema and then File > Open SQL Script. Open install.sql, let it populate your db.

5) If all goes well, next, find the folder named scripts within the hlxce archive. This will be where the daemon, hlstats.pl is executed.

6) Make sure to edit the hlstats.conf to set up the ports/access properly. If you dont see this file, you might have to run hlstats.pl once for it to autocreate. The most important bit here is the UDP socket settings.

7) Automation!

=========================================================
IMPORTANT NOTE:
Enable cvar "logaddress ip port" in your server. This is required as the log data is sent to the daemon server. Failure to do so = no data logging :D
For each server instance, you need its own daemon as well, so multiple batch files scenario kinda thing.
=========================================================

You could use ActiveState Perl (32bit) if you're planning to host on windows. Then, make a batch script e.g

@echo off SET SRVNAME=ins-ds SET SRVPORT=27015 SET DBNAME=hlstatsx SET DBIPPORT=127.0.0.1:3306 SET DBPWD= SET SRVIP=192.168.1.180 SET SRVDAEMONPORT=27500 title HLStatsX Daemon - %SRVNAME% (%SRVIP%:%SRVPORT%) Listening on: %SRVIP%:%SRVDAEMONPORT% C:\Perl\bin\perl.exe C:\Users\XXX\Desktop\ins-HLStatsX\scripts\hlstats.pl -t -r --nostdin --dns-resolveip --db-host %DBIPPORT% --db-name %DBNAME% --db-password %DBPWD% --ip %SRVIP% --port %SRVDAEMONPORT% pause

Once this is done, this should only need to be run once per startup (unless it crashes which so far I haven't noticed any). If your server/pc is always on then just once is enough :). You also need to daemonize hlstats-awards.pl through task scheduler for the awards and stuff to update.
Falzar Jan 15, 2015 @ 5:11pm 
Do note that this is off the top of my head, so there might be mistakes there. Otherwise this is the rough process which I did,
Slim Abodibbah Jan 16, 2015 @ 4:02am 
Originally posted by Falzar (SCS LO):
Do note that this is off the top of my head, so there might be mistakes there. Otherwise this is the rough process which I did,

Thank you so much!
Now I just have to try to install the DBD-Mysql, I just can't get it to work. Tried cpan, ppm, strawberrypearl.. But I'm getting there.
Thanks for the help!
Falzar Jan 16, 2015 @ 4:55am 
What's the error you're getting? Do you have a screenshot?
Last edited by Falzar; Jan 16, 2015 @ 5:03am
Milamber Jan 16, 2015 @ 11:31am 
Also, when you're configuring insurgency in hlstatx admin menu, don't use Ignore Bots.. That will ignore all frags, kills etc in coop games. Took me a while to figure out due to laziness ;)
Last edited by Milamber; Jan 16, 2015 @ 3:02pm
Milamber Jan 16, 2015 @ 3:00pm 
One miscalculation I just noticed is that everything that can hit more than one person counts for accuracy. So a molotov can have 1000% accuracy or more.. ;)
Slim Abodibbah Jan 17, 2015 @ 3:22am 
http://gayunicorns.com/temp/dbd.png
Before I coudlnt even get that ♥♥♥♥ to start download, not I almost get it to work.
I get that error. I tried to install like Net::SSH and that worked fine.
I suck at programming so I just googling around..
Falzar Jan 17, 2015 @ 6:49am 
What about using ppm, could you post the error for that too?
Slim Abodibbah Jan 17, 2015 @ 7:06am 
What the deuce. Not it worked. I tried it like yesterday and nothing.. Now it worked. ♥♥♥♥♥♥♥♥♥. Thank's. I love you..
Falzar Jan 17, 2015 @ 7:18am 
lul no problem
also @jballou great work on taking up and improving the logger and all, couldn't have envisioned this to be such a big project
Slim Abodibbah Jan 17, 2015 @ 8:21am 
Now I made a batch file to start the deamon, everything seems to work. I get the same info in the deamon console as in the Insurgency console... But nothing shows up in my database. Im getting there!
Slim Abodibbah Jan 17, 2015 @ 10:20am 
Ok. It seems I need something more to deal with. I think i missed something because now I get the errorr; The getpwuid function is unimplemented at hlstats.pl line 1836 when I try to start the deamon or use 'perl hlstats.pl'
Wtf is going on..

Slim Abodibbah Jan 17, 2015 @ 10:45am 
Ok small update. I changed CpanelHack 1 to 0, then it worked.
Still nothing in database..
I have logaddress_add 192.168.1.100:27500 in server.cfg
< >
Showing 61-75 of 135 comments
Per page: 1530 50

Date Posted: Jul 27, 2014 @ 11:14pm
Posts: 135