Jump to content

[BF4] Stats webpage for XpKiller's Stats Logger Plugin


tyger07

Recommended Posts

Originally Posted by Sp0rAdiC*:

 

I'm not a coder so please forgive me...

 

So in reality you would need more info from the Procon logging plugin? Say for instance, the server is down but Procon is running and it couldn't retrieve the ip address of the server for example. It would be set to null in the table then the stats would know that server is offline?

* Restored post. It could be that the author is no longer active.
Link to comment
  • Replies 1.7k
  • Created
  • Last Reply

Originally Posted by ty_ger07*:

 

Unfortunately, it does not work that way. When procon (local client or remote layer) loses a connection to the game server, the plugins stop. As such, the stats database stops being updated and is frozen in time. XpKiller's plugin can not (as far as I know) provide a panicked stats database update notifying of the problem due to time constraints regarding the stoppage of the plugin as Procon terminates the connection. Even if it could do such, it should certainly not change the server's IP address as that would be very bad causing a mixup of servers and stats if more than one server was in that database. If anything, if it were possible, XpKiller's plugin would be most appropriate for updating the ConnectionState of the server from NULL to some panick warning and update it back to NULL or ON when service was restored.

 

I think that approach is a pipe dream.

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

Originally Posted by ty_ger07*:

 

How is this?

 

See attachment.

 

connection_issue.png

 

Code:

...

