PDA

View Full Version : NPC Editing Tutorial


sandy
04-22-2004, 06:23 AM
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 :

CREATE TABLE `npc_types` (
`id` int(11) NOT NULL auto_increment,
`name` text NOT NULL,
`lastname` varchar(32) default NULL,
`level` tinyint(2) unsigned NOT NULL default '0',
`race` smallint(5) unsigned NOT NULL default '0',
`class` tinyint(2) unsigned NOT NULL default '0',
`bodytype` int(11) default NULL,
`hp` int(11) NOT NULL default '0',
`gender` tinyint(2) unsigned NOT NULL default '0',
`texture` tinyint(2) unsigned NOT NULL default '0',
`helmtexture` tinyint(2) unsigned NOT NULL default '0',
`size` float NOT NULL default '0',
`hp_regen_rate` int(11) unsigned NOT NULL default '0',
`mana_regen_rate` int(11) unsigned NOT NULL default '0',
`loottable_id` int(11) unsigned NOT NULL default '0',
`merchant_id` int(11) unsigned NOT NULL default '0',
`npc_spells_id` int(11) unsigned NOT NULL default '0',
`npc_faction_id` int(11) NOT NULL default '0',
`mindmg` int(10) unsigned NOT NULL default '0',
`maxdmg` int(10) unsigned NOT NULL default '0',
`npcspecialattks` varchar(36) NOT NULL default '',
`banish` int(10) unsigned NOT NULL default '0',
`aggroradius` int(10) unsigned NOT NULL default '0',
`social` int(10) unsigned NOT NULL default '0',
`face` int(10) unsigned NOT NULL default '1',
`luclin_hairstyle` int(10) unsigned NOT NULL default '1',
`luclin_haircolor` int(10) unsigned NOT NULL default '1',
`luclin_eyecolor` int(10) unsigned NOT NULL default '1',
`luclin_beardcolor` int(10) unsigned NOT NULL default '1',
`fixedz` tinyint(2) unsigned NOT NULL default '0',
`d_meele_texture1` int(10) unsigned NOT NULL default '0',
`d_meele_texture2` int(10) unsigned NOT NULL default '0',
`walkspeed` float NOT NULL default '0',
`runspeed` float NOT NULL default '0',
`MR` smallint(5) NOT NULL default '0',
`CR` smallint(5) NOT NULL default '0',
`DR` smallint(5) NOT NULL default '0',
`FR` smallint(5) NOT NULL default '0',
`PR` smallint(5) NOT NULL default '0',
`ipc` tinyint(1) NOT NULL default '0',
`see_invis` tinyint(4) NOT NULL default '0',
`see_invis_undead` tinyint(4) NOT NULL default '1',
`qglobal` int(2) unsigned default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=88441 ;



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 :

warrior = 1
cleric = 2
paladin = 3
ranger = 4
shadowknight = 5
druid = 6
monk = 7
bard = 8
rogue = 9
shaman = 10
necromancer = 11
wizard = 12
magician = 13
enchanter = 14
beastlord = 15
gm warrior = 20
gm cleric = 21
gm paladin = 22
gm ranger = 23
gm shadowknight = 24
gm druid = 25
gm monk = 26
gm bard = 27
gm rogue = 28
gm shaman = 29
gm necromancer = 30
gm wizard = 31
gm magician = 32
gm enchanter = 33
gm beastlord = 34
banker = 40
merchant = 41
adventuremerchant = 61


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 :


1 => "Normal" ( default ),
2 => "Lycanthrope",
3 => "Undead",
4 => "Giant",
5 => "Construct",
6 => "Extraplanar",
7 => "Monster",
8 => "Flying Monsters",
9 => "Unknown_9",
10 => "Unknown_10",
11 => "Untargetable",
12 => "Vampyre",
13 => "Atenha Ra",
14 => "Greater Akheva",
15 => "Khati Sha",
16 => "Unknown_16",
18 => "Unknown_18",
19 => "God",
20 => "Unknown_20",
21 => "Animal",
22 => "Insect",
23 => "Fire Creature",
24 => "Construct/Elemental/Gargoyle",
25 => "Plant",
26 => "Dragon",
27 => "Unknown_27",
28 => "Summoned Creature",
29 => "Unknown_29",
30 => "Unknown_30",
31 => "Unknown_31",
32 => "Illusion",
65 => "Unknown_65",
66 => "Unknown_66",
67 => "Unknown_67"

you should use 0 as 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 :

E => Enrage
F => Flurry
R => Rampage
S => Summon
T => Triple Attack
Q => Quadruple Attack
U => Unslowable
M => Unmezzable
C => Uncharmable
N => Unstunable

for example :
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 :



CREATE TABLE `spawngroup` (
`id` int(11) NOT NULL auto_increment,
`name` varchar(30) NOT NULL default '',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) TYPE=MyISAM;

CREATE TABLE `spawn2` (
`id` int(11) NOT NULL auto_increment,
`spawngroupID` int(11) NOT NULL default '0',
`zone` varchar(16) NOT NULL default '',
`x` float NOT NULL default '0',
`y` float NOT NULL default '0',
`z` float NOT NULL default '0',
`heading` float NOT NULL default '0',
`respawntime` int(11) NOT NULL default '0',
`variance` smallint(4) NOT NULL default '0',
`pathgrid` int(10) NOT NULL default '0',
`timeleft` bigint(16) NOT NULL default '0',
PRIMARY KEY (`id`)
) TYPE=MyISAM;

CREATE TABLE `spawnentry` (
`spawngroupID` int(11) NOT NULL default '0',
`npcID` int(11) NOT NULL default '0',
`chance` smallint(4) NOT NULL default '0',
PRIMARY KEY (`spawngroupID`,`npcID`)
) TYPE=MyISAM;



spawngroup => spawn table
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 =)

