Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 26 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,50 @@

_SRS_ scoring criteria for Honkai: Star Rail.

崩坏:星穹铁道 _SRS_ 遗器评分标准。
[English](README.md) | [中文](docs/README_zh-CN.md)

The project is still in development.

该项目仍在开发中。

## Introduction

_SRS_ judges the number of effective affixes of the relic according to the typical positioning of the role, and calculates the score of the relic according to the weight of different affixes. _SRS_ provides the theoretical highest score to calculate the normalized final score. The main affix and sub affixes each account for 50% of the score.

_SRS_ 根据角色的典型定位判断遗器的有效词条数,根据不同词条的权重计算遗器分数。_SRS_ 提供理论最高分以计算归一化的最终得分。主词条和副词条各占 50% 的分数。

## Calculation

### Main affix and sub affixes

The normalized score of the main affix is calculated by the level and weight, and the level 0 to 15 correspond to the base value 1/16 to 16/16 respectively. The weight is obtained by looking up the table, and the `main` field is the weight of the main affixes. For example: the weight of the main affixes at level 12 is 0.9, and the normalized score is (12+1)/16 \* 0.9 = 0.61.

主词条归一化得分通过等级与权重计算,0 级到 15 级分别对应基础值 1/16 到 16/16,权重通过查表得到,`main` 字段中为各个部位主词条的权重。例如:12 级的主词条权重为 0.9,归一化得分为 (12+1)/16 \* 0.9 = 0.61。
The normalized score of the sub affixes is calculated by the count of each affix and the weight. The `weight` field is the weight of the sub affixes.

The normalized score of the sub affixes is calculated by the number of base values, the number of boost values (x 0.1), and the weight. The `weight` field is the weight of the sub affixes. For example: sub affixes 1 has 3 base values, 2 boost values, and 1 weight; sub affixes 2 has 1 base value, 0.5 weight, and the original score is 3.2 \* 1 + 1.0 \* 0.5 = 3.7. If the `max` field is 8.0, then the normalized score is 3.7/8.0 = 0.46.
The `maxV2` field records the theoretical highest score (normalization denominator) for each specific part. The calculation logic differs by part to reflect difficulty and game mechanics:

副词条归一化得分由各个词条的基础值次数、提升值次数(乘以 0.1)、权重计算得到,`weight` 字段中为各个部位副词条的权重。例如:副词条 1 为 3 个基础值、2 个提升值、1 权重;副词条 2 为 1 个基础值、0.5 权重,原始得分为 3.2 \* 1 + 1.0 \* 0.5 = 3.7。如果 `max` 字段为 8.0,那么归一化得分为 3.7/8.0 = 0.46。
1. **Head (HEAD) / Hands (HAND)**:
* **Difficulty**: Low (Fixed main affix).
* **Model**: Assumes a 4-sub-affix initial relic, totaling 9 counts (4 initial + 5 enhancements).
* **Distribution**: Limit distribution `(6, 1, 1, 1)`.

### _SRS-N_
2. **Body (BODY) / Feet (FOOT) / Sphere (NECK) / Rope (OBJECT)**:
* **Difficulty**: High (Random main affix).
* **Model**: Assumes a 3-sub-affix initial relic, totaling 8 counts (3 initial + 4 enhancements + 1 fill).
* **Distribution**: Limit distribution `(5, 1, 1, 1)`.
* **Exclusion**: Automatically excludes sub-affixes that conflict with the optimal main affix for that part (e.g., Crit Rate Body cannot have Crit Rate sub-affix).

_SRS-N_ uses the same weight to combine the scores of the main affix and the sub affixes. According to the example in the previous section, the total score is 0.61 \* 0.5 + 0.46 \* 0.5 = 0.54, which can be expressed as `0.54` `54%` `5.4/10`.
For example: sub affix 1 has 5 counts and 1 weight; sub affix 2 has 2 counts and 0.8 weight; sub affix 3 has 1 count and 0.5 weight; sub affix 4 has 1 count and 0.3 weight, and the original score is 5 \* 1 + 2 \* 0.8 + 1 \* 0.5 + 1 \* 0.3 = 7.4. If the `maxV2` field for this part is 9.0, then the normalized score is 7.4/9.0 = 0.82.

_SRS-N_ 使用相同的权重合并主词条和副词条的得分,按照上一节的示例 ,总得分为 0.61 \* 0.5 + 0.46 \* 0.5 = 0.54,可表示为 `0.54` `54%` `5.4/10`。
### Data Structure Compatibility

### _SRS-M_
The `score.json` file contains two max fields for backward compatibility:

* **`maxV2`** (object): Per-part theoretical maximum scores using the new algorithm with difficulty-adjusted counts. Use this field for accurate per-part normalization. Structure: `{"1": float, "2": float, "3": float, "4": float, "5": float, "6": float}`.
* **`max`** (float): Legacy field, calculated using the old algorithm (all parts use 6-count distribution, then averaged). Maintained for backward compatibility with older implementations that expect a single `max` value.

_SRS-M_ takes the square root of the result of _SRS-N_, which has the characteristic that the improvement speed gradually slows down as the score increases. For example, if the result of _SRS-N_ is 0.54, then the result of _SRS-M_ is 0.54^0.5 = 0.73, which can be expressed as `0.73` `73%` `7.3/10`.
**Recommendation**: New implementations should use `maxV2` for per-part scoring, as it provides more accurate normalization and better reflects the actual difficulty of obtaining perfect relics for different parts.

### _SRS-N_

_SRS-N_ uses the same weight to combine the scores of the main affix and the sub affixes. According to the example in the previous section, the total score is 0.61 \* 0.5 + 0.82 \* 0.5 = 0.72, which can be expressed as `0.72` `72%` `7.2/10`.

### _SRS-M_

_SRS-M_ _SRS-N_ 的结果开平方根,该结果的特点是随着得分的提高,提升速度逐渐变慢。例如 _SRS-N_ 的结果为 0.54,那么 _SRS-M_ 的结果为 0.54^0.5 = 0.73,可表示为 `0.73` `73%` `7.3/10`
_SRS-M_ takes the square root of the result of _SRS-N_, which has the characteristic that the improvement speed gradually slows down as the score increases. For example, if the result of _SRS-N_ is 0.72, then the result of _SRS-M_ is 0.72^0.5 = 0.85, which can be expressed as `0.85` `85%` `8.5/10`.
71 changes: 71 additions & 0 deletions config/AvatarConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4951,6 +4951,77 @@
4
]
},
{
"AvatarID": 1321,
"AvatarName": {
"Hash": 16283352174817039417
},
"AvatarFullName": {
"Hash": 8110034527426232864
},
"AdventurePlayerID": 1321,
"AvatarVOTag": "dahlia",
"Rarity": "CombatPowerAvatarRarityType5",
"JsonPath": "Config/ConfigCharacter/Avatar/Avatar_Constance_00_Config.json",
"DamageType": "Fire",
"SPNeed": {
"Value": 130
},
"ExpGroup": 1,
"MaxPromotion": 6,
"MaxRank": 6,
"RankIDList": [
132101,
132102,
132103,
132104,
132105,
132106
],
"SkillList": [
132101,
132102,
132103,
132104,
132106,
132107
],
"AvatarBaseType": "Warlock",
"DefaultAvatarModelPath": "Characters/CharacterPrefabs/Avatar/Constance_00/Avatar_Constance_00.prefab",
"DefaultAvatarHeadIconPath": "SpriteOutput/AvatarIcon/Avatar/1321.png",
"AvatarSideIconPath": "SpriteOutput/AvatarRoundIcon/Avatar/1321.png",
"AvatarMiniIconPath": "SpriteOutput/AvatarMiniIcon/1321.png",
"AvatarGachaResultImgPath": "SpriteOutput/AvatarDrawCardResult/1321.png",
"ActionAvatarHeadIconPath": "SpriteOutput/AvatarIconTeam/1321B.png",
"UltraSkillCutInPrefabPath": "UI/Battle/UltraSkillCutIn/Avatar/UltraSkillCutIn_1321.prefab",
"UIAvatarModelPath": "Characters/CharacterPrefabs/Manikin/Avatar/Constance_00/Manikin_Avatar_Lady_Constance_00.prefab",
"ManikinJsonPath": "Config/ConfigCharacter/Manikin/Avatar/Manikin_Avatar_Constance_00_Config.json",
"AIPath": "Config/ConfigAI/Avatar_ComplexSkilll_AutoFight_AI.json",
"SkilltreePrefabPath": "UI/Avatar/Widget/WarlockSkillTreeGroup.prefab",
"DamageTypeResistance": [],
"Release": true,
"SideAvatarHeadIconPath": "SpriteOutput/AvatarIconTeam/1321.png",
"WaitingAvatarHeadIconPath": "SpriteOutput/AvatarIconTeam/1321.png",
"AvatarCutinImgPath": "SpriteOutput/AvatarCutinFigures/1321.png",
"AvatarCutinBgImgPath": "SpriteOutput/AvatarCutinBg/1321.png",
"AvatarCutinFrontImgPath": "SpriteOutput/AvatarDrawCard/1321.png",
"AvatarDropOffset": [
-12.7,
-20.74,
0.63,
-12.7,
-20.74,
0.63,
-12.7,
-20.74,
0.63
],
"AvatarTrialOffset": [],
"PlayerCardOffset": [],
"AssistOffset": [],
"AssistBgOffset": [],
"AvatarSelfShowOffset": []
},
{
"AvatarID": 1401,
"AvatarName": {
Expand Down
54 changes: 54 additions & 0 deletions config/AvatarRelicRecommend.json
Original file line number Diff line number Diff line change
Expand Up @@ -4467,6 +4467,60 @@
"Value": 0.5
}
},
{
"AvatarID": 1321,
"Set4IDList": [
119,
111,
118
],
"Set2IDList": [
316,
308,
307
],
"PropertyList3": [
"HPAddedRatio",
"DefenceAddedRatio"
],
"PropertyList4": [
"SpeedDelta"
],
"PropertyList5": [
"HPAddedRatio",
"DefenceAddedRatio"
],
"PropertyList6": [
"BreakDamageAddedRatioBase",
"SPRatioBase"
],
"PropertyList": [
{
"RelicType": "BODY",
"PropertyType": "HPAddedRatio"
},
{
"RelicType": "FOOT",
"PropertyType": "SpeedDelta"
},
{
"RelicType": "NECK",
"PropertyType": "HPAddedRatio"
},
{
"RelicType": "OBJECT",
"PropertyType": "BreakDamageAddedRatioBase"
}
],
"SubAffixPropertyList": [
"BreakDamageAddedRatioBase",
"SpeedDelta"
],
"ScoreRankList": [
202,
146
]
},
{
"AvatarID": 1015,
"Set4IDList": [
Expand Down
12 changes: 12 additions & 0 deletions config/RelicMainAffixAvatarValue.json
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,18 @@
"DamageAddedRatio": 0.1,
"SPRatio": 0.9
},
{
"AvatarID": 1321,
"Attack": 0.1,
"HP": 0.2,
"Defence": 0.2,
"Speed": 1,
"CriticalChance": 0.1,
"CriticalDamage": 0.1,
"BreakDamage": 1,
"DamageAddedRatio": 0.1,
"SPRatio": 1
},
{
"AvatarID": 1401,
"Attack": 1,
Expand Down
11 changes: 11 additions & 0 deletions config/RelicSubAffixAvatarValue.json
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,17 @@
"StatusResistance": 0.1,
"BreakDamage": 1
},
{
"AvatarID": 1321,
"Attack": 0.1,
"HP": 0.2,
"Defence": 0.2,
"Speed": 1,
"CriticalChance": 0.1,
"CriticalDamage": 0.1,
"StatusResistance": 0.1,
"BreakDamage": 1
},
{
"AvatarID": 1401,
"Attack": 1,
Expand Down
52 changes: 52 additions & 0 deletions docs/README_zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# StarRailScore

崩坏:星穹铁道 _SRS_ 遗器评分标准。

[English](../README.md) | [中文](README_zh-CN.md)

该项目仍在开发中。

## 简介

_SRS_ 根据角色的典型定位判断遗器的有效词条数,根据不同词条的权重计算遗器分数。_SRS_ 提供理论最高分以计算归一化的最终得分。主词条和副词条各占 50% 的分数。

## 计算公式

### 主词条与副词条

主词条归一化得分通过等级与权重计算,0 级到 15 级分别对应基础值 1/16 到 16/16,权重通过查表得到,`main` 字段中为各个部位主词条的权重。例如:12 级的主词条权重为 0.9,归一化得分为 (12+1)/16 \* 0.9 = 0.61。

副词条归一化得分由各个词条的 count 次数和权重计算得到,`weight` 字段中为各个部位副词条的权重。

`maxV2` 字段记录了各部位的理论最高分(归一化分母)。不同部位的 `maxV2` 计算逻辑不同,以反映获取难度和游戏机制的差异:

1. **头部 (HEAD) / 手部 (HAND)**:
* **获取难度**: 低(主词条固定)。
* **计算模型**: 假设为 4 词条初始胚子,共 9 个 counts (4 初始 + 5 强化)。
* **分布**: 极限分布 `(6, 1, 1, 1)`。

2. **躯干 (BODY) / 脚部 (FOOT) / 位面球 (NECK) / 连结绳 (OBJECT)**:
* **获取难度**: 高(主词条随机)。
* **计算模型**: 假设为 3 词条初始胚子,共 8 个 counts (3 初始 + 4 强化 + 1 补词条)。
* **分布**: 极限分布 `(5, 1, 1, 1)`。
* **互斥**: 计算时会自动剔除该部位最优主词条对应的副词条(如暴击衣不能有暴击率副词条)。

例如:副词条 1 为 5 个 count、1 权重;副词条 2 为 2 个 count、0.8 权重;副词条 3 为 1 个 count、0.5 权重;副词条 4 为 1 个 count、0.3 权重,原始得分为 5 \* 1 + 2 \* 0.8 + 1 \* 0.5 + 1 \* 0.3 = 7.4。如果该部位的 `maxV2` 字段为 9.0,那么归一化得分为 7.4/9.0 = 0.82。

### 数据结构兼容性

`score.json` 文件包含两个 max 字段以保持向后兼容:

* **`maxV2`** (对象): 使用新算法(基于获取难度的 count 调整)的各部位理论最高分。使用此字段可获得准确的按部位归一化。结构:`{"1": float, "2": float, "3": float, "4": float, "5": float, "6": float}`。
* **`max`** (浮点数): 旧版字段,使用旧算法计算(所有部位均使用 6-count 分布,然后取平均值)。保留此字段以兼容旧版实现(期望单个 `max` 值)。

**建议**: 新实现应使用 `maxV2` 进行按部位评分,因为它提供了更准确的归一化,并更好地反映了不同部位获取完美遗器的实际难度。

### _SRS-N_

_SRS-N_ 使用相同的权重合并主词条和副词条的得分。按照上一节的示例,总得分为 0.61 \* 0.5 + 0.82 \* 0.5 = 0.72,可表示为 `0.72` `72%` `7.2/10`。

### _SRS-M_

_SRS-M_ 将 _SRS-N_ 的结果开平方根,该结果的特点是随着得分的提高,提升速度逐渐变慢。例如 _SRS-N_ 的结果为 0.72,那么 _SRS-M_ 的结果为 0.72^0.5 = 0.85,可表示为 `0.85` `85%` `8.5/10`。

1 change: 1 addition & 0 deletions score.csv
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ id,name,path,element,3-HPAddedRatio,3-AttackAddedRatio,3-DefenceAddedRatio,3-Cri
1314, jade,Erudition,Quantum,0.1,1,0.1,1,1,0,0.1,0.1,1,0.1,0.8,0.1,1,0.1,0,0,0,0,0,1,0,0.1,1,0.1,1,0.1,0,0.3,0,0.1,1,0.1,0.8,1,1,0,0.1,0.1
1315, boothill,The Hunt,Physical,0.1,1,0.1,1,1,0,0.1,0.1,0.6,0.1,1,0.1,0.6,0.1,1,0,0,0,0,0,0,1,0.9,0.1,0.6,0.1,0,0.2,0,0.1,0.6,0.1,1,0.6,0.6,0,0.1,1
1317, rappa,Erudition,Imaginary,0.1,1,0.1,0.1,0.1,0,0.1,0.1,0.6,0.1,1,0.1,1,0.1,0,0,0,0,0,0,0.1,1,0.9,0.1,0.6,0.1,0,0.2,0,0.1,0.6,0.1,1,0.1,0.1,0,0.1,1
1321, dahlia,Nihility,Fire,1,0.1,1,0.1,0.1,0,1,0.2,0.1,0.2,1,1,0.1,1,0,0.1,0,0,0,0,0,1,1,0.2,0.1,0.2,0.1,0,0.1,0.2,0.1,0.2,1,0.1,0.1,0,0.1,1
1401, theherta,Erudition,Ice,0.1,1,0.1,1,1,0,0.1,0.1,1,0.1,1,0.1,1,0.1,0,0,1,0,0,0,0,0.1,1,0.1,1,0.1,0,0.3,0,0.1,1,0.1,1,1,1,0,0.1,0.1
1402, aglaea,Remembrance,Thunder,0.1,1,0.1,1,1,0,0.1,0.1,1,0.1,1,0.1,1,0.1,0,0,0,1,0,0,0,0.1,1,0.1,1,0.1,0,0.3,0,0.1,1,0.1,1,1,1,0,0.1,0.1
1403, tribbie,Harmony,Quantum,1,0,0.1,1,1,0,1,1,0,0.1,0.4,1,0,0.1,0,0,0,0,0,1,0,0.1,1,1,0,0.1,0.3,0,0,1,0,0.1,0.4,1,1,0,0.1,0.1
Expand Down
Loading