Page 1 of 19 12311 ... LastLast
Results 1 to 10 of 188
  1. #1

    Battlelog Cache (1.0.1.0 - 14/1/13)

    Battlelog Cache


    Author: MorpheusX(AUT)

    BATTLELOG CACHE DOES NOT WORK FOR BF4 AND MOST LIKELY NEVER WILL.

    Description


    This plugin should be used by plugin-authors to query for Battlelog-stats. It uses a MySQL-Database to cache requests and thus allows reducing the load on Battlelog.

    This version if the very first public release and thus may contain bugs, however it has proven stable over a few days of testing on multiple servers. If you encounter any bugs, please inform the plugin author.

    Whilst this caching-plugin will reduce the amount of requests made towards Battlelog, it doesn't solve the 'Too Many Requests' problem completely. The first version does not contain dynamic throtteling and re-fetching of failed requests yet.

    Commands


    Battlelog Cache does not include any ingame-commands or additional functionality, but just provides an interface for other plugins to query. In order to communicate with Battlelog Cache, a plugin must implement the following mechanisms:
    1. Provide a public method following the given scheme: public void METHODNAME(params String[] response) { }
    2. Check whether Battlelog Cache is installed by issueing this.GetRegisteredCommands(); and parsing the list for a MatchCommand with RegisteredClassname == CBattlelogCache and RegisteredMethodName == PlayerLookup
    3. Create a Hashtable with the following keys: playerName, pluginName, pluginMethod, requestType
    4. Execute a query calling the following command: this.ExecuteCommand("procon.protected.plugins.call ", "CBattlelogCache", "PlayerLookup", JSON.JsonEncode(HASHTABLE));


    • METHODNAME would be the name of the plugin's public method for returning stats
    • playerName should have the name of the player as a content
    • pluginName should have the Class-Name of a plugin as a content (e.g. CBattlelogCache)
    • pluginMethod should have METHODNAME as a content
    • requestType defines the type of the statsrequest. Possible requests: 'overview', 'weapon', 'vehicle', 'clanTag'
    • HASHTABE should be replaced with the hashtable created in the step before


    Settings


    Debug level
    Indicates how much debug-output is printed to the plugin-console. 0 turns off debug messages (just shows important warnings/exceptions), 6 documents nearly every step.
    MySQL Hostname
    Hostname of the MySQL-Server Battlelog Cache should connect to.
    MySQL Port
    Port of the MySQL-Server Battlelog Cache should connect to. (Default: 3306)
    MySQL Database
    Database Battlelog Cache should use to cache stats.
    MySQL Table
    Table Battlelog Cache should use to cache stats. (Default: playerstats)
    MySQL Username
    Username Battlelog Cache should use to authenticate with the MySQL-Server.
    MySQL Password
    Password Battlelog Cache should use to authenticate with the MySQL-Server.

    If you don't see the MySQL settings, the MySQL details have been 'hardcoded' in the Configs/gsp_settings/battlelogcache_mysql.cfg file. Hosters can use this to 'enforce' all users to query a centralized database, allowing more cache-hits.

    To disable the MySQL settings, create a subfolder gsp_settings within the Configs folder in Procon. Within this subfolder, create a file called battlelogcache_mysql.cfg. This file should have the following structure:
    Code:
    hostname HOSTNAME
    port PORT
    database DATABASE
    table TABLE
    username USERNAME
    password PASSWORD
    MySQL Setup


    In order for Battlelog Cache to work, it needs to be connected to a MySQL-Database. You can either get one from a hosting provider or you can set one up yourself, as long as you have network connectivity through your firewall to your Procon instances (instructions for setting up a MySQL database server are here: [HowTo] Set up a MySQL server for Procon

    The needed CREATE-script for the table can either be found in the plugin's zip-File or manually downloaded at this page.

    NOTE: if you use the script as-is, you must first do a
    Code:
    use your_db_name;
    command, where your_db_name is the name of the database you granted access to in the [HowTo] Set up a MySQL server for Procon instructions. Alternatively, you can customize the script by replacing the first line of the script with this:
    Code:
    CREATE TABLE IF NOT EXISTS `your_db_name`.`playerstats` (
    You should of course replace the your_db_name with the actual name you picked.

    After the table has been created, no further setup will be required to run Battlelog Cache.

    Download


    This plugin is bundled with Procon as of version 1.4.0.5. There is no need to download or install it, it should already be installed.

    Changelog
    1.0.1.0 (14.1.2013)
    - added more error handling, reduced spamming of plugin.log for setting 2 or lower
    1.0.0.0 (18.12.2012)
    - initial (public) version
    Attached Files Attached Files
    Last edited by MorpheusX(AUT); 28-08-2014 at 16:43. Reason: Updated create table instructions

  2. #2
    Don't get all excited, I'm just giving Morpheus a hand and posting this for him, so you guys have one place to track support issues and updates.
    Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.

  3. #3
    Procon Plugin Tester
    Join Date
    Apr 2010
    Location
    Finland
    Posts
    132
    Sorry this stupid question but, from where to get that 1.0.0.1?
    ]

  4. #4
    "I was a genuinely nice person before I joined this community"
    Join Date
    May 2010
    Location
    Austria
    Posts
    3,269
    It's not released yet. PC9 made some last changes yesterday evening and sent them to me for a last check. Since Phil is on holiday, I'm not sure I will succeed in adding it to the Package System, but we'll attach it to this post during the day.


    Before posting: Have you read the MANUAL?
    Before posting: Have you used the SEARCH?

    I will not provide support through PMs or TeamSpeak. Please post your questions in our forums.


  5. #5
    Procon Plugin Tester
    Join Date
    Apr 2010
    Location
    Finland
    Posts
    132
    Quote Originally Posted by MorpheusX(AUT) View Post
    It's not released yet. PC9 made some last changes yesterday evening and sent them to me for a last check. Since Phil is on holiday, I'm not sure I will succeed in adding it to the Package System, but we'll attach it to this post during the day.
    Ok thanks for clearing this.
    ]

  6. #6
    How various statistic will be aged for already cached users ? I mean how will be decided that some certain stats should be refreshed against battlelog ?

  7. #7
    The one and only Bassyboy
    Join Date
    Jul 2010
    Location
    Netherlands
    Posts
    3,261
    Quote Originally Posted by jstm View Post
    How various statistic will be aged for already cached users ? I mean how will be decided that some certain stats should be refreshed against battlelog ?
    They will be refreshed after 24 hours, if I'm correct.
    I won't do support via PM: if you need help, make a topic on the public forums.

  8. #8
    Procon Plugin Tester
    Join Date
    Apr 2010
    Location
    Finland
    Posts
    132
    @PC9
    That logs, how often u wanna get em?
    ]

  9. #9
    Quote Originally Posted by LumpyNutZ View Post
    @PC9
    That logs, how often u wanna get em?
    Just once and only if you have had a HTTP request error, like Too Many Requests or Timed Out. I just need to confirm that HTTP request errors are handled as expected, which is, you get some kind of message (just one!), no NullReferenceExceptions, and nothing gets entered in your database for that player, not even an error. The idea is that an HTTP request error is temporary and the next request might work, so we don't want to throw a 24 hour delay in if it is not necessary.
    Don't send me private messages (PMs) unless you really need privacy, like your game server password. If you just have a question or need help, post in one of the threads. It's extra work for me to answer questions and give help in private messages and no one else gets the benefit of the answer.

  10. #10
    Procon Plugin Tester
    Join Date
    Apr 2010
    Location
    Finland
    Posts
    132
    PC9 just sent the logs for you, let me know if you need more.
    ]

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •