Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 09-12-2008, 04:33 PM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default Spell casting priorities in spells_us.txt

So, I've been working on the whole loading the spells from the DB thing, and since you have to point everything manually, I started updating SPDat_Spell_Struct in zone/spdat.h. I already found some new fields through the help of cross referencing with Lucy, pulling info from Ailia's spell editor, and inferred some other ones, and came across npc_category (field 187) & npc_usefulness (field 188). As far as I can tell, this does almost the exact same thing as the npc_spell_entries table as far as spell types & priorities. It looks like npc_usefulness is the priority, with the higher number being the highest priority. This is what the categories seem to equate to:
  • 0: Not cast by NPCs, so no priorities, etc
  • 1: AoE Detrimental spells
  • 2: Single Target Detrimental spells
  • 3: Buffs
  • 4: Pet spells
  • 5: Healing spells
  • 6: Gate, or possibly last cast before death
  • 7: Debuffs
  • 8: Dispells

Here's the balancing:
Code:
mysql> SELECT npc_category, COUNT(*) FROM spells_new GROUP BY npc_category ORDER BY npc_category;
+--------------+----------+
| npc_category | COUNT(*) |
+--------------+----------+
|            0 |     9610 |
|            1 |      298 |
|            2 |      738 |
|            3 |      224 |
|            4 |      114 |
|            5 |       91 |
|            6 |        4 |
|            7 |      445 |
|            8 |       16 |
+--------------+----------+
9 rows in set (0.00 sec)
Here are some examples:

