PDA

View Full Version : EOC - Copy zone observation


Slaymore
02-17-2016, 03:58 PM
HI,

Was playing around in the copy zone tool and I noticed something that may be important.

I was making a copy of fhalls (998) to play around with a custom zone and I noticed that when it creates the new npc entries it increments the npc numbers to 999XXX.. This could be a problem, if I understand the npc numbering system correctly.

If I have this right, any npc should have the first 3 digits of its id as the zone they are in. So 344 is guildlobby and the npcs all start with 344.

But I noticed that when I made my fhalls copy (zone 998) it created all the new npcs as 999 which is apprentice (999).

I was lucky in that 999 is really nothing. But i think this could be a problem if I had chosen say any other zone to copy. Then all the npcs for my copy would be incorrectly id'ed into the next incremented zone prefix. This would make using the zone prefix for npc queries not so good..

N0ctrnl
02-17-2016, 07:56 PM
It will start at the next available NPC ID. If you want them to match the zone (as the PEQ editor looks for - since I'm assuming that's what you're after), you will have to move them manually.

Note that it makes absolutely no difference what the NPC ID really is. Same with everything else it imports (grids, spawngroup, etc).

If you really want to make the IDs match, make a scratch database and remove all NPCs up to the point you want the ID to start with. Then you'll be good.

Slaymore
02-17-2016, 08:24 PM
Yeah, I guess I am just being @nal .. any mob in a zone should (best practice) have the zone prefix... in my ind :)

I get that it doesnt matter what the id is from a functional view point, but from a development view its not ideal..

For example

I wanted to copy a zone in EOC then use the mass field editor to change level .. say 68-72. Now I know that I can use the mass field editor to set hit points, min max hit etc. But It would be better if I could run queries and apply formulas to them ie. set hp = level * 1000 / min hit = level* 3 / max hit = level* 5 and apply them all to zone prefix number..

Again I am just being @nal I guess... I noticed that when I spawn a new npc with #spawn then write to db with #npcspawn create it also uses the next available id number... not the next available id number with that zone prefix..

oh well .. its all good as long as it works .. just seems messy to my brain lol

thanks for the reply.

N0ctrnl
02-17-2016, 10:26 PM
You could write queries to change it around like you're wanting to do. I mean, it is SQL after all :)

I've imported a mix and match of a lot of different databases. I just make a copy of the NPC, add 'em into the spawn group, and remove the high ID version. Takes me like 10 minutes at most to do almost any zone.