Update to 1.20.3 with item api
This commit is contained in:
parent
bd09cd23e1
commit
ad5c3529ec
61 changed files with 61936 additions and 118077 deletions
95795
clean.json
95795
clean.json
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -57,11 +57,6 @@
|
||||||
prepowder (true)
|
prepowder (true)
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<button class = "button-narrow" id = "strDexToggle" onclick = "toggleStrDex()">
|
|
||||||
1.20.3 (false)
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<p id="info">
|
<p id="info">
|
||||||
|
|
22
dps_vis.js
22
dps_vis.js
|
@ -148,14 +148,11 @@ function showDetails(data, i, xfunc, yfunc) {
|
||||||
let texts = [[1, i[0]],
|
let texts = [[1, i[0]],
|
||||||
[3, "Prepowder: "+i[4].toFixed(2)],
|
[3, "Prepowder: "+i[4].toFixed(2)],
|
||||||
[4, "Postpowder: "+i[5].toFixed(2)],
|
[4, "Postpowder: "+i[5].toFixed(2)],
|
||||||
[5, "Prepowder (1.20.3): "+i[6].toFixed(2)],
|
[6, "Design Modifier: "+i[7].toFixed(2)],
|
||||||
[6, "Postpowder (1.20.3): "+i[7].toFixed(2)],
|
[7, "Explained D. Mod: "+i[6].toFixed(2)]];
|
||||||
[7, "Prepowder drop: "+((i[4]-i[6])/i[4]*100).toFixed(2) + "%"],
|
let idx = 8;
|
||||||
[8, "Postpowder drop: "+((i[5]-i[7])/i[5]*100).toFixed(2) + "%"],
|
console.log(i);
|
||||||
[10, "Design Modifier: "+i[9].toFixed(2)],
|
for (const explanation of i[8]) {
|
||||||
[11, "Explained D. Mod: "+i[8].toFixed(2)]];
|
|
||||||
let idx = 12;
|
|
||||||
for (const explanation of i[10]) {
|
|
||||||
texts.push([idx, explanation[0] + ": " + explanation[1]]);
|
texts.push([idx, explanation[0] + ": " + explanation[1]]);
|
||||||
idx += 1;
|
idx += 1;
|
||||||
}
|
}
|
||||||
|
@ -279,12 +276,3 @@ function togglePowder() {
|
||||||
setGetterFunc();
|
setGetterFunc();
|
||||||
redraw(current_data);
|
redraw(current_data);
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleStrDex() {
|
|
||||||
strDex = !strDex;
|
|
||||||
if (strDex) baseline_y = dps_data.baseline_ys_new
|
|
||||||
else baseline_y = dps_data.baseline_ys
|
|
||||||
d3.select("#strDexToggle").text("1.20.3 ("+strDex+")");
|
|
||||||
setGetterFunc();
|
|
||||||
redraw(current_data);
|
|
||||||
}
|
|
||||||
|
|
29570
ingreds.json
29570
ingreds.json
File diff suppressed because one or more lines are too long
54578
ingreds_clean.json
54578
ingreds_clean.json
File diff suppressed because it is too large
Load diff
File diff suppressed because one or more lines are too long
|
@ -15,6 +15,7 @@ baselines_known_y = np.array([ 341.53, 383.35, 432.14, 480.93, 536.69, 592.45, 6
|
||||||
baselines_known_y_new = np.zeros(len(baselines_known_x))
|
baselines_known_y_new = np.zeros(len(baselines_known_x))
|
||||||
for i, (x, y) in enumerate(zip(baselines_known_x, baselines_known_y)):
|
for i, (x, y) in enumerate(zip(baselines_known_x, baselines_known_y)):
|
||||||
baselines_known_y_new[i] = y * (1 - 0.01 * (x - 70))
|
baselines_known_y_new[i] = y * (1 - 0.01 * (x - 70))
|
||||||
|
baselines_known_y = baselines_known_y_new
|
||||||
|
|
||||||
def interpolate_baseline(level):
|
def interpolate_baseline(level):
|
||||||
i = 0
|
i = 0
|
||||||
|
@ -54,8 +55,8 @@ def get_display_name(item):
|
||||||
return item["name"]
|
return item["name"]
|
||||||
item_data = json.load(open(items_file))["items"]
|
item_data = json.load(open(items_file))["items"]
|
||||||
item_map = {get_display_name(item): item for item in item_data}
|
item_map = {get_display_name(item): item for item in item_data}
|
||||||
item_new_data = json.load(open(items_new_file))["items"]
|
#item_new_data = json.load(open(items_new_file))["items"]
|
||||||
item_new_map = {get_display_name(item): item for item in item_new_data}
|
#item_new_map = {get_display_name(item): item for item in item_new_data}
|
||||||
|
|
||||||
attack_speed_mods = {"SUPER_SLOW": 0.51, "VERY_SLOW": 0.83, "SLOW": 1.5, "NORMAL": 2.05, "FAST": 2.5, "VERY_FAST": 3.1, "SUPER_FAST": 4.3}
|
attack_speed_mods = {"SUPER_SLOW": 0.51, "VERY_SLOW": 0.83, "SLOW": 1.5, "NORMAL": 2.05, "FAST": 2.5, "VERY_FAST": 3.1, "SUPER_FAST": 4.3}
|
||||||
attack_speed_target_mult = {"SUPER_SLOW": 4, "VERY_SLOW": 2.5, "SLOW": 1.4, "NORMAL": 1, "FAST": 0.8, "VERY_FAST": 0.66, "SUPER_FAST": 0.48}
|
attack_speed_target_mult = {"SUPER_SLOW": 4, "VERY_SLOW": 2.5, "SLOW": 1.4, "NORMAL": 1, "FAST": 0.8, "VERY_FAST": 0.66, "SUPER_FAST": 0.48}
|
||||||
|
@ -162,16 +163,15 @@ for name, item in item_map.items():
|
||||||
continue
|
continue
|
||||||
if item["lvl"] >= min_level and item["category"] == "weapon":
|
if item["lvl"] >= min_level and item["category"] == "weapon":
|
||||||
dps, postpowder_dps = get_data(item, powders_old)
|
dps, postpowder_dps = get_data(item, powders_old)
|
||||||
new_item = item_new_map[name]
|
# new_item = item_new_map[name]
|
||||||
new_dps, new_postpowder_dps = get_data(new_item, powders_new)
|
# new_dps, new_postpowder_dps = get_data(new_item, powders_new)
|
||||||
total, actual, explain = guess_design_modifier(item, dps)
|
total, actual, explain = guess_design_modifier(item, dps)
|
||||||
item_dat[item["type"]].append((get_display_name(item), item["lvl"], item["id"], item["tier"],
|
item_dat[item["type"]].append((get_display_name(item), item["lvl"], item["id"], item["tier"],
|
||||||
dps, postpowder_dps,
|
dps, postpowder_dps,
|
||||||
new_dps, new_postpowder_dps,
|
|
||||||
total, actual, explain))
|
total, actual, explain))
|
||||||
item_dat["baseline_xs"] = baselines_known_x.tolist()
|
item_dat["baseline_xs"] = baselines_known_x.tolist()
|
||||||
item_dat["baseline_ys"] = baselines_known_y.tolist()
|
item_dat["baseline_ys"] = baselines_known_y.tolist()
|
||||||
item_dat["baseline_ys_new"] = baselines_known_y_new.tolist()
|
#item_dat["baseline_ys_new"] = baselines_known_y_new.tolist()
|
||||||
json.dump(item_dat, open("dps_data.json", "w"), indent=2)
|
json.dump(item_dat, open("dps_data.json", "w"), indent=2)
|
||||||
json.dump(item_dat, open("dps_data_compress.json", "w"))
|
json.dump(item_dat, open("dps_data_compress.json", "w"))
|
||||||
# item_lvl, item_dps, item_tiercolor = zip(*item_dat)
|
# item_lvl, item_dps, item_tiercolor = zip(*item_dat)
|
||||||
|
|
|
@ -149,6 +149,10 @@ for item in items:
|
||||||
if key in item:
|
if key in item:
|
||||||
del item[key]
|
del item[key]
|
||||||
|
|
||||||
|
for k in list(item.keys()):
|
||||||
|
if (item[k] == 0 or item[k] is None):
|
||||||
|
del item[k]
|
||||||
|
|
||||||
for k, v in translate_mappings.items():
|
for k, v in translate_mappings.items():
|
||||||
if k in item:
|
if k in item:
|
||||||
item[v] = item[k]
|
item[v] = item[k]
|
||||||
|
@ -163,9 +167,9 @@ for item in items:
|
||||||
if item["name"] in item_set_map:
|
if item["name"] in item_set_map:
|
||||||
item["set"] = item_set_map[item["name"]]
|
item["set"] = item_set_map[item["name"]]
|
||||||
|
|
||||||
with open("1_20_ci.json", "r") as ci_file:
|
#with open("1_20_ci.json", "r") as ci_file:
|
||||||
ci_items = json.load(ci_file)
|
# ci_items = json.load(ci_file)
|
||||||
items.extend(ci_items)
|
# items.extend(ci_items)
|
||||||
|
|
||||||
with open("id_map.json","w") as id_mapfile:
|
with open("id_map.json","w") as id_mapfile:
|
||||||
json.dump(id_map, id_mapfile, indent=2)
|
json.dump(id_map, id_mapfile, indent=2)
|
||||||
|
|
|
@ -40,19 +40,6 @@ for set_name, set_data in data["sets"].items():
|
||||||
for item_name in set_data["items"]:
|
for item_name in set_data["items"]:
|
||||||
item_set_map[item_name] = set_name
|
item_set_map[item_name] = set_name
|
||||||
|
|
||||||
must_mappings = [
|
|
||||||
"strength",
|
|
||||||
"dexterity",
|
|
||||||
"intelligence",
|
|
||||||
"agility",
|
|
||||||
"defense",
|
|
||||||
"strengthPoints",
|
|
||||||
"dexterityPoints",
|
|
||||||
"intelligencePoints",
|
|
||||||
"agilityPoints",
|
|
||||||
"defensePoints",
|
|
||||||
]
|
|
||||||
|
|
||||||
translate_mappings = {
|
translate_mappings = {
|
||||||
#"name": "name",
|
#"name": "name",
|
||||||
#"displayName": "displayName",
|
#"displayName": "displayName",
|
||||||
|
@ -178,7 +165,7 @@ for item in items:
|
||||||
del item[key]
|
del item[key]
|
||||||
|
|
||||||
for k in list(item.keys()):
|
for k in list(item.keys()):
|
||||||
if (item[k] == 0 or item[k] is None) and not k in must_mappings:
|
if (item[k] == 0 or item[k] is None):
|
||||||
del item[k]
|
del item[k]
|
||||||
|
|
||||||
for k, v in translate_mappings.items():
|
for k, v in translate_mappings.items():
|
||||||
|
|
Loading…
Reference in a new issue