Как создавать свои грейды, редактировать кристаллы и модифицировать бонусы заточки

В этой теме мы разберём, как работать с грейдами кристаллов, создавать новые грейды и изменять бонусы базовых характеристик игрока после заточки.

Формат: XML
Путь: gameserver/data/crystal_grades.xml

Параметры грейда​

Пример:
XML:
<grade id="S" crystal="1462" crystalMod="250" externalOrdinal="5">

  • id="S" - название грейда. Для новых может быть произвольное: S80, S84, R99, R999 и т.д.
  • crystal="1462" - кристаллы, которые будут получены при кристаллизации предмета.
  • crystalMod="250" - модификатор бонусов при кристаллизации.
    • Формула для оружия: crystalMod / 10 * enchant_level
    • Формула для брони: crystalMod / 5 * enchant_level
    • Если уровень больше 3, то: crystalMod / 5
  • externalOrdinal="5" - используется для определения родительского грейда. Например, S80 и S84 имеют родительский грейд S.

Бонусы характеристик при заточке​

Изначально характеристики берутся из предметов: data/items
XML:
<weapon id="7575" name="Draconic Bow">
    <!-- [draconic_bow] -->
    <set name="atk_reuse" value="1500"/>
    <set name="crystal_count" value="2440"/>
    <set name="crystal_type" value="S"/>
    <set name="crystallizable" value="true"/>
    <set name="icon" value="icon.weapon_draconic_bow_i00"/>
    <set name="mp_consume" value="6"/>
    <set name="price" value="48800000"/>
    <set name="rnd_dam" value="5"/>
    <set name="soulshots" value="1"/>
    <set name="spiritshots" value="1"/>
    <set name="type" value="BOW"/>
    <set name="weight" value="1650"/>
    <equip>
        <slot id="LEFT_RIGHT_HAND"/>
    </equip>
    <for>
        <add stat="pAtk" order="0x10" value="581"/>
        <add stat="mAtk" order="0x10" value="132"/>
        <set stat="baseCrit" order="0x08" value="120"/>
        <set stat="atkBaseSpeed" order="0x08" value="293"/>
        <add stat="accCombat" order="0x10" value="-4.0000"/>
        <enchant stat="pAtk" order="0x0C" value="0"/>
        <enchant stat="mAtk" order="0x0C" value="0"/>
    </for>
</weapon>
Нас интересует, какой грейд у оружия. В данном примере:
XML:
<set name="crystal_type" value="S"/>
Также важны модифицируемые характеристики:
XML:
<enchant stat="pAtk" order="0x0C" value="0"/>
<enchant stat="mAtk" order="0x0C" value="0"/>

Теперь проверяем модификаторы для грейда S в data/crystal_grades.xml:
XML:
<grade id="S" crystal="1462" crystalMod="250" externalOrdinal="5">
    <enchant_mod stat="mAtk" multiplier="4"/>
    <enchant_mod stat="sDef" multiplier="2"/>
    <enchant_mod stat="mDef" multiplier="2"/>
    <enchant_mod stat="pDef" multiplier="2"/>
    <enchant_mod stat="pAtkBow" multiplier="10"/>
    <enchant_mod stat="pAtkDoubleSword" multiplier="6"/>
    <enchant_mod stat="pAtk" multiplier="5"/>
    <enchant_mod stat="pAtkSpd" multiplier="1.5"/>
    <enchant_mod stat="mAtkSpd" multiplier="1.5"/>
    <enchant_mod stat="maxHp" multiplier="1.5"/>
    <enchant_mod stat="maxMp" multiplier="1.5"/>
    <enchant_mod stat="maxCp" multiplier="1.5"/>
</grade>

Для нашего лука используется модификатор:

XML:
<enchant_mod stat="pAtkBow" multiplier="10"/>

Формула расчёта:
XML:
overEnchant = Math.max(0, enchantLevel - 3);
grade.getPhysicAttackBow * (enchantLevel + overEnchant)

Добавление новых грейдов​

Пример нового грейда S80 в data/crystal_grades.xml:
XML:
<grade id="S80" crystal="1462" crystalMod="250" externalOrdinal="5">
    <enchant_mod stat="mAtk" multiplier="4"/>
    <enchant_mod stat="sDef" multiplier="2"/>
    <enchant_mod stat="mDef" multiplier="2"/>
    <enchant_mod stat="pDef" multiplier="2"/>
    <enchant_mod stat="pAtkBow" multiplier="10"/>
    <enchant_mod stat="pAtkDoubleSword" multiplier="6"/>
    <enchant_mod stat="pAtk" multiplier="5"/>
    <enchant_mod stat="pAtkSpd" multiplier="1.5"/>
    <enchant_mod stat="mAtkSpd" multiplier="1.5"/>
    <enchant_mod stat="maxHp" multiplier="1.5"/>
    <enchant_mod stat="maxMp" multiplier="1.5"/>
    <enchant_mod stat="maxCp" multiplier="1.5"/>
</grade>

Добавьте новый грейд в скил игрока в data/stats/skills:
XML:
<skill id="239" levels="7" name="Expertise D">
    <table name="#magicLevel">20 40 52 61 76 76 76</table>
    <set name="icon" val="icon.skill0239"/>
    <set name="magicLevel" val="#magicLevel"/>
    <set name="target" val="TARGET_SELF"/>
    <set name="skillType" val="HARDCODED"/>
    <set name="operateType" val="OP_PASSIVE"/>
    <set name="canLearn" val=""/>
    <set name="isCommon" val="true"/>
</skill>

Если нужно добавить нужные уровни:
XML:
<table name="#magicLevel">20 40 52 61 76 80 84</table>

Создание собственного грейда​

Пример нового грейда R:
XML:
<grade id="R" crystal="17371" crystalMod="255" externalOrdinal="6">
    <enchant_mod stat="mAtk" multiplier="4"/>
    <enchant_mod stat="sDef" multiplier="2"/>
    <enchant_mod stat="mDef" multiplier="2"/>
    <enchant_mod stat="pDef" multiplier="2"/>
    <enchant_mod stat="pAtkBow" multiplier="10"/>
    <enchant_mod stat="pAtkDoubleSword" multiplier="6"/>
    <enchant_mod stat="pAtk" multiplier="5"/>
    <enchant_mod stat="pAtkSpd" multiplier="1.5"/>
    <enchant_mod stat="mAtkSpd" multiplier="1.5"/>
    <enchant_mod stat="maxHp" multiplier="1.5"/>
    <enchant_mod stat="maxMp" multiplier="1.5"/>
    <enchant_mod stat="maxCp" multiplier="1.5"/>
</grade>

Создание нового уровня скила:
XML:
<skill id="239" levels="8" name="Expertise D">
    <table name="#magicLevel">20 40 52 61 76 80 84 86</table>
    <set name="icon" val="icon.skill0239"/>
    <set name="magicLevel" val="#magicLevel"/>
    <set name="target" val="TARGET_SELF"/>
    <set name="skillType" val="HARDCODED"/>
    <set name="operateType" val="OP_PASSIVE"/>
    <set name="canLearn" val=""/>
    <set name="isCommon" val="true"/>
</skill>
Создание скрола заточки:
XML:
<scroll id="88888" infallible="false" reset_lvl="0" on_fail="RESET" chance_bonus="0" grade="R">
    <levels min="0" max="20"/>
    <items_restrict type="WEAPON"/>
    <chances type="WEAPON">
        <chance val="100"/>
        <chance val="100"/>
        <chance val="100"/>
        <chance val="50"/>
        <chance val="50"/>
        <chance val="33"/>
        <chance val="25"/>
        <chance val="20"/>
        <chance val="14"/>
        <chance val="11"/>
        <chance val="8"/>
        <chance val="6"/>
        <chance val="5"/>
        <chance val="4"/>
        <chance val="3"/>
        <chance val="2"/>
        <chance val="2"/>
        <chance val="1"/>
        <chance val="1"/>
        <chance val="1"/>
    </chances>
</scroll>
Создание Soulshot:

XML:
<etcitem id="88889" name="Soulshot: R-grade">
    <!-- [soulshot_s] -->
    <set name="class" value="CONSUMABLE"/>
    <set name="crystal_type" value="R"/>
    <set name="icon" value="icon.etc_spirit_bullet_gold_i00"/>
    <set name="price" value="100"/>
    <set name="stackable" value="true"/>
    <set name="type" value="SHOT"/>
    <set name="weight" value="2"/>
    <skills>
        <skill id="2154" level="1"/>
    </skills>
