Just a short post on this, but CLG finally managed to actually win something for the first time in forever. An emotional day for all CLG fans for sure (HotshotGG shedding a tear in the post-match interview sure tugged at my heartstrings). Well played from the whole team, now I just hope it lasts and they don’t immediately crumble again.

On the other side of the Atlantic we also saw some great games between OG and Fnatic. 5 games, an eventual Fnatic victory and a pentakill for Rekkles; I don’t think it could have been better if it was scripted by Riot. Some fantastic games all around. Hopefully worlds will also deliver some great games, and hopefully the LCS teams will put up a good fight (ZionSpartan claiming they had a good chance to win worlds was a bit of a joke, no LCS team will win) but maybe, just maybe the stars will align and we’ll at least see on or two western teams in the semifinals. That would be nice. Though with so many strong Chinese and Korean teams in the mix this time it doesn’t look too promising.

facebooktwittergoogle_plusredditpinterestlinkedinmail

Today was a tragic day for hope and freedom and all things good. Today the plucky team of rebels from Team Liquid were defeated in brutal fashion by the evil empire of TSM, lead to battle by their commander Darth Bjergerking. Hopes and dreams were smashed as the TSM juggernaut came crashing down, wiping out Team Liquid 3 games to 1. Ok, so this might not be a totally objective view of today’s events but nobody has ever accused me of being objective.

Perhaps the most heartbreaking thing about the games (for a massive TSM anti-fan like me) was the fact that TL actually got a large lead early in several games, only to lose a few crucial teamfights and proceed to get crushed in the late game. The first game in particular was simply painful to watch as it drew towards its inevitable conclusion. It is hard to fault individual players on TL for the loss either. Quas had a few missteps but was mostly solid. Piglet and Xpecial performed well. IWDominate has always been a volatile player and missing the smite on Baron to let WildTurtle steal it with the Jinx rocket was, well it wasn’t very good, but hardly his fault alone (the rocket should have been blocked by another player). Fenix didn’t look great when he wasn’t playing on Azir (in the one game that they did win) but he didn’t do much wrong either. It was just down to simply better teamfighting by TSM, something they’ve been famous for in the NA scene for pretty much forever.

Unfortunately I expect the NA LCS grand finals to go much the same way as these games. CLG will likely take early leads and then get crushed in teamfights in the mid and late game, perhaps even to a greater degree than TL did. CLG might pick up one game if they can snowball hard but that might be it. I wonder if CLG will be more willing to pick away the Jinx from WildTurtle, since it looks like that might be his one good ADC pick this time around. Hopefully we’ll get to see some good games regardless of who wins.

facebooktwittergoogle_plusredditpinterestlinkedinmail

Countered Logic

In what can only be described as “a complete and utter reversal of historical trends and expectations”, CLG has finally managed to not look like garbage in the post season. This comes from a huge CLG fan who’s been rooting for them for over 3 years at this point, only to be disappointed by them in predictable fashion time and again. It would seem that this proves that CLG has finally managed to replace its weak Link (seriously though, even Mr. Inconsistent himself, the notorious P.O.B., Pobelter, has looked far more solid in playoffs so far than Link ever did).

The big question mark for me coming into this was whether Xmithie would perform, and to my surprise he actually did. I mean, it’s not like he carried the team or anything but he didn’t play Evelynn and feed 10 kills to the enemy team, so I’d say that’s a big win. While he clearly still has some champion pool issues (he played Ekko in all three games), his performance was good enough to not drag his team down. Given the fact that all three lanes are capable of being threats on their own, frankly this is really all that he needs to do.

Speaking of threats, ZionSpartan played phenomenally from the top lane. It helps that the current meta favours his more carry-oriented playstyle but still going toe-to-toe with a worldclass Korean toplaner like Impact shows massive skill. People sometimes overrate ZionSpartan a bit, simply because he plays a less supportive and more carry style, but there is no doubt that he stepped up big this series.

In the botlane Doublelift once again performed well. That was to be expected though, especially because this is the best chance LiftLift has had in a long time to finally lift a trophy. Of course that means beating the winner of TL vs TSM, something that I would still categorize as “highly unlikely, with a side of very improbable”. He still went a little very hyphee on Tristana a few times, but it mostly worked out in this instance, so I’ll chalk it up as being “totally calculated”.

Somewhat disappointing this series was LiftLift’s botlane co-star: Aphromoo. Not that he played poorly or anything, I think it is more that I’m so used to seeing him carrying CLG past the finish line kicking and screaming, that anything less is a bit of a disappointment. That might just be down to the rest of the team stepping up though, reducing the need for him to make mad playz and hard carry. Overall Rush Hour performed about as well as would be expected from CLG, one of the teams absolutely famous for their botlane-centric play. This makes it even more puzzling that TiP would opt to play heavily botlane focused compositions in all three games, but hey, I ain’t complaining. I’m just happy to see my favourite team in the LCS finals for a change.

Now if only Team Liquid can defeat the evil empire of TSM tomorrow I will be very pleased. Either way the finals at Madison Square Garden should be legen-wait-for-it-dary.

facebooktwittergoogle_plusredditpinterestlinkedinmail

I’ve decided to write a series of posts outlining some of the techniques I used in creating LoLTool. These will mostly focus on explaining some of the reverse-engineering of the League of Legends client required to make stuff work. This first post will explain how I get the item data used to display items in the Recommended Items Editor (RIE).

This particular piece of code recently underwent some major changes due to Riot changing the client (thanks Rito!). For context the way I initially got the data was through reading the SQLite database file called “gameStats_en_US.sqlite” that comes with the LoL client. This contained a table with all the items and various attributes (like cost and the description). This worked great for the most part but after one of the recent patches this data was no longer included (the database file still exists and still contains a table for items but the table is simply empty).

