Neste tópico, vamos explicar como trabalhar com crystal grades, criar novas grades e modificar os bônus de atributos do jogador após o enchant.
Formato: XML
Caminho: gameserver/data/crystal_grades.xml
Estamos interessados na grade da arma. Neste exemplo:
Também estamos interessados nos atributos modificados pelo enchant:
Agora, verifique os modificadores da grade S em data/crystal_grades.xml:
Para o nosso bow, o modificador é:
Fórmula de cálculo:
Adicione a nova grade à skill do jogador em data/stats/skills:
Se precisar adicionar novos níveis:
Criando um novo nível de skill:
Criando um enchant scroll:
Criando uma Soulshot:
neste exemplo, criando uma grade ou trabalhando com grades antigas
Se tiver dúvidas ou sugestões, poste neste tópico.
Formato: XML
Caminho: gameserver/data/crystal_grades.xml
Parâmetros de Grade
Exemplo:
XML:
<grade id="S" crystal="1462" crystalMod="250" externalOrdinal="5">
- id="S" - nome da grade. Para novas grades, pode ser qualquer um: S80, S84, R99, R999, etc.
- crystal="1462" - cristais recebidos quando o item é cristalizado.
- crystalMod="250" - modificador de bônus ao cristalizar.
- Fórmula para armas: crystalMod / 10 * enchant_level
- Fórmula para armaduras: crystalMod / 5 * enchant_level
- Se o nível for maior que 3: crystalMod / 5
- externalOrdinal="5" - usado para determinar a grade pai. Por exemplo, S80 e S84 têm como grade pai a grade S.
Bônus de Atributos por Enchant
Inicialmente, os atributos são obtidos dos itens: 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>
Estamos interessados na grade da arma. Neste exemplo:
XML:
<set name="crystal_type" value="S"/>
Também estamos interessados nos atributos modificados pelo enchant:
XML:
<enchant stat="pAtk" order="0x0C" value="0"/>
<enchant stat="mAtk" order="0x0C" value="0"/>
Agora, verifique os modificadores da grade S em 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>
Para o nosso bow, o modificador é:
XML:
<enchant_mod stat="pAtkBow" multiplier="10"/>
Fórmula de cálculo:
XML:
overEnchant = Math.max(0, enchantLevel - 3);
grade.getPhysicAttackBow * (enchantLevel + overEnchant)
Adicionando Novas Grades
Exemplo de uma nova grade S80 em data/crystal_grades.xml:
Code:
<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>
Adicione a nova grade à skill do jogador em 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>
Se precisar adicionar novos níveis:
XML:
<table name="#magicLevel">20 40 52 61 76 80 84</table>
Criando Sua Própria Grade
Exemplo de uma nova grade 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>
Criando um novo nível de skill:
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>
Criando um enchant scroll:
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>
Criando uma 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>
neste exemplo, criando uma grade ou trabalhando com grades antigas
Se tiver dúvidas ou sugestões, poste neste tópico.