</etcitem>
В данном примере создаётся новый грейд, независимый от других.
Если есть вопросы или предложения, пишите в этой теме.

Данная система работает для всех хроник и вы можете модифицировать грейды, делать новые, выдумывать свои и делать любые модификаторы под свои нужды!​

 
Last edited:
delete all, start again with dragonic bow copy/paste.
eventually you will find out the way!
start with at least 1 grade. and after you can make more.
and watch out in the client the item grade.
 
@Jiiotuk i think i know where you messed, read
for bow not appear: if you make any S grade you MUST use externalOrdinal="5". because: S/S80/S94 use the same externalordinal.
they belong in the same family wich is the S-GRADE.this makes S80 and S94 child of S, thats why must use the same ordinal like normal S.

if you make any R grade R/R84/R94/R110 you MUST use externalOrdinal="6". because: R/R84/R94/R110 use the same externalordinal.
again same family, wich is the R-GRADE, this makes R84/R94/R110 child of R family grade. then you can use the next number witch is 6!

for weapon penalty: did you learn the skill you make on your char? did you add on skill_tree or did you at least add manually on your skills?

for client custom nipple maybe you need add: AdditionalItemGrp_Classic/ItemStatData_Classic and also make it non-consume in etcitemgrp_classic

for arrows: value="S/S80/S84/R/R94/R110" WITCH ONE DID YOU USE IN YOUR EXAMPLE?

Code:
<set name="crystal_type" value="S80"/>
does it match with this??
Rich (BB code):
<grade id="S80" crystal="22633" crystalMod="1" externalOrdinal="5">
for me all ok...
Проверь пожалуйста. С твоим луком который S80, ты можешь использовать стрелы S?
Они должны быть у тебя в инвентаре, а потом надень лук
А еще попробуй изменить грейд на R. Может я что-то делаю не так
 
Last edited:
And does everything work fine for everyone? If I write externalOrdinal="6" (6, 7, 8) then I can't put on bows of grade Y and those that I wrote - 6 - S80, 7 - S84.... etc.

Another question: I created Y80..... changed the mtrok in skill 239, but for some reason the grade penalty pops up, although I am lvl 80

<skill id="239" levels="8" name="Expertise D">
<table name="#magicLevel">20 40 52 61 76 78 78 78</table>
ok after many tries i see your point.
this happens if you put in data/crystal_data.xml externalOrdinal ="6" or any other number more than 5 when you make new grade.
Example used in video:

Dragonic Bow S80 or S84 works OK.
Code:
<grade id="S80" crystal="1462" crystalMod="250" externalOrdinal="5">
whatever bow R-R90-R95-R99 (did many tries-different weapons tryied) check video...
Code:
<grade id="R" crystal="92525" crystalMod="250" externalOrdinal="6">



another way: if you make new grade but make it with the same externalOrdinal ="5"
example used in this video :
Code:
<grade id="S84" crystal="92525 " crystalMod = " 250" externalOrdinal="5">
then bow equips and shows in inventory and on character like the video,
but look at the arrows only normal S grade arrows auto-equip with bow




@Deazer after many tries i think this has to do with server, can you look when have time?
 
Переработал.
ВНИМАНИЕ!!! ОБЯЗАТЕЛЬНО ОБНОВИТЬ ФАЙЛЫ gameserver/data/crystal_grades.xml crystal_grades.dtd
 
What about it?
the error seems to be the same
Ps: about Grade Expertise skill=239
the skill is autolearned only until level 6.
which means it will not accept a higher grade than S.....
and character can equip and throw arrows R grade with out the need of weapon
maybe missed something in skill?

well.webp
 
Last edited:
What about it?
the error seems to be the same
Ps: about Grade Expertise skill=239
the skill is autolearned only until level 6.
which means it will not accept a higher grade than S.....
and character can equip and throw arrows R grade with out the need of weapon
maybe missed something in skill?

View attachment 4616
Wait I will check it by self
 
What about it?
the error seems to be the same
Ps: about Grade Expertise skill=239
the skill is autolearned only until level 6.
which means it will not accept a higher grade than S.....
and character can equip and throw arrows R grade with out the need of weapon
maybe missed something in skill?

