Spawn Tables made easy

Development forum for the EQ2Emulator Database project.

Moderator: Team Members

Locked
User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Spawn Tables made easy

Post by John Adams » Fri Nov 02, 2007 1:17 pm

THIS INFO IS OBSOLETE! Do not use.
This is not meant to inspire anyone to build spawn tables for the current versions, but instead to give those anxious admins out there something to do with their time while we find us some data. Say you want to spawn ol Naggy in Antonica, and keep him there even after you shut down and restart your world. As I posted elsewhere, the spawn routines are in place and working (respawns, maybe not, since you can't kill anything yet).
Here's how you set up an NPC (generic)... Note all these values are arbitrary, and not accurate at all. This is just a sample :)
npcs:
First, let's make an NPC, in this case, my buddy Lord Nagafen...

Code: Select all

INSERT INTO `npcs` (`id`, `name`, `min_level`, `max_level`, `enc_level`, `race`, `race_type`, `class_`, `gender`, `min_group_size`, `max_group_size`, `show_name`, `attackable`, `show_level`, `targetable`, `show_command_icon`, `display_hand_icon`, `command_list_type`, `command_list_subtype`, `faction_id`, `hair_type_id`, `facial_hair_type_id`, `wing_type_id`, `chest_type_id`, `legs_type_id`, `soga_hair_type_id`, `soga_facial_hair_type_id`) VALUES (1000, 'Lord Nagafen ', 1, 50, 0, 275, 275, 33, 1, 0, 0, 1, 1, 1, 1, 1, 0, 'NPC', '', 0, 0, 0, 0, 0, 0, 0, 0);
That will insert the NPC record for Naggy into your npcs table. Note his NPC ID is '1000' (in this example).
Creating the spawn point --
spawngroup:
In the DB, find the table: `spawngroup` and enter a new spawngroup for your mob:

Code: Select all

INSERT INTO `spawngroup` (`id`, `name`) VALUES (1, 'Lord_Nagafen');
This name can be anything, since it does not appear in the client - only for you to identify. Field `id` is used in the other 2 spawn tables, so if you are creating your own, this is the ID to remember as well.
spawnentry:
Open the table: `spawnentry`. and enter new spawnentry details:

Code: Select all

INSERT INTO `spawnentry` (`id`, `npcid`, `objectid`, `spawngroupid`, `spawnpercentage`) VALUES (1, 196, 0, 1, 100);
Important Values --
npcid = npcs table `id` value (1000 in this case)
spawngroupid = spawngroup table `id` value (1 in this case)
spawnpercentage = 100%, without the '%' sign :)
spawns:
Open the table: `spawns`. and enter new spawn 'point' for your npc (you can get the x,y,z by typing /loc in game where you want your guy to pop) --

Code: Select all

INSERT INTO `spawns` (`id`, `zone_id`, `spawngroup_id`, `x`, `y`, `z`, `x_offset`, `y_offset`, `z_offset`, `heading`, `respawn`, `location_id`) VALUES (1, 12, 1, -100, -15, 0, 0, 0, 0, 270, 3600, 0);
Important Values --
zone_id = from table: `zones` where you want the mob to spawn (12 = Antonica)
spawngroup_id = again, the `id` value from spawngroup table
x, y, z, heading = your /loc from in game
respawn = prolly does nothing yet
location_id = leave ZERO, since it seems to crash my client if > 0.
Restart your world, log in, and if you used my coords above, you should have a retarded red dragon standing in a corn field, amazed at the puffs of smoke coming from his own nostrils.
Everyone, please add, change, debunk, or flame away. I know this is not important information, but for those interested in persisting spawns until the team gets the DB rolling, have fun.
Oh, and export/backup your work often, since I am not sure if feeds from the world startup will nuke your tables ;)
Last edited by John Adams on Thu Aug 07, 2008 6:20 am, edited 2 times in total.

Lawles
Posts: 7
Joined: Sun Oct 28, 2007 9:56 am

Post by Lawles » Fri Nov 02, 2007 4:00 pm

Ya i been having fun with this for a few days i got a few spawns in my antonica that always pop when server starts.. as i see of so far respawn doesnt work cause i have entered alot of diffrent numbers in there and got no result.. I am good at figuring out DB's lol.. not very skilled in programming yet.. working on my degree.. :) But good info for new server creators.. :)
~Lawles

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Fri Nov 02, 2007 9:05 pm

Cool. How are you getting NPCs to "die" or vanish so they have the opportunity to respawn? I haven't figured that out yet.

User avatar
Zcoretri
Team Member
Posts: 1642
Joined: Fri Jul 27, 2007 12:55 pm
Location: SoCal

Post by Zcoretri » Wed Nov 07, 2007 8:22 pm

Am I wrong in that a tinyint unsigned data type can't accept a value greater than 255?
Just wondering because MySQL is balking at the 275 value for race.

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Thu Nov 08, 2007 5:22 am

Race has a max value of 255, race type is the field that you need to change that affects the spawns appearance

User avatar
ZexisStryfe
Posts: 1026
Joined: Thu Jul 26, 2007 6:39 am
EQ2Emu Server: Sytherian Legends
Location: Connecticut
Contact:

Post by ZexisStryfe » Thu Nov 08, 2007 7:26 am

what exactly does race define anyway? Is it so things like the Master spells work?

LethalEncounter
Team: Zombie
Posts: 2717
Joined: Wed Jul 25, 2007 10:10 pm

Post by LethalEncounter » Thu Nov 08, 2007 3:19 pm

Race is mainly (always?) used for playable races. Most NPCs on live have either a 0 or 255 in that field. The highest I have seen the field (besides 255) is 19.

CrabClaw
Retired
Posts: 88
Joined: Wed Aug 01, 2007 10:49 am
Location: Seattle

Post by CrabClaw » Tue Jan 29, 2008 11:32 am

A sticky of this, before it gets lost? We can keep it up to date for any changes as well. Maybe even incorporate the working /spawn commands list like a mini FAQ.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Post by John Adams » Wed Jun 04, 2008 2:00 pm

Link, can you un-sticky this (but maybe keep it for reference) because the spawn tables are nothing like this anymore?
Thanks!
Edit: Oh, nm.. I can unsticky myself! ;)

Locked

Who is online

Users browsing this forum: No registered users and 0 guests