feat: fetch ability tree and map data from Wynncraft API#516
Draft
DevScyu wants to merge 8 commits into
Draft
Conversation
Member
|
We never bothered using the API for the ability data as we can quite easily extract it from in-game which is often more updated than the API and we have more control over the format. Since no work has been done on needing the data it's currently very outdated and the parsing doesn't even work but I did fix it locally a few months ago and had a v2 of the json ShadowCat117@750d4a7 it just needed a mod update to implement it which I never did |
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.
Adds automation for ability tree data that was previously maintained manually.
update_ability_data.sh: fetches/ability/tree/{class}and/ability/map/{class}for each class, saves raw files, calls the existingmerge_abilities.sh, and produces a newReference/ability_map.jsonupdate_ability_data.yml: runs the above hourly/v3/classesresponse toReference/classes.jsonsince we fetch it anywaywynn-openapi.ymland a daily workflow to keep it in sync withdocs.wynncraft.comThe Wynncraft API has changed the structure of
/ability/tree/{class}. The generated files in this PR reflect the new format. The mod currently cannot consume them.Old format (what the mod expects):
{ "nodes": [{ "id": 1, "name": "Arrow Bomb", "description": ["§6..."], "location": {...}, "connections": [...] }], "archetypeInfoMap": { "Boltslinger": {...} } }New format (what the API now returns):
{ "archetypes": { "boltslinger": { "description": "<span ...>", "icon": {...} } }, "pages": { "1": { "arrowbomb": { "coordinates": {"x": 7, "y": 3}, "description": ["<span ...>"] } } } }What needs updating in the mod:
AbilityTreeInfo.java— currentlyrecord AbilityTreeInfo(List<AbilityTreeSkillNode> nodes), needs to reflectpages+archetypestop-level keysAbilityTreeSkillNode.java— fields likeid,formattedName,location,connectionsno longer exist; replaced by ability ID as map key,coordinates, HTMLdescriptionAbilityTreeModel.java— deserialisation type changes accordinglyAbilityTreeParser.javaandUnprocessedAbilityTreeInfo.java— downstream consumers that will need updatingDo not merge until the mod is updated to consume the new schema.