Jump to content
  • 0

Making Buffs Passive & Merging Into 1 Skill


Marcox

Question

I need help with a task, advice on how it can be done without editing the core. I want to merge some buff effects into one skill and make them passive, specifically under the Luck skill, thus always applying buff effects to the character. How can I do it?

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

Or right, I forgot to mention. When it's passive skill you mustn't have this line

<effect count="1" name="Buff" time="12000" val="0" stackOrder="#Tab-runSpd" stackType="SpeedUp">

you have only to paste the <add order=.. > :P

 

Also, you can shorter the code

<skill id="194" levels="1" name="Lucky">
  <set name="target" val="TARGET_SELF"/>
  <set name="skillType" val="BUFF"/>
  <set name="operateType" val="OP_PASSIVE"/>
  <for>
      <add order="0x40" stat="runSpd" val="33"/>
  </for>
</skill>

Basically, if you're lost or you have any doubt, you can always check how it's builded any already existing passive skill :)

Edited by SweeTs
Link to comment
Share on other sites

  • 0

Still I need to learn how the skills definition works and I can learn it if you can show me how to correctly paste one skill's effect into the other? If you can, do it on the example below. I need to learn what parts of the skill's entry do I need to copy into the desired skill to have that effect.

 

This is the skill I want to work like a passive buff containing several other buff effects, let's do only the Wind Walk effect.

 

 

 

<skill id="194" levels="1" name="Lucky">
  <set name="power" val="0.0"/>
  <set name="target" val="TARGET_SELF"/>
  <set name="skillType" val="LUCK"/>
  <set name="operateType" val="OP_PASSIVE"/>
  <set name="castRange" val="-1"/>
  <set name="effectRange" val="-1"/>
  <!-- cannot be learned, given -->
  <set name="canLearn" val=""/>
  <for>
  </for>
</skill>

 

 

 

and Wind Walk entry is this:

 

 

<skill id="1204" levels="2" name="Wind Walk" enchantLevels1="30" enchantLevels2="30" >
  <table name="#enchantMagicLvl"> 76 76 76 77 77 77 78 78 78 79 79 79 80 80 80 81 81 81 82 82 82 82 83 83 83 84 84 85 85 85 </table>
  <enchant1 name="magicLvl" val="#enchantMagicLvl"/>
  <enchant2 name="magicLvl" val="#enchantMagicLvl"/>
  <table name="#ench1time">
  1240 1280 1320 1360 1400 1440 1480 1520 1560 1600
  1640 1680 1720 1760 1800 1840 1880 1920 1960 2000
  2040 2080 2120 2160 2200 2240 2280 2320 2360 2400
  </table>
  <table name="#ench2MpConsume">
  20 20 19 19 19 18 18 18 17 17
  17 16 16 16 15 15 15 14 14 14
  13 13 12 12 12 11 11 11 10 10
  </table>
  <table name="#ench2MpConsume_Init">
  5 5 5 5 5 5 5 5 5 5
  4 4 4 4 4 4 4 4 4 4
  3 3 3 3 3 3 3 3 3 3
  </table>
  <table name="#mpConsume_Init"> 4 6 </table>
  <table name="#mpConsume"> 16 21 </table>
  <table name="#Tab-runSpd"> 20 33 </table>
  <table name="#aggro"> 204 285 </table>
  <set name="mpInitialConsume" val="#mpConsume_Init"/>
  <set name="mpConsume" val="#mpConsume"/>
  <set name="power" val="0.0"/>
  <set name="target" val="TARGET_ONE"/>
  <set name="reuseDelay" val="6000"/>
  <set name="hitTime" val="4000"/>
  <set name="skillType" val="BUFF"/>
  <set name="isMagic" val="true"/>
  <set name="operateType" val="OP_ACTIVE"/>
  <set name="castRange" val="400"/>
  <set name="effectRange" val="900"/>
  <set name="aggroPoints" val="#aggro"/>
  <enchant2 name="mpConsume" val="#ench2MpConsume"/>
  <enchant2 name="mpInitialConsume" val="#ench2MpConsume_Init"/>
  <for>
    <effect count="1" name="Buff" time="1200" val="0" stackOrder="#Tab-runSpd" stackType="SpeedUp">
      <add order="0x40" stat="runSpd" val="#Tab-runSpd"/>
    </effect>
  </for>
  <enchant1for>
    <effect count="1" name="Buff" time="#ench1time" val="0" stackOrder="33" stackType="SpeedUp">
      <add order="0x40" stat="runSpd" val="33"/>
    </effect>
  </enchant1for>
