No categories assigned

Database:CoreNPCData

EQ2Emulator: Core NPC Configuration Data

The datasets configured here are provided as templates for server admins to assign to NPCs to create a more immersive gaming experience. This is considered CORE data merely because they can be used on any type of spawned NPC, and not tied to any specific Content setup.


Once you set up your spawn_npc_{type} table entries, you can then link a particular spawn_id to this configuration by using the fields in the spawn_npcs table:

  • equipment_list_id
  • skill_list_id
  • secondary_skill_list_id (if you want an alternate skill set to be available)
  • spell_list_id
  • secondary_spell_list_id (if you want an alternate spell set to be available)


Examples of this at the end of this article.


Spawn NPC Equipment

This table is used to grant your NPC the same bonuses offered by the gear you assign (eg., giving your NPC a +10 Str bonus because it is wearing a piece of armor that grants +10 Str). This is NOT appearance data! Do not confuse equipping an NPC with a piece of stats armor, with appearances. Visual appearances are handled much differently (see NPC Appearances table definitions)


Example: In my zone, I have spawned 'a sapswill invader'. That spawn has basic stats only, whatever you have set up in the spawn_npcs table. If I want this one spawn_id to have some bonuses, rather than create an entirely new spawn_id for that difference, I can create a series of spawn_npc_equipment table entries to reflect exactly how much gear-related bonus I want this NPC to have.


In my SQL GUI tool, I select the spawn_npc_equipment table, and insert a new record with a equipment_list_id of 1 (I picked 1 because it is my first unique equipment list), and the item_id of the item I wish the NPC to "wear":

Spawn equip2.jpg


In this example, it was item_id 54195, the 'tailored laborers vest':

Spawn equip1.jpg


Once I go to my sapswill invader NPC record and assign the equipment_list_id of 1, that now has a +2 sta, +2 agi, +2 int, and +5 noxious bonuses.


You can see the endless customization and configurability you can gain from this option!


Spawn NPC Skills

You can build custom Skill assignments to your NPCs as well. Say you want your sapswill invader to also know how to use 1H Slashing, 1H Blunt and Piercing. Simply build a skill_list with those skill_ids set, assign it to your NPC, and you're done!


Alternately, NPC Skill Lists allow you to set up a secondary list of skills too, much like a player has a primary and secondary skill set.


Spawn NPC Spells

Much like the NPC Skill Lists, your NPC can be allowed to cast any spell in the database on an attacker. Set the spell_id to the spell_list you create, assign it to the NPC and now your NPC can cast that spell during combat (see spawn_npcs field definitions for more information on casting spells)


Examples

We will now walk through 1 complete setup of a custom NPC with equipment bonuses, spells and skill sets designed and assigned.

In this walkthru, I am using SQLYog 9.2 as a DB editing tool. Due to our Foreign Key (FK) relationships in our database, modern editing tools allow pop-up lookup dialogs - pretty fancy!


Making the NPC Equipment List

In my database, I find the table named spawn_npcs_equipment and open it for editing:

Spawn equip3.jpg


I enter equipment_list_id of '1' because it is the first equipment list I am building.


 Care should be taken when assigning items to list IDs, since multiple items can belong to a single list!


Using my SQL GUI tool, I can click the option to view Items, and even filter on the item I wish to look for:

Spawn equip4.jpg


Once I select the item, I can save the row and a new NPC Equipment List is created, and can now be assigned to an NPC.


Assign Equipment List to NPC

Now go to your `spawn_npcs` table, and locate the spawn you wish to assign this list to, and set that NPCs 'equipment_list_id' to match the list ID you just created (1):

Spawn equip5.jpg


Voila! Now your NPC has item stats bonuses that are awarded for "wearing" that piece of armor (though it will not affect the NPCs appearance, only stats!)


Making the NPC Skills List

In this example, I want my NPC to be able to wield the "628 Rapier":

Spawn skill2.jpg

Note: I am using this weapon only to demonstrate the required skills, not the stats on the weapon itself.


If I want my NPC to possess the same skills required to wield this weapon, I first identify he will need the Rapier skill (skill_id: 641561514). Also, he will need the secondary skill of Piercing (skill_id: 3048574950).

Spawn skill1.jpg

I know that looks busy, but here's the run-down:

  • Build skill_list_id 1 with skill_id 641561514, and set the proficiency to whatever you want
  • Build skill_list_id 2 with skill_id 3048574950, and set the proficiency to whatever you want
  • `starting_value` is similar to how proficient a player is at a skill. 25 is default, but it can be any value skill value


Assign Skills List to NPC

Just like assigning your equipment list to an NPC, find the `spawn_npcs` table, and locate the `skill_list_id` and `secondary_skill_list_id` fields.


Spawn skill3.jpg


Assign `skill_list_id` the value of 1 (your Primary skill) and `secondary_skill_list_id` the value of 2 (your Secondary skill).

Now your NPC will be able to wield the 628 Rapier! (and any other items that restrict pri/sec skills to various equipment)


Making the NPC Spells List

Assign Spells List to NPC

Back to Content:Introduction

Content:Introduction