简体中文
镶嵌成功率
镶嵌成功率怎么配, 成功率怎么算, 失败后宝石和费用分别怎么处理
宝石镶嵌可以配置成功率机制, 让高等级宝石或高价值装备承担更明确的风险. 成功率配置写在 config.yml 的 inlay_success 节点
全局配置
yaml
inlay_success:
enabled: true
default_chance: 100.0
rate_formula: "%default_chance% - (%level% - 1) * 5"
failure_action: "destroy_gem"字段说明
| 字段 | 类型 | 必填 | 默认值 | 取值范围 | 说明 |
|---|---|---|---|---|---|
inlay_success | object | 否 | 见上方发货默认值 | — | 整节缺失时改用源码里的回退值: enabled=false, default_chance=100, rate_formula=%default_chance%, failure_action=return_gem |
enabled | boolean | 否 | true | true / false | 是否启用成功率判定; false 时固定 100% 成功 |
default_chance | double | 否 | 100.0 | 0~100 (超范围会被夹紧) | 默认成功率, 单位: 百分比 |
rate_formula | string | 否 | "%default_chance% - (%level% - 1) * 5" | 表达式, 可用下方变量 | 成功率公式; 空白时回退 %default_chance% |
failure_action | string | 否 | "destroy_gem" | return_gem / destroy_gem / destroy_both | 镶嵌失败后的处理方式; 空白时回退 return_gem |
by_level | object | 否 | 空 | 键 = 宝石等级 (整数), 值 = 百分比 | 按等级覆盖成功率; 命中时作为 %level_chance% / %configured_chance% 参与公式计算, 未命中的等级用 default_chance |
随包默认值:
yaml
inlay_success:
enabled: true
default_chance: 100.0
rate_formula: "%default_chance% - (%level% - 1) * 5"
failure_action: "destroy_gem"yaml
inlay_success:
by_level:
3: 85.0
5: 60.0公式变量
rate_formula 可使用以下变量:
| 变量 | 说明 |
|---|---|
%default_chance% | 默认成功率 |
%level_chance% | 按等级得到的成功率, 未配置时改用默认值 |
%configured_chance% | 宝石或等级配置中提供的成功率 |
%level% | 宝石当前等级 |
示例:
yaml
rate_formula: "%default_chance% - (%level% - 1) * 5"该公式表示每高 1 级, 成功率降低 5%. 如果默认成功率为 100%, 5 级宝石的理论成功率为 80%
失败处理
failure_action 控制镶嵌失败时宝石和费用如何处理:
| 值 | 行为 |
|---|---|
return_gem | 不扣宝石, 也不扣镶嵌成本. 适合轻风险玩法 |
destroy_gem | 扣除宝石, 并在判定前先扣镶嵌成本. 适合高风险镶嵌 |
destroy_both | 扣除宝石, 不扣镶嵌成本. 适合只消耗宝石材料的玩法 |
选择失败处理时, 可以结合服务器经济来定:
- 新手装备建议使用
return_gem或关闭成功率 - 高阶宝石建议使用
destroy_gem, 让稀有宝石有明确消耗出口 - 如果镶嵌费用很高, 可以使用
destroy_both减少玩家挫败感
与镶嵌费用的关系
镶嵌费用由宝石定义中的 inlay_cost 控制, 成功率只决定最终是否写入宝石状态和效果. 失败时扣不扣费由 failure_action 决定
yaml
inlay_cost:
currencies:
- provider: "vault"
base_cost: 1000
cost_formula: "%base_cost% * %level%"
display_name: "<gold>金币</gold>"排查建议
- 成功率始终 100%: 检查
inlay_success.enabled是否为true - 高等级成功率异常: 检查公式变量是否使用
%level%而不是旧字段名 - 失败后材料处理不符合预期: 检查
failure_action是否为return_gem,destroy_gem或destroy_both - 玩家反馈扣费异常: 结合
inlay_cost和失败处理确认判定顺序