</skill>

Edited by Marcox
Link to comment
Share on other sites

  • 0

Just add effect tag inside the empty <for></for>. As you can see from the example, the values are taken from other table, so you can copy that table as well (the table is because, each lvl of the skill, there is other value, but since your skill is lvl 1 you don't need it) or change the val to a number when you want all lvl add the same amount, or your skill lvl is 1 (for correct value, look at table Tab-runSpd, it's 20 and 30, so at lvl 1 its adding 20 speed and at lvl 2 it's adding 30). Ofc I am talking about the <add order> line :)

    <effect count="1" name="Buff" time="1200" val="0" stackOrder="#Tab-runSpd" stackType="SpeedUp">
      <add order="0x40" stat="runSpd" val="#Tab-runSpd"/>
    </effect>

I guess  I was clear, if not just ask :P

Edited by SweeTs
Link to comment
Share on other sites

  • 0

Thanks a lot, I appreciate and I'll practice with it for a while before I get back to you. :P

 

/EDIT: Lucky works perfect as an active skill and gives the effect of Wind Walk but when changed to passive, doesn't. I take it that buff effects can only work as active effects? Another thing is, the name of the skill doesn't change even if the skill name in .xml has been, so looks like this can't be modified without the code change?

The same thing with adding a custom skill to all classes, right? Can only be done through code edit?

Edited by Marcox
Link to comment
Share on other sites

  • 0

Skill name is handled from client side, you have to edit skillname-e.dat from system folder => L2FileEdit. Check classes folder (data/xml/classes), there you can find all files with all classes and their skills, so you just have to add the new skill to specific classes :P

 

About the passive effect, you must change the target.

 

 

<set name="target" val="TARGET_ONE"/>

 

Target one meast you can cast the skill on any "target" you make. To make it self effect as passive, make it TARGET_SELF :)

Link to comment
Share on other sites

  • 0

Great, I'll play around with those skills and thanks again for help.

 

I have it set to target_self all the time, the problem is that when the operate type is changed to OP_PASSIVE, the skill is still there but doesn't apply it's effect, in this case Wind Walk's effect so I wonder if such effects that normally belong to active skills have a 'problem' as passive effects?

Edited by Marcox
Link to comment
Share on other sites

  • 0

Nop, no matter if its active or passive. Well, post here the code of the skill. Maybe something is wrong.

Edited by SweeTs
Link to comment
Share on other sites

  • 0

<skill id="194" levels="1" name="Lucky">
  <table name="#Tab-runSpd"> 33 </table>
  <set name="power" val="0.0"/>
  <set name="target" val="TARGET_SELF"/>
  <set name="reuseDelay" val="0"/>
  <set name="hitTime" val="0"/>
  <set name="skillType" val="BUFF"/>
  <set name="isMagic" val="true"/>
  <set name="operateType" val="OP_PASSIVE"/>
  <set name="castRange" val="0"/>
  <set name="effectRange" val="0"/>
  <for>
    <effect count="1" name="Buff" time="12000" val="0" stackOrder="#Tab-runSpd" stackType="SpeedUp">
      <add order="0x40" stat="runSpd" val="#Tab-runSpd"/>
    </effect>
  </for>
</skill>

 

 

Set to active works perfect, casts itself on self.

Edited by Marcox
Link to comment
Share on other sites

  • 0

WORKS :D Thanks so much mate, I appreciate your patience and that you wanted to help with a very basic issue. :)

 

 

 

For the record since it might help someone, this is the correct entry that adds passively a buff effect:

 

<skill id="194" levels="1" name="Lucky">
  <set name="target" val="TARGET_SELF"/>
  <set name="skillType" val="BUFF"/>
  <set name="operateType" val="OP_PASSIVE"/>
  <for>
    <add order="0x40" stat="runSpd" val="33"/>
  </for>
</skill>

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.


×
×
  • Create New...