L2JMobius

Guide \ notes for skills editing

fruit · 4 · 1908

Online fruit

  • Distinguished King
  • *****
    • Posts: 841
Guide from me on editing skills and some useful notes
Before start, you must understand that I may not know much and be wrong about something. It will also be written about many obvious actions, but perhaps they will not seem obvious to someone.

So you are on the server, you are an admin and you saw that the skill is not working correctly or not working at all. I assume that you know how to search skills through the menu in game (alt+G) and that skills available for players to learn are listed in "..\game\data\skillTrees\"

Where to begin?
At first I would advise to install any good text editor. It will make it possible to add a folder with a server to the project and work with files already inside a text editor. I use Sublime.
When you have found the skill ID, look for it in the skills folder "..\game\data\stats\skills\" and then you can fix or implement it (example below).
Quote
Also you can notice that in this folder exists "documentation.txt" - file with list of all effects which you can use for skills. Realisation of effects for skills on this path "..\game\data\scripts\handlers\effecthandlers\"

If you want to add a new skill - remember that skill must be specified both on the server side and on the client side (.dat files)
Description of .dat files https://l2jmobius.org/forum/index.php?topic=9990.0
Program to edit .dat files https://github.com/MobiusDevelopment/L2ClientDat

Below I will try to show 3 different examples of non-existing skills, with effects in which it is easy to make a mistake, and try to explain how they work. The examples are based on Essence Crusader(388) chronicle.
Showing only the server side!

The easiest skills to write are passive skills. In most cases except effects you need indicated only operateType and magicLevel:
Explanations in the comments
(P) Passive skill:
Code: [Select]
<skill id="01" toLevel="1" name="Example #1 Passive skill">
<icon>icon.skill0000</icon>
<!-- id, toLevel, name, icon — indicated in .dat file (Skillgrp_ClassicAden.dat) -->
<!-- "icon.skill0000" - means that server will use icon which indicated in client. You can change id of icon to any other existing. Indicates which icon will be displayed on the skill in the game. -->

<magicLevel>50</magicLevel>
<!-- Which minimum level player must have for learn this skill. -->

<operateType>P</operateType>
<!-- Info about SkillOperateType you can found in "..\java\org\l2jmobius\gameserver\model\skill\SkillOperateType.java":
A1 Active Skill with "Instant Effect" (for example damage skills heal/pdam/mdam/cpdam skills).
A2 Active Skill with "Continuous effect + Instant effect" (for example buff/debuff or damage/heal over time skills).
A3 Active Skill with "Instant effect for target + Continuous effect + Continuous effect for self"
A4 Active Skill with "Instant effect + ?" used for special event herb.
A5 Aura Active Skill
A6 Synergy Active Skill
CA1 Continuous Active Skill with "instant effect" (instant effect casted by ticks).
CA2 ?
CA5 Continuous Active Skill with "continuous effect" (continuous effect casted by ticks).
DA1 Directional Active Skill with "Charge/Rush instant effect".
DA2 Directional Active Skill with "Charge/Rush Continuous effect".
DA3 Directional Active Skill with Blink effect
DA4 Directional Active Skill with "Left Continuous effect".
DA5 Directional Active Skill with "Right Continuous effect".
P Passive Skill.
T Toggle Skill.
TG Toggle Skill with Group.
AU Aura Skill. -->

<passiveConditions>
<condition name="EquipWeapon">
<weaponType>
<item>SWORD</item>
<item>DUAL</item>
</weaponType>
</condition>
</passiveConditions>
<!-- Condition for passive skill. Will works only if player have equiped sword or dualswords. -->

<effects>
<!-- List of effects -->
<effect name="ResistAbnormalByCategory">
<amount>-20</amount> <!-- "-20" = 20% resist, "20" = -20% resist. -->
<slot>DEBUFF</slot>
</effect>
<effect name="DefenceTrait">
<ANOMALY>20</ANOMALY>
</effect>
<!-- 20% resist to debuffs and anomaly. -->

<effect name="DamageByAttack">
<amount>-10</amount>
<type>ENEMY_ALL</type>
</effect>
<effect name="DamageByAttack">
<amount>-10</amount>
<type>PK</type>
</effect>
<!-- -10% damage on you. You will recaive on 10% less damage. -->

<effect name="PhysicalDefence">
<amount>1000</amount>
<mode>DIFF</mode>
</effect>
<!-- +1000 (DIFF) p.def -->

<effect name="PhysicalDefence">
<amount>15</amount>
<mode>PER</mode>
<armorType>
<item>HEAVY</item>
</armorType>
</effect>
<!-- +15% (PER) p.def if you equip Heavy Armor -->

<effect name="DefencePhysicalSkillCriticalDamage">
<amount>-10</amount> <!-- "-10" = 10% less damage on you. -->
<mode>PER</mode>
</effect>
<!-- You will recaive on 10% LESS damage from crit of physical skill. -->

<effect name="DefenceMagicCriticalDamage">
<amount>10</amount> <!-- "10" = 10% more damage on you. -->
<mode>PER</mode>
</effect>
<!-- You will recaive on 10% MORE damage from crit of magical skill. -->
</effects>
</skill>

A little advice on how not to get confused with some effects, like:
Code: [Select]
DefenceCriticalDamage
DefenceCriticalRate
DefenceMagicCriticalDamage
DefenceMagicCriticalRate
DefencePhysicalSkillCriticalDamage
DefencePhysicalSkillCriticalRate
Quote
You can read their like ReceivedCriticalDamage etc. So if you see -10% you will think "I received -10%" and all will be logically. Same with ResistAbnormalByCategory and DamageByAttack effects.

(A1) Active skill - Instant Effect:
Code: [Select]
<skill id="02" toLevel="3" name="Example #2 Active skill">
<!-- toLevel="3" means skills have 3 levels. -->

<icon>icon.skill0000</icon>
<operateType>A1</operateType>
<hitTime>3000</hitTime>
<!-- Initial time for casting skill, 3000 = 3 sec -->

<coolTime>500</coolTime>
<!-- Time after casting skill which you can't use this skill, 500 = 0.5 sec -->

<basicProperty>PHYSICAL</basicProperty>
<!-- "..\java\org\l2jmobius\gameserver\enums\BasicProperty.java" -->
<!-- Before Goddess of Destruction, BaseStats was used. CON for physical, MEN for magical, and others for special cases.
After, only 3 types are used: physical, magic and none.
Physical: Stun, Paralyze, Knockback, Knock Down, Hold, Disarm, Petrify
Mental: Sleep, Mutate, Fear, Aerial Yoke, Silence
All other are considered with no basic property aka NONE -->

<isMagic>0</isMagic>
<!--
0 - physical (skill will use Soulshots and time of using skill depends on attack speed)
1 - magic (skill will use Spiritshots and time of using skill depends on casting speed)
2 - static (not mean static reuse)
3 - dance
4 - special
-->

<castRange>40</castRange>
<!-- Skill range -->

<effectRange>400</effectRange>
<!-- End point distance of skill effect. The effect will not be applied if the target managed to run away at a distance of more than 400 from you at the time the cast ends. Or something like that. -->

<reuseDelay>1000</reuseDelay>
<!-- Initial skill cooldown, 1000 = 1 sec -->

<staticReuse>true</staticReuse>
<!-- If true, the cooldown time of the skill will always be the same, which is specified in <reuseDelay>. -->

<effectPoint>
<value level="1">-200</value>
<value level="2">-300</value>
<value level="3">-400</value>
</effectPoint>
<!-- The value by which the hate will be lowered. -200 = minus -200 = +200, so monsters hate will increase after your attack from this skill. On first level of skill = -200 on second = -300 etc. -->

<magicLevel>
<value level="1">40</value>
<value level="2">50</value>
<value level="3">60</value>
</magicLevel>
<mpConsume>
<value level="1">10</value>
<value level="2">20</value>
<value level="3">30</value>
</mpConsume>
<!-- Amount of MP which skill will consume on each levels. -->

<targetType>ENEMY</targetType>
<!-- List of targetType: "..\java\org\l2jmobius\gameserver\model\skill\targets\TargetType.java" -->

<affectScope>SINGLE</affectScope>
<!-- List of affectScope: "..\java\org\l2jmobius\gameserver\model\skill\targets\AffectScope.java" -->

<conditions>
<condition name="TargetRace">
<race>UNDEAD</race>
<race>HUMAN</race>
<race>DARK_ELF</race>
<race>ELF</race>
<race>ORC</race>
<race>KAMAEL</race>
<race>SYLPH</race>
<race>DWARF</race>
</condition>
<!-- Skill can be applyied only on UNDEAD and players. -->
</conditions>
<!-- List of conditions: "..\game\data\scripts\handlers\skillconditionhandlers\" -->

<selfEffects>
<effect name="CallSkill">
<skillId>45110</skillId>
<skillLevel>
<value level="1">1</value>
<value level="2">1</value>
<value level="3">1</value>
</skillLevel>
</effect>
<!-- Call 1st level of Death Whisper on self while use this skill regardless of skill level. -->
</selfEffects>
<!-- Self effect. Applies to self. -->

<effects>
<effect name="PhysicalAttack">
<power>
<value fromLevel="1" toLevel="2">1000</value>
<!-- fromLevel & toLevel can be used if we have many levels with same value in skill. -->
<value level="3">2000</value>
</power>
<ignoreShieldDefence>true</ignoreShieldDefence>
<criticalChance>15</criticalChance>
<pDefMod>0.8</pDefMod>
<!-- 20% of target physical defence will be ignored. 1 - 0.8 = 0.2 = 20% -->
</effect>
</effects>
<!-- Effects which applies to targetType which indicated in this skill (ENEMY). -->

<pvpEffects>
<effect name="RealDamage">
<power>500</power>
</effect>
<!-- Deal additional 500 flat damage. -->
</pvpEffects>
<!-- PVP effect. Applies on other player only. -->

<pveEffects>
<effect name="PhysicalAttack">
<pAtkMod>1.5</pAtkMod>
</effect>
<!-- Deal damage which depends of your physical damage. 1.5 = 150% of your physical damage convert in power of skill. -->
<!-- If you have 1500 p.atk, it's same like:
<effect name="PhysicalAttack">
<power>2250</power>
</effect> -->
</pveEffects>
<!-- PVE effect. Does not apply to the player. When you use this skill on a monster, two attacks will occur, because we have two PhysicalAttack effects (in effects and in pveEffects). -->
</skill>

(A2) Active skill - Continuous effect + Instant effect [buff]:
Code: [Select]
<skill id="003" toLevel="3" name="Example #3 Buff ">
<icon>icon.skill0000</icon>
<operateType>A2</operateType>
<abnormalLevel>
<value level="1">3</value>
<value level="2">2</value>
<value level="3">4</value>
</abnormalLevel>
<!-- "Power" of abnormal effect. In this case 2nd level of skill not replace 1st level, because 3 > 2. 3th level of skill can replace 1st and 2nd level. -->

<abnormalTime>1200</abnormalTime>
<!-- Time of buff in seconds. 1200 = 20 mins. -->

<abnormalType>EXAMPLE_TYPE</abnormalType>
<!-- Abnormal type for effect. You can not indicate it. Effects with same abnormalType will be replace each other depend of their abnormalLevel. Need use one of existing or add new if needed. -->
<!-- "..java\org\l2jmobius\gameserver\model\skill\AbnormalType.java" -->

<abnormalVisualEffect>
<value fromLevel="1" toLevel="2">ULTIMATE_DEFENCE</value>
<value level="3">H_ULTIMATE_DEFENCE_B_AVE</value>
</abnormalVisualEffect>
<!-- Visual effect in game for skill. Need use one of existing. -->
<!-- "..java\org\l2jmobius\gameserver\model\skill\AbnormalVisualEffect.java" -->

<hitTime>1000</hitTime>
<isMagic>1</isMagic>
<reuseDelay>2000</reuseDelay>
<basicProperty>NONE</basicProperty>
<targetType>SELF</targetType>
<affectScope>SINGLE</affectScope>
<effects>
<effect name="MagicMpCost">
<!-- -% of mp cosumption of magic skills -->
<amount>
<value level="1">-100</value>
<value level="2">-150</value>
<value level="3">-200</value>
</amount>
<mode>PER</mode>
<magicType>1</magicType>
</effect>
</effects>
</skill>



Offline vedi

  • Heir
  • **
    • Posts: 28
I'm searching on how I can change the MP-HP-Weapon needed for Skill Icons, let's say an example.

Officialy Dash skill needs 30 mp to use, at 29 mp will become unable to use and also become gray.
If I change it from 30 mp to 100 mp, everything will work okay from xml/client side but it will need again 29 mp to become gray (can be used on 50-60-70-80-90-99 mp even if it's gray).
Do you know how you can fix this?


Online fruit

  • Distinguished King
  • *****
    • Posts: 841
I'm searching on how I can change the MP-HP-Weapon needed for Skill Icons, let's say an example.

Officialy Dash skill needs 30 mp to use, at 29 mp will become unable to use and also become gray.
If I change it from 30 mp to 100 mp, everything will work okay from xml/client side but it will need again 29 mp to become gray (can be used on 50-60-70-80-90-99 mp even if it's gray).
Do you know how you can fix this?
most probably you need to change value in .dat file - client side