Fix for 6.8.1 mastery changes#46
Open
michaellavoie wants to merge 3 commits intomaxdeviant:masterfrom
Open
Conversation
…d the format of the mastery.json file. "Tree" field must now be parsed from a new location. Also updated masteries.json to latest version adn updated coordinates.json for new/moved masteries
…on file in the future. Download the free tool https://www.linqpad.net/ to run these 3 scripts. 1) DownloadMasteryJson.linq - this will download the latest version of the masteries.json file. Usefule if the mastery file is updated by riot 2) CoordinatesGenerator.linq - this file will re-build the coordinates.json file for you based on the 2 bmp images you provide. Take 2 screenshots of the lol app, one on the mastery editing page and one in the champ select mastery editing page. Trim them down to 1280x800 file size (the default size of the app), then use a single pixel pencil tool with the color Green (red:0 green:255 blue:0, 00FF00) and mark a dot in the upper left corner of every mastery (they don't have to be perfectly on the corner, just close). Save as a bmp and then run this script to re-generate the coordinates.json file. 3) ValidateCoordinatesJson.linq - Utility for validating the current mastery.json file and coordinates file look correct. Only needed if you need debugging help
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hey I've enjoyed this app but noticed it stopped working since LOL 6.8.1 moved a few masteries around and changed their static data mastery.json file format a bit.
Code Changes
I saw the format for how the Mastery.Tree variable provided changed in the new mastery.json file so i updated the ChampionGG.vb to parse it from the new location.
Data/Json Changes
I also updated the masteries.json (called mastery.json now on the lol static data page) to the latest version and also updated coordinates.json file for the new mastery button locations.
Internal Utilities
Updating coordinates is a pain in the butt so i also added a "Json Utilities" folder with 3 linqpad scripts (linqpad is a free lightweight version of visual studio and is nice for small utility scripts). The big one "CoordinatesGenerator.linq" will automatically generate the coordinates.json file based off 2 bmp screenshot files (mastery page and champ select mastery page) as long as they are 1280x800 and you use a single pixel green dot to mark the upper left of each mastery icon (i've included example bmp that i used). My hope is if Riot keeps tweaking the mastery layout this will make it easier to keep up.
I'd be happy to go back and forth on the changes if there's anything you want to discuss further.
Best wishes,
-platy