Closed skwallace36 closed 2 months ago
Yes, there is a way. The precise logic is here: https://github.com/wwylele/mhrice/blob/main/src/extract/gen_pedia.rs#L2966, but to put it in words:
Each weapon has a "tree"/"param" array in json. Each elements in this array represents a weapon and its position in the tree:
With these alone, you can assemble a weapon tree graph. Then you use other information in json to attach names, attack values and so on to each position using the weapon ID.
thank you so much for your response! I will give it a shot and let you know. I honestly think the json is so huge I was just struggling with getting a good picture of it.
was just able to plop your json into https://github.com/glideapps/quicktype and it worked very well... let's see how this goes
is there a way to build the weapon tree from the json on mhrice? I am struggling to figure this out exactly - just interested in building a UX for weapon trees similar to your website