Jump to content
  • 0

Making Buffs Passive & Merging Into 1 Skill


Question

Posted

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?

12 answers to this question

Recommended Posts

  • 0
Posted (edited)

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
  • 0
Posted (edited)

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
  • 0
Posted (edited)

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
  • 0
Posted (edited)

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
  • 0
Posted

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 :)

  • 0
Posted (edited)

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
  • 0
Posted (edited)

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

Edited by SweeTs
  • 0
Posted (edited)

<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
  • 0
Posted

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>

Guest
This topic is now closed to further replies.


  • Posts

    • fixed the flickering , if you noticed to an other specific page please let me know
    • And Discord: https://discord.gg/3aYqWNqb
    • Ofc: https://discord.gg/3aYqWNqb
    • You can find some H5 skins shared in old L2 modding Discords, but most of the higher‑quality ones are either paid or come bundled with full client edits. I usually mix in commissioned work and whatever I can patch myself. On a side note, I fund a lot of these commissions by selling off game items through instant sell cs2 skins, which has been a quick way for me to get some cash for projects.
    • There is no need for gRPC in this case, even tho originally it was gRPC based but since we don't need it to be bi-directional, we switched to simple http requests for the web calls and SSEs for the data streamed from the server. There are distributed locks in place to precent race conditions between actions that can happen between multiple web instances and the server.   Local models can also be slow depending on the model, and most external models can actually be faster than local ones if you use Flash 2.5 or something along those lines. I am running on 512GB of Unified Memory on my Mac Studio M3 Ultra so the speed of the local model for a small model is pretty good but I tested it with Gemini too and it works equally as fast and in some cases faster. The way it works is that I'm using pgvector (one of the benefits of moving to Postgres) to search the data and see what the player can see etc and there is some batching of the next few actions for 2-4 seconds for the user until the next LLM request fires. The batching also includes branching on logic so if they for example fall under some HP they will move to kiting instead of attacking or maybe they heal etc.   Everything is authed and permission-based. The server and the backend of the frontend have secure communication between them, either with a symmetric key (not recommended for production) or a certificate (the recommended way), so there is no worry. It's all tied to the account's access level, etc., so nobody can make an action that they normally wouldn't be allowed to do. Even the MCP is token-based, and there are prompt injection protections in place. The MCP is audited, and every mutation needs confirmation. The admin area is only accessible to the admin account anyway so normal users can't access it.  
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..