Add skills.json parser & data

Build a lookup table to map from Id to string.
This commit is contained in:
2025-09-27 13:44:52 +02:00
parent bd96f1e0ac
commit 9e7d69f667
2 changed files with 1279 additions and 0 deletions

28
contrib/skills.py Normal file
View File

@@ -0,0 +1,28 @@
import json
import csv
import os
import sys
path = sys.argv[1] if len(sys.argv) >= 2 else "."
items = {}
item_patches = {
"tbk": {"class": "tome"},
"ibk": {"class": "tome"},
}
with open(os.path.join(path, "skills.json"), encoding="utf-8-sig") as f:
rows = json.load(f)
lookup_table = {}
for entry in rows:
key = entry["Key"]
text = entry["enUS"]
if len(text.strip()) == 0:
continue
lookup_table[key] = text
with open("skills.json", "w", newline="\n") as f:
json.dump(lookup_table, f, indent=4)
f.write("\n")

1251
d2warehouse/data/skills.json Normal file

File diff suppressed because it is too large Load Diff