added
This commit is contained in:
8
.idea/.gitignore
generated
vendored
Normal file
8
.idea/.gitignore
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
# 默认忽略的文件
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# 基于编辑器的 HTTP 客户端请求
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
8
.idea/B50_cal.iml
generated
Normal file
8
.idea/B50_cal.iml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
23
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
23
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
@@ -0,0 +1,23 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="DuplicatedCode" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
|
||||
<inspection_tool class="PyArgumentListInspection" enabled="true" level="INFORMATION" enabled_by_default="true" />
|
||||
<inspection_tool class="PyPep8NamingInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true">
|
||||
<option name="ignoredErrors">
|
||||
<list>
|
||||
<option value="N806" />
|
||||
<option value="N803" />
|
||||
<option value="N802" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
<inspection_tool class="PyUnresolvedReferencesInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ignoredIdentifiers">
|
||||
<list>
|
||||
<option value="pptx.enum.text.PP_ALIGN" />
|
||||
</list>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
6
.idea/inspectionProfiles/profiles_settings.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
4
.idea/misc.xml
generated
Normal file
4
.idea/misc.xml
generated
Normal file
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.11 (B50_cal)" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
8
.idea/modules.xml
generated
Normal file
8
.idea/modules.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/B50_cal.iml" filepath="$PROJECT_DIR$/.idea/B50_cal.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
6
.idea/vcs.xml
generated
Normal file
6
.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
6
Rate_SDJE.cmd
Normal file
6
Rate_SDJE.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
@echo off
|
||||
pushd %~dp0
|
||||
echo You need Python to run this program.
|
||||
echo Recommend using version 3.10.5 or higher.
|
||||
python Rate_SDJE.py
|
||||
cmd /k
|
||||
149
Rate_onlyBest50.py
Normal file
149
Rate_onlyBest50.py
Normal file
@@ -0,0 +1,149 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import json
|
||||
import os
|
||||
|
||||
|
||||
def calculate_multiplier(max_score):
|
||||
if max_score >= 990000:
|
||||
return 4
|
||||
elif max_score >= 980000:
|
||||
return 3.75
|
||||
elif max_score >= 970000:
|
||||
return 3.5
|
||||
elif max_score >= 960000:
|
||||
return 3.25
|
||||
elif max_score >= 950000:
|
||||
return 3
|
||||
elif max_score >= 940000:
|
||||
return 2.75
|
||||
elif max_score >= 920000:
|
||||
return 2.5
|
||||
elif max_score >= 900000:
|
||||
return 2
|
||||
elif max_score >= 850000:
|
||||
return 1.5
|
||||
elif max_score >= 800000:
|
||||
return 1
|
||||
elif max_score >= 700000:
|
||||
return 0.8
|
||||
elif max_score >= 600000:
|
||||
return 0.7
|
||||
elif max_score >= 500000:
|
||||
return 0.6
|
||||
elif max_score >= 400000:
|
||||
return 0.5
|
||||
elif max_score >= 300000:
|
||||
return 0.4
|
||||
elif max_score >= 200000:
|
||||
return 0.3
|
||||
elif max_score >= 100000:
|
||||
return 0.2
|
||||
elif max_score >= 1:
|
||||
return 0.1
|
||||
else:
|
||||
return 0
|
||||
|
||||
|
||||
def grade_to_name(grade):
|
||||
grade_names = {
|
||||
1: "NORMAL",
|
||||
2: "HARD",
|
||||
3: "EXPERT",
|
||||
4: "INFERNO"
|
||||
}
|
||||
return grade_names.get(grade, "Unknown Grade")
|
||||
|
||||
|
||||
def get_music_name(levels_dict, music_id):
|
||||
music_entry = levels_dict.get(music_id, {})
|
||||
return music_entry.get("name", "Unknown")
|
||||
|
||||
|
||||
print("")
|
||||
print("//////////////////////////////////////////////////////////////////////")
|
||||
print("")
|
||||
print("华卡音舞 Ver.3 3.50.00")
|
||||
print("全曲 Rate + Best 50 计算器")
|
||||
print("版本号 V0.03(1)")
|
||||
print("由WOAOL项目组制作")
|
||||
print("WACCA NEVER END")
|
||||
print("请注意,该版本计算器不区分B15和B35,仅计算全曲的Best50成绩,并使用V4的14定数表")
|
||||
print("该版本计算器为子版本,正常计算国服B50请不要用此计算器及其配套Table_output.json")
|
||||
print("")
|
||||
print("//////////////////////////////////////////////////////////////////////")
|
||||
print("")
|
||||
|
||||
if not os.path.isfile('Table_output_V4.json'):
|
||||
print("错误:找不到Table_output.json。")
|
||||
print("请将Rate_SDJE.py、Table_output_V4.json、playLog.json这三个文件放在同一目录下。")
|
||||
exit()
|
||||
|
||||
if not os.path.isfile('playLog.json'):
|
||||
print("错误:找不到playLog.json。")
|
||||
print("请将Rate_SDJE.py、Table_output_V4.json、playLog.json这三个文件放在同一目录下。")
|
||||
exit()
|
||||
|
||||
with open('playLog.json', 'r', encoding='utf-8') as file:
|
||||
play_logs = json.load(file)
|
||||
|
||||
with open('Table_output_V4.json', 'r', encoding='utf-8') as file:
|
||||
table_output = json.load(file)
|
||||
|
||||
levels_dict = {}
|
||||
for entry in table_output:
|
||||
music_id = entry["music_id"]
|
||||
levels_dict[music_id] = {
|
||||
"name": entry["music_name"],
|
||||
"levels": {
|
||||
1: entry["level_nm"],
|
||||
2: entry["level_hd"],
|
||||
3: entry["level_ex"],
|
||||
4: entry["level_in"]
|
||||
},
|
||||
"start_time": entry["start_time"],
|
||||
"start_inf": entry["start_inf"]
|
||||
}
|
||||
|
||||
best_50 = []
|
||||
|
||||
music_rates = {}
|
||||
|
||||
for log in play_logs:
|
||||
music_id = log['music_id']
|
||||
music_grade = log['music_grade']
|
||||
max_score = log['max_score']
|
||||
music_name = get_music_name(levels_dict, music_id)
|
||||
level_data = levels_dict.get(music_id, {}).get("levels", {})
|
||||
level = level_data.get(music_grade)
|
||||
if level is None:
|
||||
continue
|
||||
multiplier = calculate_multiplier(max_score)
|
||||
rate = round(multiplier * level, 1)
|
||||
grade_name = grade_to_name(music_grade)
|
||||
|
||||
start_time = levels_dict[music_id]["start_time"]
|
||||
start_inf = levels_dict[music_id]["start_inf"]
|
||||
|
||||
if music_name not in music_rates:
|
||||
music_rates[music_name] = []
|
||||
music_rates[music_name].append((grade_name, rate, max_score))
|
||||
|
||||
best_50.append((music_name, grade_name, rate, max_score))
|
||||
|
||||
# for music_name, grades_rates in music_rates.items():
|
||||
# print(f"\n{music_name}")
|
||||
# for grade_name, rate, max_score in grades_rates:
|
||||
# if rate > 0:
|
||||
# print(f" 难度: {grade_name:<16} 分数: {max_score} Rate: {rate:.1f}")
|
||||
|
||||
best_50_sorted = sorted(best_50, key=lambda x: x[2], reverse=True)[:50]
|
||||
|
||||
best_50_total = sum(rate for _, _, rate, _ in best_50_sorted)
|
||||
|
||||
print("\nBest 50:\n")
|
||||
for music_name, grade_name, rate, max_score in best_50_sorted:
|
||||
print(f"{music_name}\n 难度: {grade_name} 分数: {max_score} Rate: {rate:.1f}\n")
|
||||
|
||||
print("\n")
|
||||
|
||||
print(f"\nBest 50 合计: {best_50_total:.1f}")
|
||||
2342
Table_output.json
Normal file
2342
Table_output.json
Normal file
File diff suppressed because it is too large
Load Diff
2342
Table_output_V4.json
Normal file
2342
Table_output_V4.json
Normal file
File diff suppressed because it is too large
Load Diff
1808
playLog.json
Normal file
1808
playLog.json
Normal file
File diff suppressed because it is too large
Load Diff
1402
temp/playLog.json
Normal file
1402
temp/playLog.json
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user