View attachment 4616
All perfect at me, no any errors or bugs

1730407797332.webp

Now will check at classic. Maybe you lost something
 
All perfect at me, no any errors or bugs

View attachment 4617

Now will check at classic. Maybe you lost something
listen pls, the skill at level 6 is for S-80.....
NOT R grade.
also, this is okay because i added the skill by admin, so it is just missing from skill_tree.
so all ok with skill grade.
problem is with EQUIP WEAPON....and when equip -> attack -> error as in the image.
exactly this sequence.
 
listen pls, the skill at level 6 is for S-80.....
NOT R grade.
also, this is okay because i added the skill by admin, so it is just missing from skill_tree.
so all ok with skill grade.
problem is with EQUIP WEAPON....and when equip -> attack -> error as in the image.
exactly this sequence.
so write the problem right away. I don't have extrasensory abilities
 
so write the problem right away. I don't have extrasensory abilities
just like old reports, the weapon is NOT equiped or show visualy, but when character try to attack anything then error is gs.
i reported everything in one jpeg....it doesnt get better
 
just like old reports, the weapon is NOT equiped or show visualy, but when character try to attack anything then error is gs.
i reported everything in one jpeg....it doesnt get better
you forgot to add that with BOW
 
just like old reports, the weapon is NOT equiped or show visualy, but when character try to attack anything then error is gs.
i reported everything in one jpeg....it doesnt get better
If you describe how to reproduce this error properly, I will definitely fix it. So far, I can't seem to reproduce it in any way.
 
If you describe how to reproduce this error properly, I will definitely fix it. So far, I can't seem to reproduce it in any way.
i followed the guide just like the other time, maybe i forgot some thing or what,
i will check again.
by the way, in the video you just changed the grade of existing S weapons?
if so, then possibly i missed something in client side because in my example i add completely new item IDs
 
i followed the guide just like the other time, maybe i forgot some thing or what,
i will check again.
by the way, in the video you just changed the grade of existing S weapons?
if so, then possibly i missed something client side because i added completely new item
yep, just a duplicate of S grade with different name and level and ordinal of course. Maybe you lost to add Arrows to your new Weapon, that is why it is not working for you.
Anyway, I can add a completely new grade in the morning with SS/Arrows and etc and check it by self
 
yep, just a duplicate of S grade with different name and level and ordinal of course. Maybe you lost to add Arrows to your new Weapon, that is why it is not working for you.
Anyway, I can add a completely new grade in the morning with SS/Arrows and etc and check it by self
У меня все осталось так же как и есть. Постараюсь описать проблему заново

сборка скачена сегодня

вот тут (gameserver/data/crystal_grades.xml crystal_grades )я делаю вот так
<grade id="R" crystal="1462" crystalMod="1" externalOrdinal="5" experienceLevel="76">
<enchant_mod stat="mAtk" multiplier="4" />
<enchant_mod stat="sDef" multiplier="2" />
<enchant_mod stat="mDef" multiplier="2" />
<enchant_mod stat="pDef" multiplier="2" />
<enchant_mod stat="pAtkBow" multiplier="10" />
<enchant_mod stat="pAtkDoubleSword" multiplier="6" />
<enchant_mod stat="pAtk" multiplier="5" />
<enchant_mod stat="pAtkSpd" multiplier="1.5" />
<enchant_mod stat="mAtkSpd" multiplier="1.5" />
<enchant_mod stat="maxHp" multiplier="1.5" />
<enchant_mod stat="maxMp" multiplier="1.5" />
<enchant_mod stat="maxCp" multiplier="1.5" />
</grade>
<grade id="T" crystal="1462" crystalMod="2" externalOrdinal="5" experienceLevel="76">
<enchant_mod stat="mAtk" multiplier="5" />
<enchant_mod stat="sDef" multiplier="2" />
<enchant_mod stat="mDef" multiplier="2" />
<enchant_mod stat="pDef" multiplier="2" />
<enchant_mod stat="pAtkBow" multiplier="12" />
<enchant_mod stat="pAtkDoubleSword" multiplier="7" />
<enchant_mod stat="pAtk" multiplier="6" />
<enchant_mod stat="pAtkSpd" multiplier="1.5" />
<enchant_mod stat="mAtkSpd" multiplier="1.5" />
<enchant_mod stat="maxHp" multiplier="1.5" />
<enchant_mod stat="maxMp" multiplier="1.5" />
<enchant_mod stat="maxCp" multiplier="1.5" />
</grade>

и тогда у меня при одевании лука (моих R и Т) прицепляются стрелы Ы грейда, но когда я меняю стрелы на R u T грейд их нельзя одеть (Ы стрелы), так как это R u T грейд оружие (Лук)


Когда я делаю так
<grade id="R" crystal="1462" crystalMod="1" externalOrdinal="6" experienceLevel="76">
<enchant_mod stat="mAtk" multiplier="4" />
<enchant_mod stat="sDef" multiplier="2" />
<enchant_mod stat="mDef" multiplier="2" />
<enchant_mod stat="pDef" multiplier="2" />
<enchant_mod stat="pAtkBow" multiplier="10" />
<enchant_mod stat="pAtkDoubleSword" multiplier="6" />
<enchant_mod stat="pAtk" multiplier="5" />
<enchant_mod stat="pAtkSpd" multiplier="1.5" />
<enchant_mod stat="mAtkSpd" multiplier="1.5" />
<enchant_mod stat="maxHp" multiplier="1.5" />
<enchant_mod stat="maxMp" multiplier="1.5" />
<enchant_mod stat="maxCp" multiplier="1.5" />
</grade>
<grade id="T" crystal="1462" crystalMod="2" externalOrdinal="7" experienceLevel="76">
<enchant_mod stat="mAtk" multiplier="5" />
<enchant_mod stat="sDef" multiplier="2" />
<enchant_mod stat="mDef" multiplier="2" />
<enchant_mod stat="pDef" multiplier="2" />
<enchant_mod stat="pAtkBow" multiplier="12" />
<enchant_mod stat="pAtkDoubleSword" multiplier="7" />
<enchant_mod stat="pAtk" multiplier="6" />
<enchant_mod stat="pAtkSpd" multiplier="1.5" />
<enchant_mod stat="mAtkSpd" multiplier="1.5" />
<enchant_mod stat="maxHp" multiplier="1.5" />
<enchant_mod stat="maxMp" multiplier="1.5" />
<enchant_mod stat="maxCp" multiplier="1.5" />
</grade>

то я просто не могу одеть Лук! Стрелы надеваются, но лук я одеть не могу. Я могу стрелять стрелами, если я сам надену их, но не могу стрелять из лука.

Но, если я просто одену лук и буду стрелять, то в ГС вот такое
java.lang.ArrayIndexOutOfBoundsException: Index 7 out of bounds for length 6
at l2.gameserver.model.items.PcInventory.findArrowForBow(Unknown Source)
at l2.gameserver.model.Player.checkAndEquipArrows(Unknown Source)
at l2.gameserver.model.Playable.doAttack(Unknown Source)
at l2.gameserver.model.Player.doAttack(Unknown Source)
at l2.gameserver.ai.PlayableAI.thinkAttack(Unknown Source)
at l2.gameserver.ai.PlayerAI.thinkAttack(Unknown Source)
at l2.gameserver.ai.PlayableAI.onEvtThink(Unknown Source)
at l2.gameserver.ai.CharacterAI.onIntentionAttack(Unknown Source)
at l2.gameserver.ai.AbstractAI.setIntention(Unknown Source)
at l2.gameserver.ai.PlayableAI.setIntention(Unknown Source)
at l2.gameserver.ai.AbstractAI.setIntention(Unknown Source)
at l2.gameserver.ai.PlayableAI.Attack(Unknown Source)
at l2.gameserver.ai.PlayerAI.Attack(Unknown Source)
at l2.gameserver.model.Creature.onForcedAttack(Unknown Source)
at l2.gameserver.network.l2.c2s.AttackRequest.runImpl(Unknown Source)
at l2.gameserver.network.l2.c2s.L2GameClientPacket.run(Unknown Source)
at l2.commons.net.nio.impl.MMOExecutableQueue.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:842)

я вижу на видео @Deazer что у него все хорошо, но у меня нет ) Хотя, я не вижу что за лук у него.... У меня не стандартные луки (R u T грейды)
 
Last edited:
Back
Top