View Full Version : special_abilities
Trubles
07-03-2014, 09:09 AM
How does this field work?
I cannot grasp an understanding as to why it would change from unique lettering for special attacks, to mixed numbers that aren't batch editable, unless I'm clinically retarded.
wat
Thanks guys if someone could explain.
Kingly_Krab
07-03-2014, 04:52 PM
This field works similarly to the old special attacks. This field has new functionality that the older field does not, here's (http://wiki.eqemulator.org/p?NPC_Special_Attacks) the page for more information on it.
Also, to set a special ability to active you set the column to #,1^#,1^#,1 where # is the special ability, ",1" is setting it to active, and ^ is the separator between abilities.
The reasons it changed were:
- We were close to running out of letters and some of the letters that we were forced to use made absolutely no sense.
- This way allows for expanded functionality where each ability can have parameters.
Example using summon doing something that wasn't possible before:
1,1,1000,100
This tells the npc that it has special attack summon target to itself on a 1000ms(1 sec) cd so long as it's hp <= 100%.
Alternatively you could do:
1,2,6000,97
This tells the npc that it has special attack summon itself to its target on a 6000ms(6 sec) cd so long as it's hp <= 97%.
Such things had to be hard coded before but now we can set them up so they don't have to be if we so wish.
Burningsoul
07-04-2014, 02:20 AM
^ That's actually really swank. Thumbs way up!
Trubles
07-06-2014, 10:09 PM
I've been trying to find a way to batch remove special attacks, still cant grasp it.
Necro'ing this since I was trying to work out how this field worked too...
I had a look at mass editing too, and basically using pure SQL you can't do it without borking stuff. e.g.
UPDATE npc_types
SET special_abilities = replace(special_abilities, '1,1','');
will nuke Immune to fleeing- "21,1" and so on. This seems to add a regex replace: https://github.com/hholzgra/mysql-udf-regexp but I have nfc on UDF's for mysql. Tbh if I ever needed to I would just write a tool to do it programmatically, but a work around would be to dump the table as a text file and use your favourite regex enabled program to work it's magic - sed, or even notepad++, and then re-import.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.