// players were found in the server
// display teams and players
if(@mysqli_num_rows($Scoreboard_q) != 0)
{
	// is the server providing recent stats properly_
	// or is it possible that the game server, procon, or XpKiller's stats plugin has stopped_
	if(@mysqli_num_rows($Scoreboard_q) > 4)
	{
		$StatsLive_q = @mysqli_query($BF4stats,"
			SELECT sub.`LastSeenOnServer`
			FROM `tbl_currentplayers` cp
			INNER JOIN
			(
				SELECT tpd.`SoldierName`, tps.`LastSeenOnServer`
				FROM `tbl_playerdata` tpd
				INNER JOIN `tbl_server_player` tsp ON tsp.`PlayerID` = tpd.`PlayerID`
				INNER JOIN `tbl_playerstats` tps ON tps.`StatsID` = tsp.`StatsID`
				WHERE tpd.`GameID` = {$GameID}
				AND tsp.`ServerID` = {$ServerID}
			) sub ON sub.`SoldierName` = cp.`SoldierName`
			WHERE cp.`ServerID` = {$ServerID}
			AND sub.`LastSeenOnServer` > NOW() - INTERVAL 1 HOUR AND NOW()
		");
		// He's dead, Jim.
		if(@mysqli_num_rows($StatsLive_q) == 0)
		{
			echo '
			
			<div class="warnoutline">
			<div style="position: absolute; color: #993300; margin: 4px;">Alert!</div>
			<div class="headline">
			A possible server or connection issue exists. Server information displayed may not be accurate.
			</div>
			</div>
			
			';
		}
	}

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

Originally Posted by ty_ger07*:

 

Code updated! Changes:

- Added warning to scoreboard if a possible server connection issue was detected

- Added simple chat search suggestions which shouldn't have a huge impact on database performance

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

Originally Posted by ty_ger07*:

 

Code updated. Changes:

- Reduced the rate at which autocomplete tries to fill in searches

- Added page request throttles. If a user tries to load pages every 1 to 2 seconds, server adds a 1 second delay. If a user tries to load pages every 1 second or less, the server denies the request and gives them an error message and redirect link.

 

denied.jpg

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

Originally Posted by ty_ger07*:

 

Updated posted. Change:

- Free up the top 142px of the page when scrolling down.

 

Note: you may need to refresh the page a few times to force your browser's cache to update properly to the new stylesheet changes.

 

Example:

http://stats.synergy-clan.eu/index.php_p=home&sid=2

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

Originally Posted by GR101*:

 

Also could you add a 'Platoon Leaderboard' tab to the 'Leaderboard' page?

 

I know you can't get the information from BL but how about if platoon members are list in 'config.php' as a variable and used part of the SQL query to return data for that page. This would be a manual process to add and remove players.

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

Originally Posted by ty_ger07*:

 

Also could you add a 'Platoon Leaderboard' tab to the 'Leaderboard' page?

 

I know you can't get the information from BL but how about if platoon members are list in 'config.php' as a variable and used part of the SQL query to return data for that page. This would be a manual process to add and remove players.

This is not something I am interested in doing.. for multiple reasons.

Reason 1: modifying config.php is something which I am avoiding

Reason 2: clan tags aren't in the database and therefore inaccessible and cannot be added as a feature for the half of people wanting to filter their leaderboard based on clan tags

Reason 3: the menu at the top of the page is quite full already

Reason 4: expecting people to properly fill out and maintain a PHP array of player names is not something I trust to happen and therefore the whole purpose would eventually be defeated

Reason 5: as players change their names, the leaderboard would break and I would be blamed even though no one has control over players' desire to randomly change their player name and break a once-valid array of player names

Reason 6: different people have different ideas of how this should be implemented and have different filtering requirements; I can't expect to please everyone with such a poor implementation of a request based on the above limitations

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

Originally Posted by ty_ger07*:

 

Update published. These are the changes:

- When using AdKats and when not a bot: Add ban reason to player page

- When using AdKats and when not a bot: Add ban list page displaying all banned players and ban reasons

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

Originally Posted by ty_ger07*:

 

Updated posted. Change:

- When using AdKats, the first (default) page of the leaderboard now loads slightly faster and uses less database connections

 

The numbers will be different for everyone depending on your server location and server performance, but, as a matter of comparison, in my testing, the first page of the leaderboard loaded in ~600ms instead of ~800ms. And, of course, reducing the number of queries by 19, is a good thing.

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

Originally Posted by Grainz*:

 

Suggestions on how to remove a server that is no longer used without removing the server and stats from the database?

 

Temporarily, I modified tbl_server and added a new column named "Hidden" and edited any select of tbl_server with `Hidden` = 'N'. Any server I do not wish to list on the page, I modified the column to Y.

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

Originally Posted by ty_ger07*:

 

Suggestions on how to remove a server that is no longer used without removing the server and stats from the database?

 

Temporarily, I modified tbl_server and added a new column named "Hidden" and edited any select of tbl_server with `Hidden` = 'N'. Any server I do not wish to list on the page, I modified the column to Y.

In the database, in the tbl_server table, set the server `ConnectionState` to 'OFF' (or anything other than either NULL or 'ON'). It's built into the stats page that way. See changelog in ReadMe.txt for 10-29-2014.

10-29-2014:

...

- Added filter to not display servers if their `ConnectionState` is NOT NULL or NOT 'ON' in the `tbl_server` table

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

Originally Posted by wtfreak*:

 

I apologize for sounding like a total idiot as I do not understand much of what is being said here in his thread but I would like to have a stats page on my website for our BF4 server and I am a little unsure as to how to set this up on our website. Please PM me so that we may discuss this more.

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

Originally Posted by Grainz*:

 

In the database, in the tbl_server table, set the server `ConnectionState` to 'OFF' (or anything other than either NULL or 'ON'). It's built into the stats page that way. See changelog in ReadMe.txt for 10-29-2014.

Perfect. Thank you :smile:
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

I apologize for sounding like a total idiot as I do not understand much of what is being said here in his thread but I would like to have a stats page on my website for our BF4 server and I am a little unsure as to how to set this up on our website. Please PM me so that we may discuss this more.

Via PM? No thank you!

 

Do you have XpKiller's Stats Logger plugin version 1.0.0.2 set up and running correctly? That is the first step. If not, refer to his thread first.

myrcon.net/.../stats-webpage-for-xpkillers-stats-logger-plugin

* Restored post. It could be that the author is no longer active.
Link to comment
  • 3 weeks later...

Originally Posted by ty_ger07*:

 

hi.Statistics are not updated when punkbaster is disabled on the server.

It can be fixed?

That's XpKiller's plugin which controls whether or not stats are updated. This is the wrong place to ask. Ask in his plugin thread.

myrcon.net/.../stats-webpage-for-xpkillers-stats-logger-plugin

 

By the way, no, I do not think it is easily possible to make XpKiller's plugin work without Punkbuster enabled since his plugin uses a lot of Punkbuster information in the way it tracks players and functions.

Such as:

- keeping track of individual players between one day and the next even after they change their soldier's name,

- knowing player's IP address,

- knowing player's country,

- keeping track of when players are in the server and when to update their stats,

- filling information into the 'current players' table which can then be used in a web-based scoreboard,

- filling information into map stats,

- and monitoring player activity in general.

 

Leave Punkbuster enabled. I think it is very purposeful that XpKiller made it stop functioning if Punkbuster is disabled.... simply because it won't function properly if Punkbuster is disabled. :ohmy:

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

Originally Posted by EntraVenuS*:

 

Bit of a problem with the stats displaying. Had this working for about 18 months and now since we had a new server it wont show the server on the stats page. when you click the server stats page it displays the old servers but if you let it refresh itself then the new server comes up but with a player error. Plus when you click on it it doesnt show the players online.

 

heres the stats page in question http://anarchygaming.uk/stats/

 

heres the database but i cannot delete the old 1 (i changed the old 1 to 1.1.1.1 )

Posted Image

 

what am i doing wrong? all i want is for the 1 server to display on the stats website..

 

Any help would be gratefully received

 

for some reason the pic doesnt zoom in but if you right click and open image in new tab it displays bigger

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

Originally Posted by ty_ger07*:

 

If you don't want the old server to display, change its ConnectionState to 'off'. I wouldn't recommend deleting it or editing anything else related to it.

 

Can I please get some clarification? "old server" is ServerID 1, correct? And "new server" is ServerID 4, correct?

 

If that is correct, then I would say that the "new server" seems to be working properly, as far as I can see.

ServerID 4 ("new server"): http://anarchygaming.uk/stats/index.php_p=home&sid=4

 

It's the "old server" which appears to be broken.

ServerID 1 ("old server"):

"error" players: http://anarchygaming.uk/stats/index.php

broken leaderboard: http://anarchygaming.uk/stats/index.php_p=home&sid=1

broken server stats: http://anarchygaming.uk/stats/index.php_p=server&sid=1

 

It looks like you broke the old server when you tried to delete it or when you edited something incorrectly. If you simply want it to go away, change its ConnectionState to 'off'. Even worse, maybe this has caused stats to get mixed up between the two ServerIDs. You would know better than me if stats are looking incorrect.

 

If you can, after shutting down XpKiller's plugin and/or stopping your layer server, I would recommend restoring the stats database to a recent point from before you messed around with it in order to fix the old broken stats and broken inter-table data links ("foreign key constraints"). With the current broken information, I don't know what else may break in the future. But, if you have no recent backup, I guess you can just hide the old broken server by changing its ConnectionState to 'off' and then hope for the best in the future.

 

Also, I would recommend deleting the tyger_stats_... tables in order to fix any old miss-cached information. The stats page will rebuild the tyger_stats... tables.

 

Finally, I would also recommend updating your stats page to the most current version if you want the most current and best (in my opinion) functionality and what-not (your choice).

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

Originally Posted by EntraVenuS*:

 

thanks for the info to correct this i just turned the server to connection state off and all is good now thanks

 

I rolled back the database and turned all the other servers connectionstate off, Emptied all the tyger_stats... tables but it doesnt show the server (map and player count) http://anarchygaming.uk/stats/ plus i cannot delete previous servers

 

Posted Image

 

any help would be appriciated

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

Originally Posted by ty_ger07*:

 

As I said, I would not encourage you to attempt to delete old servers, because bad side-effects can happen. I do not know how to safely delete the old servers, especially with AdKats also involved. As I said, I would encourage you to just change their ConnectionState to 'off'. If you can, while XpKiller's plugin is disabled and/or the layer server is stopped, please restore your database to a recent time (if available) before you started deleting or editing servers, and then do not proceed to re-attempt to delete them and instead simply change their ConnectionState to 'off'.

 

If you absolutely must delete the old servers, I would recommend either deleting everything and starting over, or asking ColColonCleaner for advice.

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

Originally Posted by EntraVenuS*:

 

nope its still not displaying the correct map or playercount. Its the right server as when i click on it the link takes me to the correct server in battleog. Adkats and the admin control pannel is working fine just the stats page isnt displaying the correct info ..

 

Anyone got any idea what i can try please

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

Originally Posted by ty_ger07*:

 

Looks like it is working correctly if you refresh a couple times and/or (sometimes) include "index.php" in the URL. Hmm...?

http://anarchygaming.uk/stats/index.php

 

I would recommend updating your stats page to the most current version. I can't remember what I have changed and don't know which version you have; but your version looks old. Something is broken in your version. I don't know what. If it is still broken in the newest version, it will be a lot easier for me to find without having all the extra unknowns and doubt.

 

If nothing else, please at least place the newest version of my stats page code in another directory of your site and see for yourself whether it makes a difference.

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

Originally Posted by EntraVenuS*:

 

thanks for your input could you please link to your latest version as there is links all over the place and I want to make sure I got the right one. thanks in advance

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

Archived

This topic is now archived and is closed to further replies.




  • Our picks

    • Game Server Hosting:

      We're happy to announce that EZRCON will branch out into the game server provider scene. This is a big step for us so please having patience if something doesn't go right in this area. Now, what makes us different compared to other providers? Well, we're going with the idea of having a scaleable server hosting and providing more control in how you set up your server. For example, in Minecraft, you have the ability to control how many CPU cores you wish your server to have access to, how much RAM you want to use, how much disk space you want to use. This type of control can't be offered in a single service package so you're able to configure a custom package the way you want it.

      You can see all the available games here. Currently, we have the following games available.

      Valheim (From $1.50 USD)


      Rust (From $3.20 USD)


      Minecraft (Basic) (From $4.00 USD)


      Call of Duty 4X (From $7.00 USD)


      OpenTTD (From $4.00 USD)


      Squad (From $9.00 USD)


      Insurgency: Sandstorm (From $6.40 USD)


      Changes to US-East:

      Starting in January 2022, we will be moving to a different provider that has better support, better infrastructure, and better connectivity. We've noticed that the connection/routes to this location are not ideal and it's been hard getting support to correct this. Our contract for our two servers ends in March/April respectively. If you currently have servers in this location you will be migrated over to the new provider. We'll have more details when the time comes closer to January. The new location for this change will be based out of Atlanta, GA. If you have any questions/concerns please open a ticket and we'll do our best to answer them.
      • 5 replies
    • Hello All,

      I wanted to give an update to how EZRCON is doing. As of today we have 56 active customers using the services offered. I'm glad its doing so well and it hasn't been 1 year yet. To those that have services with EZRCON, I hope the service is doing well and if not please let us know so that we can improve it where possible. We've done quite a few changes behind the scenes to improve the performance hopefully. 

      We'll be launching a new location for hosting procon layers in either Los Angeles, USA or Chicago, IL. Still being decided on where the placement should be but these two locations are not set in stone yet. We would like to get feedback on where we should have a new location for hosting the Procon Layers, which you can do by replying to this topic. A poll will be created where people can vote on which location they would like to see.

      We're also looking for some suggestions on what else you would like to see for hosting provider options. So please let us know your thoughts on this matter.
      • 4 replies
    • Added ability to disable the new API check for player country info


      Updated GeoIP database file


      Removed usage sending stats


      Added EZRCON ad banner



      If you are upgrading then you may need to add these two lines to your existing installation in the file procon.cfg. To enable these options just change False to True.

      procon.private.options.UseGeoIpFileOnly False
      procon.private.options.BlockRssFeedNews False



       
      • 2 replies
    • 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

       
      • 11 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.

       
      • 9 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.