Gossamer
04-22-2004, 07:15 AM
Excellent stuff! Thanks for the information. I cant wait for the next one!

Jezebell
04-22-2004, 07:35 AM
Sandy.....you rock! Thanks for coming up with this, you should "Sticky" it. :)

Cripp
04-24-2004, 11:24 AM
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 :)

killspree
04-24-2004, 07:02 PM
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?).

RangerDown
04-24-2004, 07:32 PM
I'd assume that dmelee_texture1, dmelee_texture2 fields make the NPC wield certain weapons.

sandy
04-25-2004, 02:59 AM
are they still usefull ?
npcs wear weapons with the lootdrop_entries equip_item field I know

Gossamer
04-25-2004, 03:53 AM
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!

killspree
04-25-2004, 04:29 AM
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.

Gossamer
04-26-2004, 08:21 AM
Thanks Killspree! I didnt know that :)

Cripp
04-26-2004, 09:44 AM
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)

killspree
04-26-2004, 09:52 AM
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)

mikenune
04-26-2004, 09:56 AM
So I could change Cazic Thule to say:

Cazic Thule
(Supreme lord of chewing gum)
Kewl! :D

Shadow-Wolf
04-26-2004, 04:07 PM
hmmmm, what body type would boats be? all i know is that they are non-con =/.

sandy
04-29-2004, 10:00 AM
I think boats are not npcs but objects no ?

Wumpas
08-25-2004, 07:30 AM
I beleive that boats are body type 12 non targetable and boats behave as npc's in eqemu. You can path them and if people remember back to 5.1 days you could even be attacked by boats. I think that was a faction issue however.

Elkay
09-19-2004, 02:03 PM
I beleive that boats are body type 12 non targetable and boats behave as npc's in eqemu. You can path them and if people remember back to 5.1 days you could even be attacked by boats. I think that was a faction issue however.

:lol:

joshuaes
11-20-2004, 05:32 PM
I got an error when running MYsql CC. [joshuaes] ERROR 1045: Access denied for user: 'joshuaes@***.***.*.***' (Using password: YES) what did i do wrong thx very much :)

mattmeck
11-20-2004, 05:47 PM
I got an error when running MYsql CC. [joshuaes] ERROR 1045: Access denied for user: 'joshuaes@***.***.*.***' (Using password: YES) what did i do wrong thx very much :)

dont have the correct user / pass

joshuaes
11-20-2004, 05:52 PM
the user/pass is the same as my winmysqladmin's?

Cisyouc
04-08-2005, 07:28 AM
Restickified.

Darktanion
05-12-2005, 07:33 PM
I am using the phpMyAdmin and finally got it up and running properly on my own web server page. I want to know a few things about this spawning of mobs. But first a statement lol. I went into the db and pulled up the spawns and wanted to add a_wyvern_hatchling to podisease. When I added it to podisease it popped as a shrunken human. I have tried new textures didnt do much cept change the clothing the npc was wearing. Although its name popped up as a_wyvern_hatchling it still was a npc human. I looked over Sandy's creation method and followed it the number I have for this mob is 124060 and it does not pop a hatchling. I was wondering if the db is not setup like sandys even though it is the PEQ_Velious db?
Some clarification on the numbering system would be nice. I tried to even go in game and use the #findnpctype a_wyvern_hatchling and the number was still set to 124060 and when I used the method #dbspawn 124060 it still came out a human npc figure with the name of a_wyvern_hatchling. Now in the db it is already configured to the settings of bodytype etc. am I suppose to change any of those to make it a flying creature.
Now for the confusing part of this story lol. I decided to try to spawn a goblin scout in podisease and it was still a npc human. Now I was thinking to myself how can this be if there are goblins in halas region. So I zoned over there and tried it there, low and behold it popped normal. What in the world hehe so I am guessing it has something to do with a Table or even the db itself since podisease really isnt set up all the way yet. But the funny thing is Iceberg the polar bear popped in podisease just fine but an Ice Giant was a very large humanoid npc with a viking helm on his head. It has the body size right on everything just not the look of what type it is. Sorry if all this is blabber but I am new to all this and just curious how to get the right mobs that I want in my game in podisease thanks all :)

