View Single Post
  #7  
Old 05-23-2006, 02:17 PM
RangerDown
Demi-God
 
Join Date: Mar 2004
Posts: 1,066
Default

For NPC ID's, PEQ has been going with the convention of setting aside 1,000 numbers for each zone. The NPC's for a particular zone will have ID's in the range of
<that zone's zoneid number> * 1000
thru
(<that zone's zoneid number> * 1000 + 999)

ie, north qeynos, zone #2, would have its NPC's in the range of 2000 to 2999.

So, your best bet is to put your NPC's way up higher than (the highest zone number * 1000 + 999) to ensure no conflict. Keep in mind that each expansion adds about 20 new zones so keep it way up there to avoid conflict with future expansions too.

As for other tables that get unique ID's, we pretty much let the database assign them in its usual behavior of giving the next sequence. So you need to look at the highest value that's currently in the database and then make yours start waaaaaaaaaaaaay up higher, high enough that there's little chance a future database release could conflict.

The hardest part is going to be making DAMN SURE you have also made the change in ALL fields of related tables. Example, incrementing loottable ID's also means those same changes must be made in the loottable_id field of loottable_entries, and in the loottable_id field of npc_types. Maybe one day Mysql will feature cascading updates.... one day....

(Keep in mind too that PEQ could redo its numbering convention at any time if they had a compelling need to. Right now we don't have a compelling need to, but my lawyers told me to put this disclaimer up.)
__________________
<idleRPG> Rogean ate a plate of discounted, day-old sushi. This terrible calamity has slowed them 0 days, 15:13:51 from level 48.
Reply With Quote