Jump to content

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


tyger07

Recommended Posts

Originally Posted by ty_ger07*:

 

One optimization I can do is grab the player score rank of the top 20 players and show that rank on the player stats page if you view the player page of one of those top 20 players. I don't know why I didn't think of that already. That would decrease the rank function load by 1/4 if one of the top 20 player pages are viewed.

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

 

Will it be possible to add a server signature like the ones in my sig from gametracker?

 

Gametracker is down all the time, and it would be nice to have our own sigs. :cool:

I am sure that you have seen the player stats signatures on the player stats page.

http://open-web-community.com/bf4stats/player-stats/signature/signature.php_pid=27546&gid=1&fav=0

 

I am also sure that you have seen the gametracker style server banners on the server info page.

http://open-web-community.com/bf4sta...nner.php_sid=3

 

Basically, you want something similar to the existing server banner, except as an image instead of html and squashed down, correct?

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

Originally Posted by TMiland*:

 

I am sure that you have seen the player stats signatures on the player stats page.

http://open-web-community.com/bf4stats/player-stats/signature/signature.php_pid=27546&gid=1&fav=0

 

I am also sure that you have seen the gametracker style server banners on the server info page.

http://open-web-community.com/bf4sta...nner.php_sid=3

 

Basically, you want something similar to the existing server banner, except as an image instead of html and squashed down, correct?

I have seen them yes, that's why i am asking. Using the server banner on http://nbfc.no/forums/ :smile:

 

Well, i was thinking something along the line of the gametracker server signature, just like this: Posted Image

 

Attached Files:

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

Originally Posted by ty_ger07*:

 

Update Released!

http://tyger07.github.io/BF4-Server-Stats

 

Changes:

- Fixed error which sometimes caused duplicates in Top 20 players cache

- Performance enhancement of rank function

- Added missing country Montenegro

 

An issue occured if two people triggered a Top 20 recache within seconds of eachother which caused duplicated lines in the Top 20 list.

Screenshot_2014-11-11-12-48-21.jpg

Rank query was sped up by using Top 20 cache for player score rank if that player is a Top 20 player. Also HS/Kill rank was removed in order to reduce rank function load by 1/4.

Server banner page was sped up by using Top 20 cache for Top 10 player display instead of querying the entire database.

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

Originally Posted by ty_ger07*:

 

I plan to add a player search box to the leaderboard so that a specific player's rank can be found on the leaderboard without going to that player's stats page.

 

I also plan to create gametracker style server banner signature images as requested.

 

In the more distant future, I consider releasing a stats database maintenance/cleanup page probably in a different thread and as a different GitHub project.

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

Originally Posted by ty_ger07*:

 

Cool!

 

Using your stats page as a comparison, TMiland, the rank function is still incredibly slow for you in that one server with lots of players. Waiting so long to load a player's page is pathetic. I should just jquery the ranks into that page later after the rest of the page loads. Waiting time could be cut down from 6 - 10 seconds down to less than one second in your case.

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

Originally Posted by ty_ger07*:

 

can i use this for my bf3 server stats? i run the old plugin (1.1.0.1) on my server.

Yes, you can use it with your BF3 server if you change BF4 to BF3 in the /common/connect.php file. But you will see lots of issues with missing maps and maps images and missing weapons and weapons images.
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by TMiland*:

 

Cool!

 

Using your stats page as a comparison, TMiland, the rank function is still incredibly slow for you in that one server with lots of players. Waiting so long to load a player's page is pathetic. I should just jquery the ranks into that page later after the rest of the page loads. Waiting time could be cut down from 6 - 10 seconds down to less than one second in your case.

What page is it, i experience no slow loading times on my end.

 

I was also thinking if you want to, i have a dev database you could get access to if you want, it's approximately 2GB of data in that db you could use. :smile:

 

It's just a copy of the production db, but it's loaded with data you can fiddle with. :smile:

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

Originally Posted by ty_ger07*:

 

What page is it, i experience no slow loading times on my end.

 

I was also thinking if you want to, i have a dev database you could get access to if you want, it's approximately 2GB of data in that db you could use. :smile:

 

It's just a copy of the production db, but it's loaded with data you can fiddle with. :smile:

I can't click on the link, otherwise you will see a fast load time due to me cacheing it. Someone else might click the link and cache it before you visit it as well. But, for example, any player stats page in Server 1 is slow to load due to calculating their ranks.