Belfedia
05-12-2005, 10:40 PM
Npc skin are only in native zone (except few global)
Use this how to :
http://www.eqemulator.net/forums/showthread.php?t=17993
For put your wyvern or goblin in podisease :)

Aydun
06-29-2005, 04:56 PM
Hi there guys,

I want to start off by saying thank you very much for the descriptions of all the colums and such and how they interact! I love to be able to UNDERSTAND how the games working, not just how to MAKE it work :).

Onto my problem.. at first.. before reading this, I was in my server I typed #spawn Dereclor, a h uman guy named Dereclor popped up, then i targeted him and typed #npcspawn create, i get the Dereclor00 was created successfully! message.. So I figured it was fine, to test, I logged out, shut down the server, and started it up and went back in .. no NPC there, when I look in npc_types he was there, then I found this guide.

I made a new spawngroup, ID =1, name=karnor. then I made the spawnentry stuff, Dereclors ID=1, so i typed spawngroupID=1, npcid=1, chance=100. After that i went into karnor's castle to get my loc, then continued to the next step and in spawn2 I typed: id=1,spawngroupid=1,zone=karnor,x=20.45,y=-24.23,z=3.75, heading=0,respawntime=120 all others remained at 0.

I went into the game and lo and behold no Dereclor, All of the tables concerning spawns i cleared again and redid this so the only entries are for the npc Dereclor and it's spawngroup, and still no such luck, I tried restarting the server everytime I made a change. I'd appreciate any insight into this problem !

Thanks in advance,

GeorgeS
11-02-2006, 07:18 PM
Just finished my NPC editing tutorial. This is unique in that it uses ingame spawning, but uses my tools when needed. Read through these tutorial pages carefully, so you can understand my methods and how simple npc spawning is.


Tutorial 1 is about spawning static NPC's
Tutorial 2 is about creating moving NPC's

http://66.159.225.58/eqemu/spawning_tut/index.html

I am enhancing these tuts as time permits, so stay tuned. NPC editor is being slightly enhanced this week...

Hope these tuts. help because I've seen so many errors in previous posts on how this process works.

GeorgeS

Irreverent
05-07-2008, 11:32 AM
Bah looking for this link:

- EQEmu's server GuideBook v1.3 : for races index, materials, textures for example =)

See Here :
http://www.eqemulator.net/forums/viewtopic.php?t=10900

bthomsen0312
11-30-2009, 12:39 PM
Bump for great justice, some of these guidebook's would be use to be re-edited back to the top. IE race index materials textures and georgeS' tut on how to make static and roaming NPC's

GeorgeS
12-01-2009, 11:03 AM
The guidebook is on my site as is the spawning tut. Concept is ok, but the tool version is old.

http://www.georgestools.eqemulator.net/spawning_tut/index.html

GeorgeS

Templus
11-06-2010, 12:34 PM
none of the links work =\ .. where's the most updated and working tools to work with zones/npcs/items/quests/lootdrops ?

blackdragonsdg
11-06-2010, 05:14 PM
none of the links work =\ .. where's the most updated and working tools to work with zones/npcs/items/quests/lootdrops ?

http://www.georgestools.eqemulator.net/

You also might want to find a program such as Navicat as it will make life a lot easier.

GeorgeS
11-07-2010, 12:23 PM
I use Heidisql - free and does all I need it to do
http://www.heidisql.com/

GeorgeS

sklead
07-26-2014, 07:05 PM
I was going to post a new thread, but I figured I would ask here before posting a new thread. I was trying to spawn a new NPC and I wanted it to have a apostrophe in the name, like: L'Vaen Kestal. When I did the #spawn command he popped up just fine, and when I did the create command everything went well, but when I repopped the zone he didn't show up. I checked my DB and he was in there as L'Vaen Kestal, but he wouldn't show up. I even tried using ASCII code (39 for ') in the DB and he still wouldn't spawn. I have this problem with player names as well; when I try to rename a player with an apostrophe I can't do it. So my question is how do I do this? I've played on a few other servers where I've seen players and NPCs with names like this.

Kingly_Krab
07-26-2014, 08:25 PM
Have you tried escaping the apostrophe using a \?
So like this:
#spawn L\'Vaen_Kestal
#npcedit name L\'Vaen_Kestal

sklead
07-26-2014, 10:33 PM
I wasn't aware that you could do that lol, but yes it worked as far as allowing me to spawn the mob. However when you con mobs with names like that or fight them it cuts off everything after the apostrophe. So in this case the NPCs name is literally just "L" when conning or fighting. Another mob I had was Mora V'tali which shows up as "Mora V".

Uleat
07-27-2014, 08:01 PM
If that's not acceptable, try using the accent mark ` (under tilde ~)

I know players could get that added to their names on live.


I don't know if the con issue is client- or server-related..but, 'fixing' it might cause problems with other server features..like scripting?