npc_category = 0:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 0 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+----+---------------------+----------------+
| id | name                | npc_usefulness |
+----+---------------------+----------------+
|  0 |                     |              0 |
|  3 | Summon Corpse       |              0 |
|  4 | Summon Waterstone   |              0 |
|  5 | Cloak               |              0 |
|  7 | Hymn of Restoration |              0 |
|  8 | Cleanse             |              0 |
| 11 | Holy Armor          |              0 |
| 18 | Guard               |              0 |
| 19 | Armor of Faith      |              0 |
| 20 | Shield of Words     |              0 |
+----+---------------------+----------------+
10 rows in set (0.15 sec)
npc_category = 1:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 1 ORDER BY npc_usefulness DESC, id ASC LIMIT 50;
+-------+--------------------------------------+----------------+
| id    | name                                 | npc_usefulness |
+-------+--------------------------------------+----------------+
|   835 | Chaos Breath                         |           3062 |
|  9047 | Fabled Chaos Breath                  |           3062 |
|  1608 | Entrapping Roots                     |           2824 |
|  5451 | Circle of Thunder                    |            569 |
|  1655 | Jyll's Wave of Heat                  |            461 |
|  8114 | Shrieker Sonic Wave                  |            461 |
|  8115 | Shrieker Sonic Wave                  |            461 |
|  8116 | Shrieker Sonic Wave                  |            461 |
|  8117 | Nimbus Shrieker Wave                 |            461 |
|  8118 | Nimbus Shrieker Wave                 |            461 |
|  8119 | Nimbus Shrieker Wave                 |            461 |
|  2264 | Hail of Ice                          |            460 |
|  1653 | Jyll's Static Pulse                  |            429 |
|  1657 | Winds of Gelid                       |            427 |
|  1654 | Jyll's Zephyr of Ice                 |            401 |
|  2253 | Torrent of Ice                       |            352 |
|  1659 | Scintillation                        |            243 |
|  1644 | Pillar of Flame                      |            241 |
|  1542 | Upheaval                             |            223 |
|  1645 | Pillar of Lightning                  |            207 |
|  1646 | Pillar of Frost                      |            203 |
|  1652 | Vengeance of Al'Kabor                |            181 |
|  1394 | Maelstrom of Electricity             |            150 |
|  1650 | Inferno of Al'Kabor                  |            148 |
|  1651 | Retribution of Al'Kabor              |            148 |
|  6638 | Devouring Flames of Al'Kabor         |            148 |
|  6648 | Grip of Fear                         |            148 |
|  6649 | Burning Hatred                       |            148 |
|  6651 | Hammer of Absolution                 |            148 |
|  6653 | Seething Embers                      |            148 |
|  6654 | Frozen In Time                       |            148 |
| 11372 | Explosive Flames                     |            148 |
|  1602 | Blizzard                             |            147 |
|   733 | Supernova                            |            132 |
|  1648 | Tears of Solusek                     |            130 |
|  3189 | Tears of Arlyxir                     |            129 |
|  1606 | Fist of Karana                       |            121 |
|  1647 | Tears of Prexus                      |            119 |
|   742 | Denon's Desperate Dirge              |            111 |
|  1662 | Sirocco                              |            111 |
| 10467 | Denon's Dirge of Destruction         |            111 |
| 10468 | Denon's Dirge of Destruction Rk. II  |            111 |
| 10469 | Denon's Dirge of Destruction Rk. III |            111 |
|  1649 | Tears of Druzzil                     |            108 |
|  1665 | Manastorm                            |            106 |
|  1587 | Torrent of Poison                    |             90 |
|   416 | Word Divine                          |             74 |
|  2162 | Black Winds                          |             70 |
|   471 | Thunderclap                          |             69 |
|   406 | Earthquake                           |             65 |
+-------+--------------------------------------+----------------+
50 rows in set (0.14 sec)
npc_category = 2:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 2 ORDER BY npc_usefulness DESC, id ASC LIMIT 50;
+-------+-------------------------------+----------------+
| id    | name                          | npc_usefulness |
+-------+-------------------------------+----------------+
|  1719 | Engorging Roots               |           1486 |
|  1057 | Darkening Death               |            756 |
|  3933 | Savage Jaws                   |            579 |
|    77 | Engulfing Roots               |            538 |
|  2327 | Gallenite's Distraction       |            531 |
|  2545 | Insidious Retrogression       |            370 |
|   490 | Enveloping Roots              |            265 |
|  4110 | Burning Sand                  |            217 |
|  3489 | Blood of Hate                 |            216 |
|  3191 | Shock of Magic                |            214 |
|  8512 | Chaos Flame                   |            214 |
|  8521 | Domunus Effect                |            214 |
| 11831 | Chaos Immolation              |            214 |
| 11832 | Chaos Immolation Rk. II       |            214 |
| 11833 | Chaos Immolation Rk. III      |            214 |
| 11839 | Wildmagic Strike              |            214 |
| 11840 | Wildmagic Strike Rk. II       |            214 |
| 11841 | Wildmagic Strike Rk. III      |            214 |
| 11842 | Pure Wildmagic                |            214 |
| 11843 | Pure Wildmagic Rk. II         |            214 |
| 11844 | Pure Wildmagic Rk. III        |            214 |
|  4885 | Sylvan Embers                 |            199 |
|  3976 | Draught of Lightning          |            186 |
|  4890 | Night Fire                    |            184 |
|  2884 | Garrison's Superior Sundering |            174 |
|  3437 | Immolation of Ro              |            163 |
|  4972 | Ancient: Frozen Chaos         |            159 |
|  1591 | Pox of Bertoxxulous           |            158 |
|  1426 | Ice Spear of Solist           |            157 |
|  4897 | Sylvan Burn                   |            157 |
|  2885 | Funeral Pyre of Kelador       |            155 |
|  2883 | Elnerick's Electrical Rending |            151 |
|  4876 | Trushar's Frost               |            143 |
|  3418 | Frozen Wind                   |            139 |
|  1604 | Breath of Karana              |            134 |
|  4980 | Ancient: Burning Chaos        |            132 |
|  1658 | Sunstrike                     |            129 |
|  6869 | Sunstrike                     |            129 |
|  2877 | Moonfire                      |            128 |
|  3493 | Frost Spear                   |            128 |
|  1617 | Pyrocruor                     |            124 |
|  4879 | Madness of Ikkibi             |            112 |
|  1637 | Draught of Fire               |            111 |
|  3431 | Brushfire                     |            108 |
|  7272 | Scorched Earth                |            108 |
|  8490 | Scorched Earth                |            108 |
|     6 | Ignite Blood                  |            106 |
|  8949 | Dark Rune Effect              |            106 |
|    76 | Ensnaring Roots               |            105 |
|  1619 | Devouring Darkness            |            103 |
+-------+-------------------------------+----------------+
50 rows in set (0.14 sec)
npc_category = 3:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 3 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+------+---------------------------+----------------+
| id   | name                      | npc_usefulness |
+------+---------------------------+----------------+
| 1297 | Rune Shield               |           1502 |
| 3235 | Focus of Soul             |           1216 |
| 3296 | Faith                     |            792 |
| 1709 | Wonderous Rapidity        |            637 |
| 1708 | Aanya's Quickening        |            581 |
| 1710 | Visions of Grandeur       |            575 |
| 1432 | Focus of Spirit           |            574 |
| 2188 | Protection of the Cabbage |            574 |
| 2585 | Valor of Marr             |            567 |
| 3039 | Protection of the Wild    |            558 |
+------+---------------------------+----------------+
10 rows in set (0.15 sec)
npc_category = 4:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 4 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+------+----------------------+----------------+
| id   | name                 | npc_usefulness |
+------+----------------------+----------------+
| 1574 | Spirit of the Howler |           6502 |
| 1623 | Emissary of Thule    |           6502 |
| 1621 | Minion of Shadows    |           5252 |
| 1622 | Servant of Bones     |           5252 |
|  166 | Frenzied Spirit      |           5002 |
|  443 | Invoke Death         |           4902 |
|  165 | Guardian Spirit      |           4502 |
|  495 | Cackling Bones       |           4502 |
| 2631 | Spirit of Khati Sha  |           4502 |
|  577 | Vigilant Spirit      |           4002 |
+------+----------------------+----------------+
10 rows in set (0.00 sec)
npc_category = 5:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 5 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+------+--------------------------+----------------+
| id   | name                     | npc_usefulness |
+------+--------------------------+----------------+
| 1469 | Healing Complete         |          12000 |
|  842 | Healing Touch            |          10000 |
|   13 | Complete Healing         |           7500 |
| 9755 | Promised Renewal         |           7500 |
| 9756 | Promised Renewal Rk. II  |           7500 |
| 9757 | Promised Renewal Rk. III |           7500 |
| 3471 | Word of Replenishment    |           2500 |
| 2182 | Ethereal Light           |           1600 |
| 4901 | Daluda's Mending         |           1550 |
| 3233 | Tnarg's Mending          |           1300 |
+------+--------------------------+----------------+
10 rows in set (0.14 sec)
npc_category = 6:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 6 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+------+-------------------+----------------+
| id   | name              | npc_usefulness |
+------+-------------------+----------------+
|   36 | Gate              |            702 |
| 7790 | Spirit Sending    |            702 |
| 8796 | Will of the Borne |              0 |
| 8826 | Glare of Contempt |              0 |
+------+-------------------+----------------+
4 rows in set (0.14 sec)
npc_category = 7:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 7 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+-------+----------------------+----------------+
| id    | name                 | npc_usefulness |
+-------+----------------------+----------------+
|  1772 | Mala                 |            336 |
|  1704 | Wind of Tashanian    |            327 |
|  1578 | Malo                 |            315 |
|  8505 | Idol of Malos Effect |            315 |
|  8945 | Idol of Malo Effect  |            315 |
| 10068 | Malis                |            315 |
| 10069 | Malis Rk. II         |            315 |
| 10070 | Malis Rk. III        |            315 |
|  4878 | Bliss of the Nihil   |            303 |
|  1699 | Wind of Tashani      |            292 |
+-------+----------------------+----------------+
10 rows in set (0.14 sec)
npc_category = 8:
Code:
mysql> SELECT id, name, npc_usefulness FROM spells_new WHERE npc_category = 8 ORDER BY npc_usefulness DESC, id ASC LIMIT 10;
+------+---------------------+----------------+
| id   | name                | npc_usefulness |
+------+---------------------+----------------+
| 1526 | Annul Magic         |              9 |
| 1697 | Recant Magic        |              9 |
| 2034 | Recant Magic        |              9 |
| 9088 | Purge Magic         |              9 |
|   25 | Pillage Enchantment |              4 |
|   49 | Nullify Magic       |              4 |
| 2736 | SpellTheft1         |              4 |
| 5013 | SpellTheft2         |              4 |
| 5014 | SpellTheft3         |              4 |
| 5570 | Pillage Magic       |              4 |
+------+---------------------+----------------+
10 rows in set (0.15 sec)
Now, I have no idea why it's done this way, since the client doesn't need to know any of this (except maybe for becoming an NPC?), but this might lead to some opportunities to use the spells file for default values for type and priority in npc_spell_entries. For example, if either is set to -1 (like manacost, recast_delay, etc), pull the default. This should make it a lot easier to tune NPCs to live overall, but still allow tuning of spell lists for specific mobs, encounters, etc.

Anyways, mainly wanted to make sure I got this posted somewhere before I forgot about it.
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:05 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3