It is currently March 29th, 2024, 8:16 am

Battlelog Stats for BF4 (Will add support for BF3 + BFH)

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
User avatar
HelloAndGoodbye
Posts: 7
Joined: February 10th, 2015, 10:55 pm
Location: London

Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by HelloAndGoodbye »

Hi everyone!

I've been working on a simple statistics skin for Rainmeter which displays your Battlefield characters' kill/death ratio, win/loss ratio, total score etc.
It also displays your character's current rank and equipped dogtags ;)
Image
I mainly designed this because I was too lazy to visit bf4stats to check my scores.

I will release this skin soon (as a beta?)
Download on DeviantArt

Changelog:
0.5 - Initial release
0.6 - Added ability to change the circle's color in the .ini file, fixed circle not showing

Please post your thoughts on this skin (criticism is welcome)

Almost forgot: You need to go into the ini file and change the variables (your name and your platform)
Last edited by HelloAndGoodbye on April 1st, 2015, 3:50 pm, edited 4 times in total.
One day, we will all just fade to nothingness and be but a distant memory...
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by drakulaboy »

nice work, gonna test it right now, was going to do it too, but i'm so lazy :D
User avatar
HelloAndGoodbye
Posts: 7
Joined: February 10th, 2015, 10:55 pm
Location: London

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by HelloAndGoodbye »

Well that makes two of us (I'm a lazy guy as well :D)

I haven't checked if my packed version works yet since this was originally part of my suite but I just made a separate version of the skin so please tell me if you find something that doesn't work.
One day, we will all just fade to nothingness and be but a distant memory...
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by drakulaboy »


but the skin is working fine
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by jsmorley »

drakulaboy wrote:
but the skin is working fine
That will happen when an image meter is using the value of a WebParser child measure to get the image name. WebParser is threaded, so it isn't "blocking" Rainmeter while it is out getting information from web sites, and so for at least one skin update, all WebParser measures will return an empty string for all values. Generally by the next update WebParser is done, and all is well. Those are not in any way fatal errors.
User avatar
HelloAndGoodbye
Posts: 7
Joined: February 10th, 2015, 10:55 pm
Location: London

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by HelloAndGoodbye »

jsmorley, would there be any way to fix this to prevent log spam or is it currently unfixable?

By the way, the skin seems to be missing a background image so I'll update the file with the background image and a new feature as well (hopefully today).
One day, we will all just fade to nothingness and be but a distant memory...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by jsmorley »

HelloAndGoodbye wrote:jsmorley, would there be any way to fix this to prevent log spam or is it currently unfixable?

By the way, the skin seems to be missing a background image so I'll update the file with the background image and a new feature as well (hopefully today).
It will vary a bit depending on how the skin is set up, but what I see from that error log is that some WebParser measure is returning some value, let's say a number like 3 as an example.

Then there is an Image meter somewhere that has ImageName=[SomeMeasure].png, or even just ImageName=[SomeMeasure], as the .png is assumed if there is no extension specified.

Since on the first update the value of [SomeMeasure] is "", that turns into ImageName=.png, which obviously isn't going to work.

As soon as the WebParser parent measure is finished, and it populates any child measures dependent on it, then that will change to ImageName=3.png, and all is well, assuming 3.png is located on the local drive where you specify.

I'm not sure there is a good way to eliminate the initial errors that isn't just more trouble than it is worth. At a high-level, what you want is to have some "placeholder" image set as the ImageName on the meters, or even just don't have an ImageName option at all on them when the skin is first loaded, and then with a FinishAction on the parent WebParser measure, set the ImageName on the meters to what they really should be, but only after the parent WebParser measure is "finished". That way you can either have some "N/A" image to start with, or just no image at all, and there will be no errors generated.

Depending on the complexity of the skin, and how many image meters are involved, this could turn into a lot of work and code. There is some point where I would probably just live with a handful of errors in the log that only happen once when the skin is first loaded or refreshed.
User avatar
HelloAndGoodbye
Posts: 7
Joined: February 10th, 2015, 10:55 pm
Location: London

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by HelloAndGoodbye »

OK, thanks for the info jsmorley ^^

I think no-one is going to mind since it's only in the logs.
One day, we will all just fade to nothingness and be but a distant memory...
User avatar
jsmorley
Developer
Posts: 22628
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by jsmorley »

HelloAndGoodbye wrote:OK, thanks for the info jsmorley ^^

I think no-one is going to mind since it's only in the logs.
Yes.

Really the better way to handle this is at the overall design level.

By that I mean that I try very hard NEVER to use ImageName=[SomeMeasure] on Image meters if [SomeMeasure] is a WebParser parent or child measure.

So for instance in a weather skin, I would never use:

[MeterIcon]
Meter=Image
ImageName=#@#Images\[MeasureIconNumber].png
DynamicVariables=1

But would use:

[MeterIcon]
Meter=Image
MeasureName=MeaureIconNumber
ImagePath=#@#Images\

That won't generate any errors when the measure MeasureIconNumber is not yet "finished". The meter will just not have any value at all until it is, and Image meters are fine with not having any value "bound" to them with MeasureName. ImageName on the other hand, will just hate not being able to find the file it is looking for.

ImageName="" is an error
MeasureName="" is not

There is nothing easy you can do to avoid the error really if you do use ImageName, as "hidden" and even "disabled" meters will still generate a log error if ImageName is invalid.

The trouble is, this might mean a bit of overall tweaking to set ImagePath on your Image meters, and then to ensure that the WebParser measures return just the name of the image file. I'd be tempted to fix it myself though, as the pain of doing it once might cause the idea to stick in my head so I just do it the right way on my next effort.
drakulaboy
Posts: 165
Joined: June 29th, 2014, 8:35 pm

Re: Battlelog Stats for BF4 (Will add support for BF3 + BFH)

Post by drakulaboy »

HelloAndGoodbye i saw that is possible to add top weapon and vehicle :sly: