OK, i found out a lot over the API description and some forum discussions on bf3stats.com which will be too much to post here in detail. But i will try to shorten the bunch of informations so we can get further to the actual problem: understanding the data given in the playerreport-object for implementing custom assignments.
First of all, it seems that the sig-coder-API for displaying signature graphics from bf3stats is polling the same EA database as battlelog does. I have also found a lot of the keys from the battlereport within the API-response from bf3stats. So i think this would be a great point to start our search, because the guys from bf3stats have already formed the keys from the raw output into some human readable stuff which i think may help a lot.
I would even say that we/you (i will take the we further on ;)) could maybe play a bit with the whole API to get more familiar with all the data provided.
Check out their API description on:
They also provide a tester like a demo on the bottom of the page. The really interesting about that are the filters you can set.
(sry, i may sound confusing, but i am getting more and more to the solution as i am writing this post and find more and more stuff which may help)
OK, so here is what i did:
First i tried the following opts in the API tester:
//i know, this are overall stats, not battlereports
//for better reading now, later the json output will be more useful, i assume ;)
//cause i am playing on PC :P
//check out the description above the tester for details
//feel free to use your own :D
then i clicked on
is just opening another window
*tadaaaaa* what you can see then is pretty much the same what you can find in the playerreport object. Sure, there is a lot more in the API stats (cause they hold a lot more info), but i found almost every key within the API response using the browser search function (yes, i am lazy :P)
OK, so far, so good. The next thing i did was to switch the opts from clear,keys,raw to clear,keys,assignments and that was a direct hit! Just do it for yourself and you will see what i mean: The cryptic keys are listed with a certain amount of criterias, even a text-form description and they reference to the raw output keys you have seen in the request before!
stats.assignments.xpma09.xpma09.criteria.nname='Arm 10 MCOMs'
stats.assignments.xpma09.xpma09.criteria.nname='Capture 10 flags'
stats.assignments.xpma09.xpma09.criteria.nname='Play 2 hours on Karkand'
Sure, there is still a lot more to find out (like the meanings of _g or _g_a, how to query a certain battle, and so on, and so on), but i think this is the first step to the planned feature :P
During my 'sherlock-holmes-session' this evening i stumbled upon some more possibilities that may help further (maybe even to leave this bf3stats API alone and go the way to EA directly) but also some restrictions or other problems in the API (like updates only every 20min, written in PHP-how to fix that??? or something like that) which i have to check first a bit deeper. Also i am tired as hell atm and will go to bed now.
You have to excuse if my english is not the best or if i have some typos somewhere... almost sleeping...
Nevertheless i hope i could have helped you with the novel above. Maybe you are just shaking your head about my noobishness, cause you use most of this stuff already in your plugin. But I think it should keep you busy till tomorrow, if only by reading all this poorly structured stuff :D
ah, and you may want to check this forum-posts and urls regarding the bf3stats API:
so... hf and good night