http://nbfc.no/bf4stats/index.php_si...29054&p=player

If that player's rank is cached by the time you click it, try some other random player's stats page. It seems like your database takes around 9 seconds to calculate those three ranks for Server 1 for a non-top 20 player and around 5 seconds to calculate those three ranks for a top 20 player.

 

A larger database would be nice for testing purposes. The problem though is that it's hard for me to get a copy due to its size and difficulty in creating a backup, uploading the backup, downloading the backup, and restoring the backup.

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

Originally Posted by ty_ger07*:

 

I see this is pretty ugly until a round is completed and player stats are saved:

Screenshot_2014-11-12-05-18-15.jpg

"Image missing" "error" "error" "unknown..."

 

The live scoreboard of that server doesn't display the same ugly blank information though because it ignores the fact that there are not yet any stored players or stats. It simply doesn't need to know that fact because it isn't counting the total number of players at the same time.

Screenshot_2014-11-12-05-18-34.jpg

 

In index-displayer-servers.php and index-display-servers-live.php, this query is also counting the number of players and since there are none, failed query.

Code:

$Basic_q = @mysqli_query($BF4stats,"
	SELECT ts.`mapName`, ts.`Gamemode`, ts.`maxSlots`, ts.`usedSlots`, ts.`ServerName`, tss.`CountPlayers`
	FROM `tbl_server` ts
	INNER JOIN `tbl_server_stats` tss ON tss.`ServerID` = ts.`ServerID`
	WHERE ts.`ServerID` = {$this_ServerID}
	AND ts.`GameID` = {$GameID}
");
I guess I should split that query into two queries so that most of the information can be displayed and only the players will be "error".
* Restored post. It could be that the author is no longer active.
Link to comment

Originally Posted by ty_ger07*:

 

Yes +1

Works for me.

http://battlelog.battlefield.com/bf4...7C+Nitrado.net

 

It's probably because you are logged into battlelog and have a custom filter set. I will change the link back to how it was.

 

Does this one work for you?

http://battlelog.battlefield.com/bf4...7C+Nitrado.net

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

Originally Posted by ty_ger07*:

 

Hi :smile:

 

I've a problem with the new version. The combined stats doesn't works :sad: Look : http://www.fws-gaming.com/bf4serverstats/index.php And on the home page, in Combined Stats, the number of players is not good :/ On the previous version it work :sad:

You've an idea ?

I think it is because you have a ton of servers which causes the number of available server ids to exceed the text length limit of that collumn of the cache table. I will have to increase the character length limit.

 

But, I am only guessing because I can't look at your database. If you PMed me your database connection details, it would be much easier for me to diagnose.

 

What do you mean "in Combined Stats, the number of players is not good :/". What is "no good" about it?

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

Originally Posted by ty_ger07*:

 

The old version added up the players too high. The new number may be correct. I haven't checked yours yet. Think of it this way: if you visit every one of your servers, you are only 1 person, not 8 people. You can't add up all the numbers because many players visit more than one of your servers and can't be counted multiple times.

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

Originally Posted by ty_ger07*:

 

I've sent you a message with the access :smile:

The number of player is not good because if you add all servers, it makes more 600 000 players and on the old version it works :/

Thank you!

 

Regarding Combined Player Page Issue you Reported with "No stats...":

 

I did some testing and, yes, the problem was that the Server IDs (1,2,3,4,5,6,7,8,9,10,11,12,13,14) were more than 20 characters and therefore did not fit in the column in database table which truncated its value to (1,2,3,4,5,6,7,8,9,10) and caused a mismatch.

 

I have extended the column in your database to 50 characters which solved the issue.

 

I will release an update for other people like you who have many many servers.

 

Here are the queries to fix that issue:

Code:

ALTER TABLE `tyger_stats_count_cache` CHANGE `SID` `SID` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
ALTER TABLE `tyger_stats_rank_cache` CHANGE `SID` `SID` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
ALTER TABLE `tyger_stats_top_twenty_cache` CHANGE `SID` `SID` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL;
I already fixed yours, so there is nothing more you need to do.

 

Regarding "Combined Stats, the number of players is not good :/" you Reported:

 

I verified that the count is now correct. Before, the count was too high.

 

This is the query it is using to count your players:

Code:

SELECT COUNT(DISTINCT tpd.`PlayerID`) AS count
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` = 1
AND tsp.`ServerID` IN (1,2,3,4,5,6,7,8,9,10,11,12,13,14)
The result is: 402862 currently

 

The reason why it is lower than it used to be is because it used to be incorrect. I fixed it a handful of updates ago by adding "COUNT(DISTINCT tpd.`PlayerID`)" (in bold) because it was counting players multiple times if they were in multiple servers.

 

Think of it this way (simplified):

If you only had two servers and you were the only 1 player who played in each of those servers, the total combined players who have played in those servers is 1, not 2.

 

Server 1: 1 total player (you)

Server 2: 1 total player (you)

Combined Servers: total players: 1

 

You can't just add up the number of players in each server to figure out the combined total number of players.

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

Originally Posted by TonyGun38*:

 

Hum ok, thank you for your help :smile:

 

Another question, you know how I can change the order of the servers in the list ?

 

And in the server selector, how I can add "Home" option ?

 

Thank you

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

Originally Posted by ty_ger07*:

 

Hum ok, thank you for your help :smile:

 

Another question, you know how I can change the order of the servers in the list ?

 

And in the server selector, how I can add "Home" option ?

 

Thank you

Changing the order... that is something you would have to do custom. It orders them in order of when they were added to the database. It's hard to predict which is the "correct" order for everyone.

 

It orders the server in /common/connect.php in this query:

Code:

// find all servers in this database which have the BF4 game id
$ServerID_q = @mysqli_query($BF4stats,"
	SELECT `ServerID`
	FROM `tbl_server`
	WHERE `GameID` = {$GameID}
	AND (`ConnectionState` IS NULL OR `ConnectionState` = 'on')
");
If you tried to order them by ServerName, you would use this query:

Code:

// find all servers in this database which have the BF4 game id
$ServerID_q = @mysqli_query($BF4stats,"
	SELECT `ServerID`
	FROM `tbl_server`
	WHERE `GameID` = {$GameID}
	AND (`ConnectionState` IS NULL OR `ConnectionState` = 'on')
	ORDER  BY `ServerName` ASC
");
But then you would get this order which is probably actually worse:

FwS Gaming.com # 11 | Dragon's Teeth - ChainLink |...

FwS Gaming.com #1 | All Maps - Classic Conquest | ...

FwS Gaming.com #10 | Dragon's Teeth - Chainlink | ...

FwS Gaming.com #10 | Naval Strik - Carrier Assaut ...

FwS Gaming.com #12 | Capture The Flag - All Maps |...

FwS Gaming.com #2 | All Maps - Conquest | Nitrado....

FwS Gaming.com #3 | Infantry - Conquest | Nitrado....

FwS Gaming.com #4 | All Maps - Rush | Nitrado.net

FwS Gaming.com #5 | All Maps - Obliteration | Nitr...

FwS Gaming.com #6 | All Maps - Domination | Nitrad...

FwS Gaming.com #7 | All Maps - Rush HC | Nitrado.n...

FwS Gaming.com #8 | All Maps - Conquest HC | Nitra...

FwS Gaming.com #9 | Defuse - All maps | Nitrado.ne...

There is a link back to the index "home".

Index • FwS Gaming.com #1 | All Maps - Classic Conquest | Nitrado.net

HOME PAGE

Statistics data presented is not from all BF4 servers. These are the statistics of players only in this server.

index.png

 

But if you want to also add it to the drop-down menu, it is in /common/display-servers.php. It is a simple HTML form but difficult to do what you want since the input 'p' is set to 'home' to specify the page for each option and it is hard to retrospectively change 'p' back to '' (NULL) later in the form in order to make it bring you back to the index page.

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

Originally Posted by ty_ger07*:

 

Update Released!

http://tyger07.github.io/BF4-Server-Stats

 

Changes:

- Fixed error caused while caching combined server stats of databases with many servers

- Added a couple database indexes to speed up certain queries

- Fixed issue with server join button link

- Updated to new Battlelog background image

 

 

Note: initially you will see a very slow page load time while changes are made. After that, performance should return to what it was previously. Then, after that, you should see some pages gradually get faster than previously.

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

Originally Posted by Tealavenger*:

 

Hey Ty_ger07,

 

Just have a quick questions. I apologize if this has already been answered. Any plans to implement a "Total Playtime" time field on the live scoreboard or when you click on the player?

 

Great work!!!!

* 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.