mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-04-18 21:20:55 -05:00
all weapon params in dicts
This commit is contained in:
parent
07409ec5f2
commit
368dabdb2d
|
|
@ -110,7 +110,7 @@ export default function useAbilityEffects(build: Partial<Build>) {
|
|||
})
|
||||
}
|
||||
|
||||
const mInkConsumeRepeat = buildWeaponData.mInkConsumeRepeat
|
||||
const mInkConsumeRepeat = buildWeaponData.mInkConsume_Repeat
|
||||
if (mInkConsumeRepeat && mInkConsumeRepeat !== mInkConsume) {
|
||||
toReturn.push({
|
||||
title: "Shots per ink tank (autofire mode)",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -6,6 +6,10 @@ import glob
|
|||
|
||||
with open("lang_dict_EUen.json") as f:
|
||||
lang_dict = json.load(f)
|
||||
lang_dict["BombPointSensor"] = "Point Sensor"
|
||||
lang_dict["BombPoisonFog"] = "Toxic Mist"
|
||||
lang_dict["Gachihoko"] = "Rainmaker"
|
||||
lang_dict["JumpBeacon"] = "Squid Beakon"
|
||||
|
||||
inverted_dict = {v: k for k, v in lang_dict.items()} # english -> internal
|
||||
|
||||
|
|
@ -78,117 +82,77 @@ with open(abs_file_path) as f:
|
|||
weapon_obj["mInkConsume"] = mInkConsume
|
||||
weapon_dict[lang_dict[weapon_obj["Name"]]] = weapon_obj
|
||||
|
||||
special_power_keys = {
|
||||
"mBurst_PaintR": "Paint Radius", # missiles
|
||||
"mTargetInCircleRadius": "Circle Radius", # missiles
|
||||
"mEnergyAbsorbFrm": "Armor Wind Up Time", # armor
|
||||
"mPaintGauge_SpecialFrm": "Special Duration Time", # generic duration
|
||||
"mBurst_SplashPaintR": "Splash Paint Radius", # inkjet
|
||||
"mBurst_SplashVelL": "Splash Velocity L",
|
||||
"mBurst_SplashVelH": "Splash Velocity H",
|
||||
# "mBurst_Landing_AddHeight": "Additional High", unused probably splashdown values
|
||||
# "mBurst_Landing_AddHeight_SJ": "Additional High (Super Jump)",
|
||||
"mRainAreaFrame": "Rain Duration", # ink storm
|
||||
"mBurst_Radius_Near": "Explosion Radius (Near)",
|
||||
"mBurst_Radius_Middle": "Explosion Radius (Middle)",
|
||||
# "mBurst_Radius_Near": "Explosion Radius (Near)", # baller commented out because currently unchanged by SPU
|
||||
"mHP": "HP", # baller
|
||||
"mBombCoreRadiusRate": "Bubble Size Radius Rate", # bubble blower
|
||||
"mCollisionPlayerRadiusMax": "Explosion Effect Radius", # bubble blower
|
||||
"mChargeRtAutoIncr": "Booyah Charge Speed", # booyah charge speed
|
||||
}
|
||||
|
||||
sub_power_keys = [
|
||||
"mPeriod",
|
||||
"mMarking",
|
||||
"mPlayerColRadius",
|
||||
"mMaxHp",
|
||||
"mSubRt_Effect_ActualCnt_",
|
||||
]
|
||||
def what_to_append(weapon_internal):
|
||||
if "_Stand" in weapon_internal:
|
||||
return "_Stand"
|
||||
|
||||
if "_Jump" in weapon_internal:
|
||||
return "_Jump"
|
||||
|
||||
if "_2" in weapon_internal:
|
||||
return "_2"
|
||||
|
||||
if "Repeat" in weapon_internal:
|
||||
return "_Repeat"
|
||||
|
||||
if "_Burst" in weapon_internal:
|
||||
return "_Burst"
|
||||
|
||||
return ""
|
||||
|
||||
sub_internal_english = {
|
||||
"JumpBeacon": "Squid Beakon",
|
||||
"Shield": "Splash Wall",
|
||||
"Trap": "Ink Mine",
|
||||
"BombPointSensor": "Point Sensor",
|
||||
"Sprinkler": "Sprinkler",
|
||||
}
|
||||
|
||||
rel_path = "leanny.github.io/data/Parameter/latest/WeaponBullet/*.json"
|
||||
abs_file_path = os.path.join(script_dir, rel_path)
|
||||
for filepath in glob.iglob(abs_file_path): # iterate through .json files
|
||||
is_bomb = False
|
||||
if "Bomb" in filepath and "Launcher" not in filepath:
|
||||
is_bomb = True
|
||||
with open(filepath) as f:
|
||||
data = json.loads(f.read())
|
||||
weapon_internal = (
|
||||
filepath.replace(
|
||||
"leanny.github.io/data/Parameter/latest/WeaponBullet\\", ""
|
||||
)
|
||||
.replace(".json", "")
|
||||
.replace("_2", "")
|
||||
).replace(".json", "")
|
||||
# .replace("_2", "")
|
||||
)
|
||||
for key in data["param"]:
|
||||
if (
|
||||
"InkConsume" in key
|
||||
and "Coop" not in key
|
||||
and "Rival" not in key
|
||||
and "Tutorial" not in key
|
||||
and "LastBoss" not in key
|
||||
and "Enemy" not in key
|
||||
and "Mission" not in key
|
||||
and key != "mInkConsumeRate" # toxic mist
|
||||
and key != "mSideStepInkConsumeScale" # toxic mist
|
||||
and key
|
||||
!= "mMaxChargeInkConsume" # used to calculate how much charger consumes if shot mid-charge
|
||||
and "mInkConsumeCore" # comment out to include roller rolling
|
||||
not in key
|
||||
and not is_bomb
|
||||
):
|
||||
toAppend = what_to_append(weapon_internal)
|
||||
|
||||
append_to_key = ""
|
||||
weapon_internal = (
|
||||
weapon_internal.replace("_2", "")
|
||||
.replace("Repeat", "")
|
||||
.replace("_Stand", "")
|
||||
.replace("_Jump", "")
|
||||
.replace("_Burst", "")
|
||||
)
|
||||
|
||||
if "_Stand" in weapon_internal:
|
||||
append_to_key = "Stand"
|
||||
weapon_internal = weapon_internal.replace("_Stand", "")
|
||||
if "Launcher" in weapon_internal and "Bomb" in weapon_internal:
|
||||
weapon_internal = "Launcher" + weapon_internal.replace(
|
||||
"Launcher", ""
|
||||
).replace("Bomb", "")
|
||||
|
||||
if "_Jump" in weapon_internal:
|
||||
append_to_key = "Jump"
|
||||
weapon_internal = weapon_internal.replace("_Jump", "")
|
||||
data = json.loads(f.read())
|
||||
data = data["param"]
|
||||
|
||||
if "Repeat" in weapon_internal:
|
||||
append_to_key = "Repeat"
|
||||
weapon_internal = weapon_internal.replace("Repeat", "")
|
||||
if toAppend != "":
|
||||
new_data = {}
|
||||
for key, value in data.items():
|
||||
new_data[f"{key}{toAppend}"] = value
|
||||
|
||||
for englishWeapon, wDict in weapon_dict.items():
|
||||
if weapon_internal in wDict["Name"].replace("_", ""):
|
||||
wDict[f"{key}{append_to_key}"] = data["param"][key]
|
||||
data = new_data
|
||||
|
||||
for SPU_key in special_power_keys:
|
||||
if (
|
||||
SPU_key in key
|
||||
and weapon_internal != "Gachihoko"
|
||||
and weapon_internal != "Trap"
|
||||
and weapon_internal != "Cannon"
|
||||
and not is_bomb
|
||||
):
|
||||
if "Launcher" in weapon_internal:
|
||||
weapon_internal = "Launcher" + weapon_internal.replace(
|
||||
"Bomb", ""
|
||||
).replace("Launcher", "")
|
||||
translated_special = lang_dict[weapon_internal]
|
||||
did_thing = False
|
||||
for english_weapon, wDict in weapon_dict.items():
|
||||
if weapon_internal in wDict["Name"].replace("_", ""):
|
||||
weapon_dict[english_weapon] = {**wDict, **data}
|
||||
did_thing = True
|
||||
|
||||
obj = weapon_dict.get(translated_special, {"Name": weapon_internal})
|
||||
obj[key] = data["param"][key]
|
||||
weapon_dict[translated_special] = obj
|
||||
if not did_thing:
|
||||
english = lang_dict.get(weapon_internal, None)
|
||||
if english:
|
||||
weapon_dict[english] = {**data, "Name": english}
|
||||
did_thing = True
|
||||
|
||||
for BRU_key in sub_power_keys:
|
||||
if BRU_key in key and weapon_internal in sub_internal_english.keys():
|
||||
translated_sub = sub_internal_english[weapon_internal]
|
||||
obj = weapon_dict.get(translated_sub, {"Name": weapon_internal})
|
||||
obj[key] = data["param"][key]
|
||||
weapon_dict[translated_sub] = obj
|
||||
values_to_skip = ["BombChase", "ShooterQuickLong", "SuperLaser"]
|
||||
if not did_thing:
|
||||
if weapon_internal not in values_to_skip:
|
||||
raise ValueError(weapon_internal)
|
||||
|
||||
|
||||
with open("ability_jsons_output/ability_data.json", "w") as fp:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user