NPC Editing Tutorial
Usefull tools :
- MYSQL Control Center : it is usefull to edit rows of a sql table, it's exactly what we need for npc editing See Here : http://www.eqemulator.net/forums/viewtopic.php?t=11440 - my LootEditor's Program : for loot =) See Here : http://www.eqemulator.net/forums/viewtopic.php?t=14357 - Mongrel's Spell Editor : to find spells ! See Here : http://camongrel.hbnet.de/files/ - EQEmu's server GuideBook v1.3 : for races index, materials, textures for example =) See Here : http://www.eqemulator.net/forums/viewtopic.php?t=10900 - And IEQ for merchants See Here : http://www.eqemulator.net/forums/viewtopic.php?t=13944 The NPC_TYPES Table : I will explain all fields one by one =) The SQL Table : Code:
CREATE TABLE `npc_types` ( 1) ID the id =) 2) name and lastname npc names must have no blanks, use '_' character if u want that a blank appears in its name in the game a npc with only '_' as its name will have no name in the game that's usefull if you want to make untargetable statues for example , or invisible npcs 3) level the npc level 4) race, gender, texture and helmtexture the npc race number see the eqemu's server guidebook about races, it have a race index with images of each race by gender and material ( texture and helmtexture ) =) race = 1 is a human for example race = 288 is Rallos Zek himself =) for a race number, it can exist different models the most often there is a male and female model ( gender ) gender = 0 is a male gender = 1 is a female gender = 2 is neutral ( for monsters ) but for example for velious dragons, it can exist several different models and combinations ( with body and heads ) texture is used for the body helmtexture is used for the head all this is explained in the guidebook 5) class it's the class of the npc : Code:
warrior = 1 6) Body Type everything about body type is not discovered yet, it seems to be used by everquest's client program to identify which type of npc it is here is a small list : Code:
1 => "Normal" ( default ), to make a npc act as an undead ( for spells etc ... ) it is bodytype = 3 bodytype = 11 is used to create untargetable type npcs so for example to create a gargoyle statue npc : give it bodytype = 11 give it "_" as its name so no name will appear give it no faction so it won't attack anyone give it the race 203 of the gargoyle and texture = 0 helm = 0 then you have your gargoyle statue =) 7) hp, hp_regen_rate, mana regen_rate hp : it's the hit points of the npc hp_regen_rate : it is the number of hp it regens by ticks 0 makes a npc to not regen its hit points mana_regen_rate : same but for mana be carefull, npcs with an insane hp regen can be impossible to kill 8 ) size it's the size of the npc =) some examples : humans => size = 6 dwarf => size = 4 big boss/giants => size = 20 9) loottable_id it's the id of its loottable it points to the 'id' field in the 'loottable' sql table no loottable => loottable_id = 0 see in the loottable table section below for more information 10) merchant_id it's the id of its merchant item list it points to the 'merchantid' field in the 'merchantlist' sql table see in the merchantlist table section below for more information 11) npc_spells id it's the id of its spells list it points to the 'id' field in the 'npc_spells' sql table see in the npc_spells table section below for more information 12) npc_faction_id it's the id of its faction list it points to the 'id' field of the 'npc_faction' sql table same =) see below for more information 13) mindmg and maxdmg minimum damage and maximum damage of the npc =) 14) npcspecialattks it's the special abilities of the npc, it uses letters like 'S' or 'Q' for each ability here's the list of all special abilities : Code:
E => Enrage if you specify 'SQFRU' to a npc : he will summon, quad, flurry, rampage, and is unslowable, conclusion, it's a very nasty npc ! there is no order in the letters you see it lacks the Unrootable/Unsnarable ability or the death touch ability ... devs have work ! =) 15) Banish let it to 0 don't touch =) it's an ability for a monster to banish people who have lvl 52+, it's used for nagafen and lady vox 16) Aggroradius it's the distance of aggro from the position of the npc around him default in eqemu is 70 so if you let 0, it will be 70 when a player will enter this distance, the npc will aggro, if other npcs are in this distance too, and if they have the same faction, they will help him and aggro too mobai must be changed because at this moment, if all monsters are in aggro radius of other monsters, they will chain aggro and you can aggro all the zone like this in eqlive the distance and line of sight to the npc interacts so it won't happen but not yet in eqemu =( so be careful with aggro radius and npc placement =) 17) face, luclin_hairstyle, luclin_haircolor, luclin_eyecolor and luclin_beardcolor it's used for luclin player models see in eqemu's guidebook for more information 18 ) fixedz, dmelee_texture1, dmelee_texture2 don't touch =) not usefull I think 19) walkspeed and runspeed when a npc move and has noone in its hate list, he is walking if he aggroes, he is running default speed are : walkspeed = 0.67 and runspeed = 1.25 fastest mounts speed = 1.75 20) MR, CR, DR, FR and PR MR => Magic Resistance CR => Cold Resistance DR => Disease Resistance FR => Fire Resistance PR => Poison Resistance the resistance system doesn't work perfectly yet, but it's a start =) so don't bother too much with that, formulas have yet to be tweaked 21) ipc If you don't know what it is, do like me =) Don't touch =) 22 ) see_invis and see_invis_undead see_invis = 1 if you want that your npc sees invisible, else 0 see_invis_undead = 1 if you want that your npc sees invisible versus undead, else 0 normal npcs don't see invis, but sees invisible to undead undead npcs don't see invisible versus undead but sees invisible 23 ) qglobal it's a field used for perl global quests don't touch =) now you know everything about the npc_types table 8) Spawn Tables here are the 3 sql tables that manage the npc spawns : Code:
spawn2 => spawn location spawnentry => mob it works like this : a) you define at first a spawngroup b) you add mobs to this spawngroup c) and then you specify at which locations this spawngroup will pop a) you define at first a spawngroup : so I look to the spawngroup table : I need a unique spawngroup id and I need to give to the spawngroup a name for example : I have no spawn yet in my database, I create the 1rst one at ID=1, it will be a spawngroup of rats in planes of disease So I obtain this spawngroup : spawngroupID=>1,name=>Plane of Disease Rats b) I add mobs into this spawngroup I look then at the spawnentry table: I need the id of the spawngroup, the id of the npc, and its chance to spawn in percent And i have to do that for each npc in the spawn group In my example : the spawngroupID is 1 I want that a diseased rat spawn as often as a swamp rat disease rat can be lvl 50 to 52 swamp rat is lvl 52 or lvl 54 in my database I see that : - a_diseased_rat lvl 50 is npcid 40010 - a_diseased_rat lvl 51 is npcid 40011 - a_diseased_rat lvl 52 is npcid 40012 - a_swamp_rat lvl 52 is npcid 40020 - a_swamp_rat lvl 54 is npcid 40021 a_diseased_rat must have in total 50% chance so I divide it for all the different diseased rat same for the swamp rat so I add 4 spawnentry rows : spawngroupID=>1,npcid=>40010,chance=>20 spawngroupID=>1,npcid=>40011,chance=>20 spawngroupID=>1,npcid=>40012,chance=>10 spawngroupID=>1,npcid=>40020,chance=>25 spawngroupID=>1,npcid=>40021,chance=>25 I have now my spawn table, I just have to specify where it will pop c) spawn locations If you look at the spawn2 table : we need a unique id, a spawngroupid, a zone name, a location ( x,y,z,heading), a respawntime variance is a random time added or substracted to the respawntime =), you should use this only for boss monsters pathgrid is a grid id if you want that the monsters that spawn at this point follow a grid timeleft, don't touch it's used by eq to count how many time is left until a mob respawn for our example we need that the rats spawn at 2 locations : 1rst one : x=1000, y=10, z=100, heading=0 2nd one : x=500, y=500, z=100, heading=0 I want they respawn in 2 minutes ( 120 sec ) after they are killed at the 2 locations so we add 2 spawn2 rows : id=>1, spawngroupID=>1, zone=>podisease, x=>1000, y=>10, z=>100, heading=>0, respawntime=>120, variance=>0, pathgrid=>0, timeleft=>0 and id=>2, spawngroupID=>1, zone=>podisease, x=>500, y=>500, z=>100, heading=>0, respawntime=>120, variance=>0, pathgrid=>0, timeleft=>0 now i launch the server and the game i go in podisease and I can see a diseased rat at the 1rst location and a 2nd one at the 2nd location I kill this last one, I wait and 2 minutes after that, a swamp rat spawn =) |
Excellent stuff! Thanks for the information. I cant wait for the next one!
|
Sandy.....you rock! Thanks for coming up with this, you should "Sticky" it. :)
|
very nice, we need something like this for all the tables.
1 question tho, what exactly is the lastname column? also would be wonderful to know how to add the text in parenthesis underneath the name(if this even relates to npc_types) thanks :) |
Just some info about what ipc used to be. I'm not sure if this was ever finished or if it was completed the way originally intended, but ipc was planned to be an npc that helped you(and leveled as well?).
|
I'd assume that dmelee_texture1, dmelee_texture2 fields make the NPC wield certain weapons.
|
are they still usefull ?
npcs wear weapons with the lootdrop_entries equip_item field I know |
Crip. That field is for a player character. The lastname field for an NPC is not used. If you were to name your mob THE DARK PRINCE you would have to put an _ between the names to make it appear correctly in game. So THE DARK PRINCE becomes THE_DARK_PRINCE.
Hope it helps! |
Actually lastname is used - it just didn't work until 5.5 or 5.6 - it puts whatever is in the field under the NPCs name in parentheses.
|
Thanks Killspree! I didnt know that :)
|
hmmm still doesnt seem to be workin for me :cry:
only way i could find to add parenthesis was a change in the source. but it is limited, can only make so many different "parenthesis"(guess we can call it that hehe) |
Erm, no...you don't do that. You just put whatever into the field. Like say you have a character named Bob and he's the warrior trainer. You put Warrior Trainer(spaces are allowed here) in the lastname field, and it would show up like this ingame:
Bob (Warrior Trainer) |
So I could change Cazic Thule to say:
Quote:
|
hmmmm, what body type would boats be? all i know is that they are non-con =/.
|
I think boats are not npcs but objects no ?
|
All times are GMT -4. The time now is 03:47 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.