With the previous source of data no longer available I began searching for other sources. Some item data is included in a file called “ItemDataPack.swf” in JSON format, but this was incomplete and not good enough for my purposes. I considered creating my own database file and distributing it with LoLTool but this would mean after every patch I would have to manually update this file. This would be a lot of extra work for me and if I happened to be busy at the time it might mean that item information isn’t updated for a few weeks after a patch. Not a good solution.

While stuck with this I decided to take a look to see if I could extract the data I needed using the official Riot API. I had already been looking at the this for a potential player statistics plugin for LoLTool so I had some idea of what it could do. It turned out that getting the item data was actually very easy, the only small hindrance being that it came in JSON format. I had previously decoded JSON using the .NET built-in JSON deserialization library but this requires writing a custom deserializer for every bit of JSON you want to process. It works sure, but it isn’t fun. This is when I stumbled upon the NewtonSoft Json.NET library. Wow, what a difference a good library makes! I went from being annoyed at JSON to loving it in no time. With Json.NET all it takes to decode a JSON object is creating a class with getter/setter methods for each of the JSON properties and a call to deserialize and you are done. It does all the magic work for you. You can even do a partial implementation and it will only decode those properties that you have created accessors for. So if you find yourself working with JSON in C# I wholeheartedly recommend using the Json.NET library to do so, it will make your life much easier. Seriously, after downloading the JSON code all that is required to parse it are the following lines of code:

JObject jo = JObject.Parse( json );
JToken itemData = jo["data"];
Dictionary<int, JItem> itemsDict = JsonConvert.DeserializeObject<Dictionary<int, JItem>>(itemData.ToString());
foreach( JItem ji in itemsDict.Values )
{
    if( ji.Gold.Purchasable )
         items.Add( ji );
}

Where JItem is just a class I created with accessor properties matching the names of the properties in the item JSON (found in the Riot API documentation). Easy.

The next thing I did was to update the category filters (the checkboxes found in the Recommended Items Editor) to be automatically generated from the tags attribute found in the items data. After this was done a problem remained: there were a bunch of items that shouldn’t be there like Attack Upgrade I, Attack Upgrade II and so on. Yeah, the Blackmarket Brawler items and brawler upgrades (though this was before this mode was released, so I was a little confused at first). While some of these were tagged correctly as Blackmarket Brawler items, most were not (thanks Rito!). So I had to manually go through and identify all of these special items and include them in a special exclusion list that is used to filter these items out. For now this is hardcoded into the program, although I might turn this into some sort of text file (XML, or maybe CSV) in the future so it can be updated without recompiling the core program.

The last problem that I had to overcome was that the image names included with the item data didn’t always match the image names of the items that I was using (extracted from “ImagePack_items.swf” – the topic of a future Inside LoLTool discussion). 80-90% of items had the correct images after using some fuzzy matching but a few were still completely wrong (once again, thanks Rito!). Pretty much all the jungling items were wrong, several boot enchants, the Doran’s items were wrong and a few others like Void Staff. To fix these I extracted the images from the SWF file and then went through manually matching each item with the correct image. For each item that needed to be changed a replacement rule was hardcoded in to use the correct image name instead of the one supplied through the Riot API. Of course this means that the next time Riot decide to make sweeping changes to itemization it is likely that I’ll have to go back in and update some of these replacement rules (again, these should probably be moved to some sort of text data file that can be easily updated without recompilation).

Hopefully this post will give you some insights into what goes into making LoLTool work under the hood.

facebooktwittergoogle_plusredditpinterestlinkedinmail

The latest update for LoLTool is now live and if you run the launcher it should download and install it automatically. Some details follow below.

So Riot ships a SQLite database with the League client that used to contain all the item data (names, descriptions, cost, etc…) needed to make the whole recommended item editor work. Then, for some reason, they removed all of that data. Presumably they updated how the client gets the data internally and didn’t want to maintain a duplicate copy of the data. Fair enough, but a giant pain for me. It’s probably all in the game client data somewhere, but I never managed to decode those files. So I’ve switched to using the Riot API instead. All the item data can be retrieved from the Riot servers and supposedly this does not count against the rate limit for Riot API requests with a developer key. Hopefully this works for everyone; as per usual my testing is limited to my personal dev machine. If things are broken for you make sure you email me and let me know so that I can investigate. Thank you all, and good luck out on the Rift!

facebooktwittergoogle_plusredditpinterestlinkedinmail

Hello everyone! We are back online after a long absence.

So what happened? Well, first up the previous site got hacked. Ok, that was my bad. Turns out ignoring constant nags to update the site with security updates for several years is really not a good idea. Who woulda thunk? Yeah that was lazy. At the time when I found out that the site was offline I was just ending the final stretch of my Master’s degree and simply didn’t have the time to invest in fixing the site.

Then Riot went ahead and removed all the item data from the database that comes with the game, so now I had to figure out a new way to get item data or else the recommended item editor would be completely useless. That meant more time invested.

Now I’ve finished my Master’s so I have a little time to invest back into this project. A fix for getting the item data is also complete, so LoLTool should be working with all the previous functionality. It should be up on the site shortly.

As to future updates… I will try to keep everything working when Riot breaks things, and I may add some more functionality at some point but the amount of time I can invest in this is rather limited, especially given that it costs me far more to host the site than it makes in advertising revenue, let alone being in way profitable. So I’ll only be working on it in my spare time and when I feel like it.

facebooktwittergoogle_plusredditpinterestlinkedinmail