Skip to main content

Affix Reforge Tutorial

Another beginner-friendly, step-by-step guide. Quality reforge decides how good an item is, while affix reforge decides which affixes an item rolls — random entries like "Sharp I", "Critical III", "Flame II" are all generated by the affix system.

What does affix reforge do?​

In short: the player puts equipment into the reforge GUI, switches to affix mode, pays money, and all affixes on the item are rerolled.

  • Each item randomly receives a number of affixes (configurable)
  • Each affix contributes stats with a random value (for example, attack damage between +1 and +3)
  • Affix names are joined in front of the item name, e.g. Sharp I Flame II Sword
Quality reforge ≠ Affix reforge

The two modes are independent: quality reforge rerolls the tier and tier stats only, affix reforge rerolls affixes only. Switch modes with the mode toggle button in the GUI (shown only when both modes are enabled).

Before you start: three prerequisites​

All in plugins/MMOitemsReforge/config.yml:

reforge:
use-internal-affix-system: true # ① Internal affix system must be on
modes:
affix:
enabled: true # ② Affix reforge master switch
affix-cost: 100.0 # ③ Money charged per affix reforge
max-affix-reforge-count: 10 # Max affix reforges per item (0 = unlimited)
warning

With use-internal-affix-system: false the plugin uses MMOItems native random generation and none of the modifiers files below take effect. Set it to true to use the custom affixes taught here.

Meet the modifiers folder​

Affix config lives in:

plugins/MMOitemsReforge/modifiers/
├── affix.yml ← Affix templates: what each affix is called and what stats it gives
├── weapon.yml ← Equipment rules: which weapons can roll which affixes
└── armor.yml ← Equipment rules: which armor can roll which affixes

The plugin creates these three example files on first start — edit them directly. You can also add your own yml files (e.g. bow.yml); every yml except affix.yml is treated as an equipment rules file.

The system has two layers, so a custom affix takes two steps:

  1. Define the affix template in affix.yml (its name, stats, and value range)
  2. Decide which equipment can roll it in weapon.yml or another rules file

Step 1: define a template in affix.yml​

The existing "Sharp I", line by line:

Sharp_I:
weight: 1 # Weight: higher = more likely (see chances below)
prefix: '&f&lSharp I' # Affix name: joined in front of the item name, color codes allowed
stats: # What this affix gives
attack-damage: # MMOItems stat ID (lowercase with dashes)
min: 1 # Value is rolled between 1 and 3
max: 3

Three ways to write stats​

stats:
# ① min/max range: rolled randomly on each reforge
attack-damage:
min: 1
max: 3

# ② A plain number = fixed value (min equals max)
perm-effects:
speed: 1 # permanent Speed I effect

# ③ Element damage uses nested levels
element:
fire:
damage:
min: 1
max: 5 # fire elemental damage 1–5
Mind the stat ID case

Affix templates use MMOItems lowercase stat IDs (attack-damage, critical-strike-chance, lifesteal, attack-speed, ...), unlike the quality system's uppercase ATTACK_DAMAGE. Do not mix them up.

prefix: what does the item name look like?​

Affix prefix values are joined with spaces and prepended to the item name. If a sword rolls Sharp_I (prefix &f&lSharp I) and Flame_I (prefix &4&lFlame I), the name shows as:

Sharp I Flame I Sword

Step 2: decide who can roll it​

Open weapon.yml. The shipped content looks like this:

SWORD:
max-affixes: 3 # each affix reforge rolls 3 affixes
modifiers: # affix pool: affixID : weight multiplier
Sharp_I: 0.4
Agile_I: 0.4
Critical_I: 0.4
# ...one entry per affix

Three key points:

KeyMeaning
SWORDTarget: an MMOItems item type; all equipment of that type uses this rule
max-affixesHow many affixes are rolled per reforge; 0 means none
Number in modifiersThe affix's weight multiplier in this pool; final chance = template weight × multiplier

How are chances calculated?​

The relative chance of each affix = its weight in affix.yml × the multiplier in the equipment rule.

Example: Sharp_I has weight 1 and multiplier 0.4, so 0.4 total. If all 13 sword affixes are 1 × 0.4 = 0.4, the pool sums to 5.2 and every affix has a 0.4 ÷ 5.2 ≈ 7.7% chance. After an affix is rolled it is removed from the pool (no duplicate affixes on one item), then the next one is rolled until max-affixes is reached.

Want "Sharp III" ten times rarer than "Sharp I"? Give III a multiplier one tenth of I's.

Advanced: affixes for one specific item​

Besides type keys, item ID keys are supported — a rule that only applies to one item template:

EXCALIBUR: # only applies to the item with ID EXCALIBUR
max-affixes: 5
modifiers:
Sharp_III: 0.8
Holy_III: 0.8
Lifesteal_III: 0.5
Priority: type > item ID

An EXCALIBUR of type SWORD uses the SWORD section first when both SWORD and EXCALIBUR exist. To give a special item its own pool, keep it out of the type config (or create a separate rules file keyed by item ID).

Full walkthrough: adding a custom affix​

Goal: give bows a "Frost Arrow" affix with water-element damage.

① Add the template to affix.yml (anywhere, alongside existing affixes):

Frost_Arrow_I:
weight: 1
prefix: '&b&lFrost Arrow I'
stats:
element:
water:
damage:
min: 2
max: 6

② Create plugins/MMOitemsReforge/modifiers/bow.yml:

BOW:
max-affixes: 2
modifiers:
Frost_Arrow_I: 0.5
Critical_I: 0.4
PvE_Damage_I: 0.4

③ Run /mmoreforge reload, then take a bow to the reforge GUI, switch to affix mode, and try it.

note

The Frost_Arrow_I in step ② must match the template ID in step ① exactly. Entries in the equipment rule that reference a non-existent template are silently skipped.

Common pitfalls​

warning
  1. Affix reforge rerolls everything: each affix reforge clears all existing affixes and rolls fresh ones; it does not append.
  2. Reload after editing: /mmoreforge reload; YAML indentation is spaces only.
  3. A multiplier of 0 disables the entry: weight × 0 = 0, never rolled.
  4. max-affixes: 0: items of that type end up with no affixes at all — do not be surprised.
  5. Give prefix a color: without a color code it renders in the default white style.

See Also​