Chat, GUID, Stats and Mapstats Logger[3.0.2.2] 01.02.
COMPATIBLE TO BFBC2 Vietnam now
Pls check if you table contains a unique key contain the columns SoldierName and GUID. after convert from 2.x to 3.x
if not please do the steps shown in the Troubleshooting part --> "if you got duplicates" to keepthe data integrity
If you not sure feel free to ask me.
New SQL Migration Script inside of 3.0.0.7
Tablehotfix in Downloadselection
The Plugin(Version 3.0.2.2) also now available by the Packet management of PRoCon
Requirements:
Access to a MySQL database that accepts remote connections is required so you need to create a user and database if not exists.
It reqiues the use of a MySQL database with INNODB engine that allows remote connections.(MYSQL Version 5.1.x is required!!!)
Also the ODBC 5.1 Driver (the latest is 5.1.7(24.08.2010)) is needed and can be found here MySQL :: Download Connector/ODBC .
READ THE CHANGELOG
Installation:
Extract CChatGUIDStatsLogger.cs into plugin directory.
Set DB Server Settings and the Plugin Settings
Add the machine running the plugin to the remote mysql access host list.
Will throw a permissions error if not done
Enable outgoing ODBC Connections, located in Tools -> Options -> Plugins
Will throw a permissions error if not done
Enter the correct details for your database connection in the plugin settings tab. You dont need to create tables, the plugin will do that.
The Standard MySQL Port is 3306.
Versions:
1.52
2.0.6.4
3.0.2.2
Changelog:
3.0.2.2
Fixed Bug that a player is not in the Database because he got kicked be the the cheaterprotection
Improved BFBCS Statsfetch by packing multiply players in one query to bfbcs. The Plugin waits now until the minimum playercount is reached
This optimization can be disabled by setting the the Request Packrate to 0.
Recommend value is 2-3 or higher.
3.0.2.1
Small Errorfix thx to [EoT]Honk for report
3.0.2.0
Now able to pull Stats from BFBCS and able to warn/kick/ban Player with high kdr and high Score per Minute (Globalstats)
The Stats of BFBCS will be stored in the DB to reduce stress on BFBCS api.
The Updateinterval (in hours) for the BFBCS Stats is variable and configurable (pls dont choose to low values)
The plugin fetches up to 32 Players in one query from BFBCS and is able to repair JSON Objects containing Error messages from BFBCS API.
The plugin tries to get the stats onetime only at the moment.
Some Improvements in Code
Cheater and Statspadder Protection based on Globalstats of BFBCS with configurable Limits and minimum values.
Chatlog can be turned off now
Option for Update empty PB-Guids(not recommend)
Added Servertimeoffset feature
3.0.1.2 -->3.0.1.3
Added missing Weapons thx to Sir_Duck, terwax for the report
3.0.1.1 -->3.0.1.2
Added missing Weapons thx to Hellokitty for the report
Fixed Typo thx to HunterBfV
3.0.1.0 -->3.0.1.1
New Shared Mode -> BC2 and Vietnam in the same tables.
Several Bugfixes
Added Option to disable Weaponstatslogging on Request
3.0.0.7 -->3.0.1.0
Automatic detection of the Gamemod(BC2 / Vietnam)
Added Support for BFBC2 Vietnam just select the right Gamemod in Pluginsettings or let it set by the Plugin automatically
Tables of Vietnam are called (tbl_playerstats_bfv, tbl_weaponstats_bfv, tbl_chatlog_bfv, tbl_dogtags_bfv, tbl_mapstats_bfv) + your suffix
BC2 and Vietnam share the same tbl_playerdata + you Suffix
You will need a new Version of Webstats for Vietnam which i will provide later
Serveral small fixes and improvements
3.0.0.7
Bugfixes
New feature the plugin does make a selfcheck of the weaponstable add missingweapons to the tbl_weaponstats by itself.
Troubleshooting
Specact weapons missing
Pls apply this to you table:
For 2.x
Code:
ALTER TABLE `tbl_playerstats` ENGINE = MyISAM ;
ALTER TABLE `tbl_playerstats`
ADD COLUMN `M16K_kills` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `M16_deaths` ,
ADD COLUMN `M16K_hs` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `M16K_kills` ,
ADD COLUMN `M16K_deaths` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `M16K_hs` ,
ADD COLUMN `UMPK_kills` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `UMP_deaths` ,
ADD COLUMN `UMPK_hs` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `UMPK_kills` ,
ADD COLUMN `UMPK_deaths` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `UMPK_hs` ,
ADD COLUMN `MG3K_kills` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `MG3_deaths` ,
ADD COLUMN `MG3K_hs` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `MG3K_kills` ,
ADD COLUMN `MG3K_deaths` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `MG3K_hs` ,
ADD COLUMN `M95K_kills` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `M95_deaths` ,
ADD COLUMN `M95K_hs` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `M95K_kills` ,
ADD COLUMN `M95K_deaths` INT(10) UNSIGNED NOT NULL DEFAULT 0 AFTER `M95K_hs` ,
ADD COLUMN `MP7_kills` INT(10) UNSIGNED NOT NULL DEFAULT 0 ,
ADD COLUMN `MP7_hs` INT(10) UNSIGNED NOT NULL DEFAULT 0 ,
ADD COLUMN `MP7_deaths` INT(10) UNSIGNED NOT NULL DEFAULT 0 ,
ADD COLUMN `QLZ8_kills` INT(10) UNSIGNED NOT NULL DEFAULT 0 ,
ADD COLUMN `QLZ8_hs` INT(10) UNSIGNED NOT NULL DEFAULT 0 ,
ADD COLUMN `QLZ8_deaths` INT(10) UNSIGNED NOT NULL DEFAULT 0;
ALTER TABLE `tbl_playerstats` ENGINE = InnoDB ;
If you get an error that the the Mapname doesnt fit into the column:
Code:
ALTER TABLE `sql_db_name`.`tbl_mapstats` CHANGE COLUMN `MapName` `MapName` VARCHAR(32) NULL DEFAULT NULL ;
If you got strange Scores:
Code:
ALTER TABLE tbl_playerstats ENGINE = MyISAM ;
ALTER TABLE tbl_playerstats CHANGE COLUMN `playerScore` `playerScore` INT(10) NOT NULL DEFAULT '0' ;
ALTER TABLE tbl_playerstats ENGINE = InnoDB ;
If you got Duplicates:
To repair the database delete the rows where the playerID = StatsID = WeaponstatsID and in tbl_dogtags KillerID and VictimID of all duplicates then create the new unique index
A query to find duplicates
takes some time coz its a hard query)
Code:
SELECT * FROM tbl_playerdata
WHERE (SoldierName,Guid) IN (SELECT SoldierName,Guid
FROM tbl_playerdata
GROUP BY SoldierName,Guid
HAVING COUNT(*)>1);
For delete a index:
Code:
DROP INDEX indexname ON tbl_playerdata;
to create the correct index:
Code:
CREATE UNIQUE KEY SoldierNameGuid ON tbl_playerdata (SoldierName, GUID);
General Tips:
Use this SQL Query to get a full Dataset for a Player:
Code:
SELECT a.* ,b.*, c.*
FROM tbl_playerdata a
INNER JOIN tbl_playerstats b ON a.PlayerID = b.StatsID
INNER JOIN tbl_weaponstats c ON a.PlayerID = c.WeaponstatsID
WHERE a.SoldierName LIKE "%XpKiller%";
Download