Closed TrentWest7190 closed 6 years ago
That's awesome. Do you still have the script you used to scrape the data? If so, I could integrate that into the API's own scraping process, to get up to date information.
It's uh... Really, really ugly and probably super, super unreadable (since I made it thinking that nobody else would ever see it, lol). It also uses an id system that I made myself with hardcoded start and end values, so it may not be super usable for you. The important part is just the getSharpnessData
function which is where it actually does the scraping part.
I would offer to throw up a PR trying to integrate this scraper into the existing codebase, but unfortunately I have 0 PHP experience, sorry! 😢
Thanks! That'll be very helpful for integrating the data into the API.
@TrentWest7190 Question for you. I was going over the script you used, and I noticed that you're getting the sharpness hit count by taking the width of the individual sharpness color bars, and dividing it by 0.4. How did you determine that was the ratio for the bar width to hit count? Was it just trial and error, or was there more to it?
It was a bit of trial and error and also just some logic. By in-game testing combined with the description of the handicraft skill, we know that each level of handicraft adds 10 hits to the weapon's sharpness. 10 is also the smallest possible sliver of sharpness that a level of sharpness can have (i.e. there is no weapon with only 5 hits of blue sharpness, etc). By comparing in-game testing to the length of the bars on the Japanese wiki I found that these 10 hits of sharpness correlated to a css width of 4px. From there it was just calculating the ratio of pixels to sharpness hits, which happened to be 0.4. After finding that out, I checked a couple of weapons out in-game to double-check, and it was accurate for every weapon I tried out.
Gotcha, I appreciate the explanation. I just wanted to make sure I understood the data before I started work on adding it to the API.
I have the exact values for each weapon for each level of sharpness.
Here
Sorry it isn't organized better, I did this like half a year ago at this point when the game first came out, so it's also going to be missing any of the weapons that were added after the game's release (deviljho and onwards).
I can guarantee that these values are the true number of attacks per sharpness level though, done by scraping data from a japanese wiki and cross-referencing with in-game testing.
At one point I was going to try to make an api, but I got way too lazy, so hopefully you can use this info better than I could.