Skip to content

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 ​

FieldTypeRequiredDefaultRangeDescription
inlay_successobjectNosee 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
enabledbooleanNotruetrue / falseWhether the chance system is enabled; false always succeeds at 100%
default_chancedoubleNo100.00~100 (clamped)Default success rate in percent
rate_formulastringNo"%default_chance% - (%level% - 1) * 5"expression using the variables belowFormula used to calculate the final success rate; blank falls back to %default_chance%
failure_actionstringNo"destroy_gem"return_gem / destroy_gem / destroy_bothWhat happens when inlay fails; blank falls back to return_gem
by_levelobjectNoemptykey = gem level (integer), value = percentPer-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.0

Formula variables ​

rate_formula can use these variables:

VariableDescription
%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 ​

ValueBehavior
return_gemDo not consume the gem and do not charge the inlay cost
destroy_gemConsume the gem and charge the inlay cost before the roll
destroy_bothConsume 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.enabled is true
  • High-level chance is wrong: check that the formula uses %level% rather than a legacy field name
  • Failure consumption is unexpected: check that failure_action is return_gem, destroy_gem, or destroy_both
  • Players report unexpected charges: check both inlay_cost and the failure action to confirm the evaluation order