File: data/enchant_items.xml
Enchantment chances are set in the <chances> section for different item types. Each <chance val="X"/> defines the success percentage for a specific enchantment level (starting from +0). Values are in percent (e.g., 100 = 100%, 50 = 50%).
Example Chance Configuration:
Key Notes:
File: data/enchant_items.xml
Enchantment scrolls are configured in the <scroll> section. Below are the key parameters and their meanings:
Example Scroll Configurations:
1. Reset to +3 on Failure
Enchantment chances are set in the <chances> section for different item types. Each <chance val="X"/> defines the success percentage for a specific enchantment level (starting from +0). Values are in percent (e.g., 100 = 100%, 50 = 50%).
Example Chance Configuration:
Code:
<chances type="ARMOR"> <!-- Standard armor -->
<chance val="100"/> <!-- +0 → +1: 100% -->
<chance val="100"/> <!-- +1 → +2: 100% -->
<chance val="100"/> <!-- +2 → +3: 100% -->
<chance val="50"/> <!-- +3 → +4: 50% -->
<chance val="50"/> <!-- +4 → +5: 50% -->
<chance val="33"/> <!-- +5 → +6: 33% -->
<chance val="25"/> <!-- +6 → +7: 25% -->
<chance val="20"/> <!-- +7 → +8: 20% -->
<chance val="14"/> <!-- +8 → +9: 14% -->
<chance val="11"/> <!-- +9 → +10: 11% -->
<chance val="8"/> <!-- +10 → +11: 8% -->
<chance val="6"/> <!-- +11 → +12: 6% -->
<chance val="5"/> <!-- +12 → +13: 5% -->
<chance val="4"/> <!-- +13 → +14: 4% -->
<chance val="3"/> <!-- +14 → +15: 3% -->
<chance val="2"/> <!-- +15 → +16: 2% -->
<chance val="2"/> <!-- +16 → +17: 2% -->
<chance val="1"/> <!-- +17 → +18: 1% -->
<chance val="1"/> <!-- +18 → +19: 1% -->
<chance val="1"/> <!-- +19 → +20: 1% -->
</chances>
<chances type="FULL_ARMOR"> <!-- Full armor -->
<chance val="100"/> <!-- +0 → +1: 100% -->
<chance val="100"/> <!-- +1 → +2: 100% -->
<chance val="100"/> <!-- +2 → +3: 100% -->
<chance val="100"/> <!-- +3 → +4: 100% -->
<chance val="50"/> <!-- +4 → +5: 50% -->
<!-- ... (similar to ARMOR up to +20) -->
</chances>
<chances type="JEWELRY"> <!-- Jewelry -->
<chance val="100"/> <!-- +0 → +1: 100% -->
<chance val="100"/> <!-- +1 → +2: 100% -->
<chance val="100"/> <!-- +2 → +3: 100% -->
<chance val="50"/> <!-- +3 → +4: 50% -->
<!-- ... (similar to ARMOR up to +20) -->
</chances>
<chances type="WEAPON"> <!-- All weapons (non-magical) -->
<chance val="70"/> <!-- +0 → +1: 70% -->
<chance val="60"/> <!-- +1 → +2: 60% -->
<!-- ... (configure as needed) -->
</chances>
<chances type="MAGIC_WEAPON"> <!-- Magical weapons (optional) -->
<chance val="60"/> <!-- +0 → +1: 60% -->
<chance val="50"/> <!-- +1 → +2: 50% -->
<!-- ... (configure as needed) -->
</chances>
- Chance Order: Each <chance> corresponds to an enchantment level (from +0 to max).
- Types:
- ARMOR: Standard armor (helm, gloves, boots, etc.).
- FULL_ARMOR: Full-body armor.
- JEWELRY: Accessories (rings, earrings, necklaces, etc.).
- WEAPON: All weapons, unless MAGIC_WEAPON is specified.
- MAGIC_WEAPON: Magical weapons only (optional; falls back to WEAPON if not defined).
- If <chances type="MAGIC_WEAPON"> is missing, magical weapons use WEAPON chances.
File: data/enchant_items.xml
Enchantment scrolls are configured in the <scroll> section. Below are the key parameters and their meanings:
Parameter | Description | Values |
---|---|---|
id | Scroll ID | Numeric ID, e.g., 959 |
infallible | Guarantees enchantment success | true (100% success) / false (uses <chances>) |
on_fail | Action on enchantment failure | CRYSTALIZE (breaks item into crystals), RESET (resets enchant level), NONE (keeps current level) |
reset_lvl | Enchant level on reset (on_fail="RESET") | Number, e.g., 3 (resets to +3) |
chance_bonus | Bonus to enchantment chance | Decimal, e.g., 0.2 (+20% chance) |
grade | Item grade | NONE, D, C, B, A, S, S80, S84 |
increment | Enchant level increase on success | Number, e.g., 1 (+1), 3 (+3) |
levels min/max | Min/max enchantment levels | E.g., min="0" max="20" |
items_restrict | Item type or specific IDs | WEAPON, ARMOR, or list of item IDs |
1. Reset to +3 on Failure
Code:
<scroll id="959" infallible="false" reset_lvl="3" on_fail="RESET" chance_bonus="0" grade="S">
<levels min="0" max="20"/>
<items_restrict type="WEAPON"/>
<chances type="WEAPON">
<chance val="70"/>
<!-- ... -->
</chances>
</scroll>
- On failure, enchantment resets to +3.
- Enchants S-grade weapons.
Code:
<scroll id="960" infallible="false" reset_lvl="0" increment="3" on_fail="RESET" chance_bonus="0" grade="S">
<levels min="0" max="20"/>
<items_restrict type="WEAPON"/>
<chances type="WEAPON">
<chance val="70"/>
<!-- ... -->
</chances>
</scroll>
- Success increases enchantment by +3 (e.g., +0 to +3).
- On failure, resets to +0.
Code:
<scroll id="961" infallible="false" reset_lvl="0" on_fail="NONE" chance_bonus="0" grade="S">
<levels min="0" max="20"/>
<items_restrict type="WEAPON"/>
<chances type="WEAPON">
<chance val="70"/>
<!-- ... -->
</chances>
</scroll>
- On failure, enchantment level remains unchanged.
Code:
<scroll id="962" infallible="false" reset_lvl="0" on_fail="RESET" chance_bonus="0.2" grade="S">
<levels min="0" max="20"/>
<items_restrict type="WEAPON"/>
<chances type="WEAPON">
<chance val="70"/> <!-- Becomes 70% + 20% = 84% -->
<!-- ... -->
</chances>
</scroll>
- chance_bonus="0.2" adds 20% to each chance.
Code:
<scroll id="13540" infallible="false" on_fail="CRYSTALIZE" chance_bonus="0" grade="NONE">
<levels min="0" max="23"/>
<items_restrict type="WEAPON">
<item id="13539"/> <!-- Item ID -->
<item id="13550"/> <!-- Another item -->
</items_restrict>
<chances type="WEAPON">
<chance val="70"/>
<!-- ... -->
</chances>
</scroll>
- Enchants only specified items (13539, 13550).
- On failure, items crystallize.
Code:
<scroll id="963" infallible="false" reset_lvl="0" on_fail="RESET" chance_bonus="0" grade="S">
<levels min="0" max="20"/>
<items_restrict type="WEAPON"/>
<chances type="WEAPON">
<chance val="70"/>
<!-- ... -->
</chances>
<chances type="MAGIC_WEAPON">
<chance val="60"/> <!-- Custom chances for magical weapons -->
<!-- ... -->
</chances>
</scroll>
- Magical weapons use MAGIC_WEAPON chances.
- If MAGIC_WEAPON is not defined, WEAPON chances apply.
Last edited: