How to tune enchant of equipment.

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:
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>
Key Notes:
  • 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.
2. Configuring Enchantment Scrolls
File
: data/enchant_items.xml
Enchantment scrolls are configured in the <scroll> section. Below are the key parameters and their meanings:
ParameterDescriptionValues
idScroll IDNumeric ID, e.g., 959
infallibleGuarantees enchantment successtrue (100% success) / false (uses <chances>)
on_failAction on enchantment failureCRYSTALIZE (breaks item into crystals), RESET (resets enchant level), NONE (keeps current level)
reset_lvlEnchant level on reset (on_fail="RESET")Number, e.g., 3 (resets to +3)
chance_bonusBonus to enchantment chanceDecimal, e.g., 0.2 (+20% chance)
gradeItem gradeNONE, D, C, B, A, S, S80, S84
incrementEnchant level increase on successNumber, e.g., 1 (+1), 3 (+3)
levels min/maxMin/max enchantment levelsE.g., min="0" max="20"
items_restrictItem type or specific IDsWEAPON, ARMOR, or list of item IDs
Example Scroll Configurations:
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.
2. Enchant by +3 on Success
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.
3. No Reset on Failure
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.
4. Add +20% Chance Bonus
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.
5. Scroll for Specific Items
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.
6. Scroll for Magical Weapons
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:
hola, esta teniendo un problema con mi encantamiento, me falla de +0 a +1, aca dejo mi ejemplo, alguna recomendacion o solucion?
<!-- Pergamino de encantamiento normal -->
<scroll id="959" infallible="false" on_fail="CRISTALIZAR" chance_bonus="0" grade="S">
<niveles min="0" max="20" />
<items_restrict tipo="ARMA"/>
<posibilidades tipo="ARMA">
<posibilidad de valor="100"/>
<posibilidad de valor="100"/>
<posibilidad de valor="100"/>
<posibilidad de valor="80"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
<posibilidad de valor="45"/>
</posibilidades>
 
Back
Top