Jump to content
Sign in to follow this  
ImportBot

Chat, GUID, Stats and Mapstats Logger[3.0.2.2] 01.02.

Recommended Posts

Originally Posted by XpKiller*:

 

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 http://dev.mysql.com/downloads/connector/odbc/5.1.html .

 

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:sad: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

Webstats: viewtopic.php_f=18&t=911*

More Downloadlinks( SQL-Scripts):

viewtopic.php_f=18&t=694&p=11322#p11322*

 

Attached Files:


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Brazin*:

 

Thank you for releasing this plugin. I will try my best to provide useful feedback.


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

I'm sorry i packed the wrong file

 

Update in first Post:

 

Changelog:

Repack


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Zaeed*:

 

I would combine all your SQL queries into a single one to reduce server load.. You're potentially having hundreds of queries per level load..

 

Also if you build a player class, you can assign kills, deaths, tk's, score etc into a single object, rather than having to deal with multiple dictionaries, like what i've done with the chat, (see CLogger in your code), then you can have just the one update statement..


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

Thanks for request

 

i have written class for it now.

 

it will be in the next release.


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Brazin*:

 

When or how often does the plugin transfer stats to the MySQL database?

 

Stats don't seem to be tracking accurately from round to round, but this might be because I don't understand what triggers database updates.


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

The stats should be written to the database on every levelload

 

but i found the issue u mentioned will be fixed on next release


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Draco*:

 

I made a smal real basic script to show the stuff from the Logger on your website.

It is realy basic and dosent look good, maybe someone can use it to make a good looking one. :lol:

I ´m not a master in programing so use it @ your own risk and find a lot of bugs :roll: .


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

New version

 

Update in first post


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

*bump*

New version [1.0]

 

Update in first post

 

Pls report errors if you found any.

 

Report feature requests as well :ohmy:


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Kinsman*:

 

Is there a reason it created Chatlog using MyIsam and Player GUID using InnoDB? That one had me stumped for a bit as I usually don't even install InnoDB on my MySql servers. :mad:


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

The reason is simple:

 

1. InnoDB is the default DB-engine on windows systems(not really a reason)

 

2. InnoDB handles Updates on tables better than MyISAM but MyISAM is much faster on inserts. The table tbl_playerGUID has much more Updates than inserts. The table tbl_chatlogs has only inserts and no updates.

Also the caching System of InnoDB works very well so the Querys are fast too and i dont need fulltext search. in the stats table. :ohmy:

 

But at the moment you can switch the InnoDB to MyISAM because i dont use InnoDB functions yet. But may will in future(foreign key constaints, transactions)

in MySQL 5.5, InnoDB is the default storage engine


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Zaeed*:

 

MyIsam is actually the default used by MySQL, and the recommended choice..


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

*bump*

 

new Version

now using Proconplugininterface3


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by 28thCDM*:

 

Hi I have created the data base and added a user with all privilages and

i have installed the plugin on my procon server i have updated the plugin with my host and database information i have also set Enable outgoing ODBC Connections,

 

Also the ODBC 5.1 Driver dose that need to beinstalled to my MYSQL 5.1 database or to my Procon server ?

this is all a bit new to me so please bare with me many thanks in advance.


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

Hi

 

You need to install the ODBC Driver on your PRoCon Server only.

 

If you have more questions feel free to ask.

Xp


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Repoman1*:

 

Does your simple script keep the top players at the top or is it just placing them in the table as for when they join your server?


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

Does your simple script keep the top players at the top or is it just placing them in the table as for when they join your server?

Keep the Top-players on top of the Table would be extremely inefficient so, they are added to the table in order they joined the server for their first time. The ranking is done by the query to the Database. The query is fast enough so dont worry about that. It is always better to have a complex query than rebuild the whole table after each round.

At the moment my table contains around 12000 unique player entries.

 

At the moment I'm working on the next release which will provide much more accurate scores with the new server R13 release


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Zaeed*:

 

the table just stores the data.. you should use better sql commands to get what you want..


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Repoman1*:

 

Zaeed, any examples or ideas you can share would be great.


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Zaeed*:

 

Select * from [yourTableHere] Order By Score Decending


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by Repoman1*:

 

Can dogtags be tracked now or will that have to wait?


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

Hi im know about this issue with the next server release this problem hopefully will be gone

At the moment I think this might be procon or gameserver related but I will try some things out to locate the problem and may fix it if possible


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by VAM*:

 

warum baut ihr nicht was wo jeder mit um kann?


* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Originally Posted by XpKiller*:

 

warum baut ihr nicht was wo jeder mit um kann?

wie meinst du das?

* Restored post. It could be that the author is no longer active.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Our picks

    • I wanted I let you know that I am starting to build out the foundation for the hosting services that I talked about here. The pricing model I was originally going for wasn't going to be suitable for how I want to build it. So instead I decided to offer each service as it's own product instead of a package deal. In the future, hopefully, I will be able to do this and offer discounts to those that choose it.

      Here is how the pricing is laid out for each service as well as information about each. This is as of 7/12/2020.

      Single MySQL database (up to 30 GB) is $10 USD per month.



      If you go over the 30 GB usage for the database then each additional gigabyte is charged at $0.10 USD each billing cycle. If you're under 30GB you don't need to worry about this.


      Databases are replicated across 3 zones (regions) for redundancy. One (1) on the east coast of the USA, One (1) in Frankfurt, and One (1) in Singapore. Depending on the demand, this would grow to more regions.


      Databases will also be backed up daily and retained for 7 days.




      Procon Layer will be $2 USD per month.


      Each layer will only allow one (1) game server connection. The reason behind this is for performance.


      Each layer will also come with all available plugins installed by default. This is to help facilitate faster deployments and get you up and running quickly.


      Each layer will automatically restart if Procon crashes. 


      Each layer will also automatically restart daily at midnight to make sure it stays in tip-top shape.


      Custom plugins can be installed by submitting a support ticket.




      Battlefield Admin Control Panel (BFACP) will be $5 USD per month


      As I am still working on building version 3 of the software, I will be installing the last version I did. Once I complete version 3 it will automatically be upgraded for you.





      All these services will be managed by me so you don't have to worry about the technical side of things to get up and going.

      If you would like to see how much it would cost for the services, I made a calculator that you can use. It can be found here https://ezrcon.com/calculator.html

       
      • 10 replies
    • I have pushed out a new minor release which updates the geodata pull (flags in the playerlisting). This should be way more accurate now. As always, please let me know if any problems show up.

       
      • 6 replies
×
×
  • Create New...

Important Information

Please review our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.