It is currently April 23rd, 2024, 5:29 pm

World of Tanks Stats

RSS, ATOM and other feeds, GMail, Stocks, any information retrieved from the internet
SysMunky
Posts: 9
Joined: December 29th, 2012, 8:19 pm

World of Tanks Stats

Post by SysMunky »

After a bit of a struggle I've finally created a simple skin. Its sole purpose is to display a few stats from a given World of Tanks player profile. I created it just to learn a bit about using the web parser and such, but I believe it works, and looks semi decent. If anyone plays and wants some basic stats on their desktop, this should work. Otherwise, if anyone has any thoughts for improvement, I'd be happy to hear thoughts.

Future plans include making it configurable so that users can select what stats they want to see, as well as an easy way for users to easily change fonts, font colors, an easily change the profile URL.

Code:
[RainMeter]
Author=SysMunky
Update=1000
DynamicWindowSize=1
BackgroundMode=2
SolidColor=0,0,0,150

[Metadata]
Name=WoTStats
Description=Shows total battles, Wins, tanks destroyed, and accuracy
Instructions= Edit the skin and replace the marked variable, vURL with the address of your WoT profile page.| Click the World of Tanks icon to open the full profile page.
Version=1.0
License=Creative Commons By-NC-SA 3.0


;-------------------------------------------------------------------
;Change The address following vURL= to the link to your profile.
;Unless you want to see my poor stats
;-------------------------------------------------------------------

[Variables]
vURL="http://worldoftanks.com/community/accounts/1000518504-SysMunky/"


;Styles

[sText]
FontColor=222,255,227,255
FontFace=Segoe UI
FontSize=8
AntiAlias=1

[sTitle]
FontColor=0,255,0,255
FontFace=Segoe UI
FontSize=9
AntiAlias=1


;Parse the site

[mParent]
Measure=Plugin
Plugin=WebParser
Debug=1
URL=#vURL#
RegExp="(?siU)td-number-nowidth">(.*)</td>.*td-number-nowidth">(.*)</td>.*td-number-nowidth.*td-number-nowidth.*td-number-nowidth">(.*)</td>.*td-number-nowidth">.*td-number-nowidth">(.*)</td>


;Measures to get strings for each item displayed


;Battles participated
[mBattles]
Measure=Plugin
Plugin=WebParser
URL=[mParent]
StringIndex=1

;Total Wins
[mWins]
Measure=Plugin
Plugin=WebParser
URL=[mParent]
StringIndex=2

;Total Destroyed
[mDestroyed]
Measure=Plugin
Plugin=WebParser
URL=[mParent]
StringIndex=3

;Hit Percentage
[mHits]
Measure=Plugin
Plugin=WebParser
URL=[mParent]
StringIndex=4

;--------------------
;Displays
;--------------------


[mLogo]
Meter=Image
ImageName=wot.png
LeftmouseUpAction=!Execute [#vURL#]

[mTitle]
Meter=String
MeterStyle=sTitle
X=30
Y=5
Text="World of Tanks Stats"


;Battles Participated
[MeterBatPartLbl]
Meter=String
MeterStyle=sText
X=5
Y=30
Text="Battles:"

[metBatPart]
Meter=String
Y=0r
X=65r
MeterStyle=sText
MeasureName=mBattles



;Wins
[meterWinslbl
Meter=String
MeterStyle=sText
X=5
Y=15r
Text="Wins:"

[metWinsDisp]
Meter=String
X=65r
Y=0r
MeterStyle=sText
MeasureName=mWins



;Destroyed
[MeterDestroyedLbl]
Meter=String
MeterStyle=sText
X=5
Y=15r
Text="Destroyed:"

[metDestroyedDisp]
Meter=String
MeterStyle=sText
x=65r
Y=0r
MeasureName=mDestroyed



;Hits
[metHitsLbl]
Meter=String
MeterStyle=sText
X=5
Y=15r
Text="Hit %:"

[metHitDisp]
Meter=String
MeterStyle=sText
X=65r
Y=0r
MeasureName=mHits
Thanks for any thoughts anyone has!
You do not have the required permissions to view the files attached to this post.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 5406
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: World of Tanks Stats

Post by eclectic-tech »

Nice work!

I usually turn off AntiAliasing just because I like "crisp" fonts (totally personal preference!) ;-)

One tip, when you post code, use the "" tags to surround it, looks much better on the posts.

Thanks for sharing!
SysMunky
Posts: 9
Joined: December 29th, 2012, 8:19 pm

Re: World of Tanks Stats

Post by SysMunky »

I definitely agree with your preference to AntiAlias=0 now that I have tried it. I hadn't really given it much thought beforehand. Also, in future posts I'll be sure to use the code tags, I was more or less posting the code in case anyone wanted to view it without having to install the skin, while at the same time trying to avoid a wall of text. Thanks for the input!
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: World of Tanks Stats

Post by Seahorse »

Made one ages ago complete with a launcher, it's been through a number of iterations, mostly because they change the underlying HTML on your stats page every few months. Feel free to tear it apart ;-) Oh, and they removed the server status from the Wiki so that doesn't work any more.

Nice to see another player here though... 8-)
I must update the screenshot, I have a few more battles under my belt these days...
Capture.PNG
You do not have the required permissions to view the files attached to this post.
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

SysMunky
Posts: 9
Joined: December 29th, 2012, 8:19 pm

Re: World of Tanks Stats

Post by SysMunky »

I definitely like the look of yours much more than mine. I'll definitely be studying yours though, since I had a hard time figuring out RegExp stuff, and seeing how you did it will likely increase my understanding greatly.
User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: World of Tanks Stats

Post by Seahorse »

No worries have fun... :sly:
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt

User avatar
Seahorse
Posts: 1175
Joined: June 9th, 2010, 5:56 pm
Location: Locks heath, UK

Re: World of Tanks Stats

Post by Seahorse »

posted in wrong thread...
"Regrettably your planet is one of those scheduled for demolition"
Mike

My Skins at DeviantArt