English
Inlay Success Rate
Gem inlay can use a success-rate system so high-level gems or high-value equipment can carry more risk. The global configuration is under inlay_success in config.yml
Global configuration
yaml
inlay_success:
enabled: true
default_chance: 100.0
rate_formula: "%default_chance% - (%level% - 1) * 5"
failure_action: "destroy_gem"Fields
| Field | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
inlay_success | object | No | see the shipped defaults above | — | When the whole block is missing, the source fallbacks apply: enabled=false, default_chance=100, rate_formula=%default_chance%, failure_action=return_gem |
enabled | boolean | No | true | true / false | Whether the chance system is enabled; false always succeeds at 100% |
default_chance | double | No | 100.0 | 0~100 (clamped) | Default success rate in percent |
rate_formula | string | No | "%default_chance% - (%level% - 1) * 5" | expression using the variables below | Formula used to calculate the final success rate; blank falls back to %default_chance% |
failure_action | string | No | "destroy_gem" | return_gem / destroy_gem / destroy_both | What happens when inlay fails; blank falls back to return_gem |
by_level | object | No | empty | key = gem level (integer), value = percent | Per-level success-rate override; when matched it feeds %level_chance% / %configured_chance% into the formula, and unmatched levels use default_chance |
Shipped defaults:
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.0Formula variables
rate_formula can use these variables:
| Variable | Description |
|---|---|
%default_chance% | Global default chance |
%level_chance% | Chance resolved from level-specific configuration, usually falling back to default if missing |
%configured_chance% | Chance configured by gem or level data |
%level% | Current gem level |
Example:
yaml
rate_formula: "%default_chance% - (%level% - 1) * 5"With a default chance of 100%, a level 5 gem has a theoretical 80% success rate
Failure actions
| Value | Behavior |
|---|---|
return_gem | Do not consume the gem and do not charge the inlay cost |
destroy_gem | Consume the gem and charge the inlay cost before the roll |
destroy_both | Consume the gem but do not charge the inlay cost |
Relationship with inlay cost
Inlay cost comes from inlay_cost in the gem definition; the success-rate system only decides whether the gem state and effects are written. Whether costs are charged on failure is controlled by failure_action
yaml
inlay_cost:
currencies:
- provider: "vault"
base_cost: 1000
cost_formula: "%base_cost% * %level%"
display_name: "<gold>Coins</gold>"Troubleshooting
- Chance is always 100%: check that
inlay_success.enabledistrue - High-level chance is wrong: check that the formula uses
%level%rather than a legacy field name - Failure consumption is unexpected: check that
failure_actionisreturn_gem,destroy_gem, ordestroy_both - Players report unexpected charges: check both
inlay_costand the failure action to confirm the evaluation order