Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 11-02-2006, 01:07 AM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default mobs jumping in path and Z position

Using the #grid and #wp commands to create a path results in the mobs jumping up and down a lot as they follow their route. I noticed that if I lower the Z of a waypoint, the mob stays on the ground.

My question is, should I just set every Z coord to a point I know is below the lowest point in the zone and be done with it (say -1000) or will that cause problems?
Reply With Quote
  #2  
Old 11-02-2006, 01:49 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by Rhodan
Using the #grid and #wp commands to create a path results in the mobs jumping up and down a lot as they follow their route. I noticed that if I lower the Z of a waypoint, the mob stays on the ground.

My question is, should I just set every Z coord to a point I know is below the lowest point in the zone and be done with it (say -1000) or will that cause problems?
I just make sure i set a point every time the mob goes up or down, if he goes up a hill, then i make many points , all the way up. this seems to work. But swimming is still a problem ; when they swim , they still "bounce", no matter.
Also, I've noticed sometimes lag can do this.
Reply With Quote
  #3  
Old 11-02-2006, 01:56 AM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Heres' two docs I made for my self, with data i found and help users gave me in this forum;

Quote:
type
0.Circular they go 1,2,3,4,1,2,3,4,1,2,3,4..ect..
2.Random is kind of obvious.. 1,3,1,2,4,3,1,2,4,2,3,4,1,2,3,4,2..ect..
3.Patrol they go 1,2,3,4,3,2,1,2,3,4,3,2,1,2,3,4..ect..
(1.random 10 doesnt seem to work for me)
as for pause types..

Pausetype
0: Random half. NPC pauses for half of it's pause time + random of half it's pause time.
1: Full. NPC pauses for full pause time.
2: Random. NPC pauses for random of it's pause time.

heres what i do...
#grid max <--to check highest grid id (not sure if it checks whole server or just in that zone) ill say 49 shows..
#grid add 50 3 2
select npc..
#gassign 50
#wp add 50 20 1
#wp add 50 20 2
#wp add 50 20 3
ect..

then just do a #repop and he should start movin. note it takes the server a few seconds to load all the waypoints

so #wpinfo should display all the coo
Quote:
#wpinfo 0-49 - Target an NPC and use this to retrieve WP information assigned to it for waypoints 0-49.
#gassign grid_num - Target an NPC and use this to assign it's spawn2 point to grid grid_num.
#grid add/delete grid_num wandertype pausetype - Adds grid grid_num with the wandertype/pausetype as follows:

Wandertype
0: Circular. NPC will cycle waypoints in order, then head back to the first waypoint.
1: Random 10. NPC will pick a random of the nearest 10 waypoints and go to it.
2: Random. NPCwill pick a random waypoint in the grid and go to it.
3: Patrol. NPC will walk the waypoints to the end, then turn and backtrack.

Pausetype
0: Random half. NPC pauses for half of it's pause time + random of half it's pause time.
1: Full. NPC pauses for full pause time.
2: Random. NPC pauses for random of it's pause time.

or deletes grid number grid_num.

#wp add/delete grid_num pause wp_num - Adds waypoint number wp_num to grid grid_num with a pause of
pause on the location you're standing at, or deletes waypoint number wp_num in grid number grid_num
(just leave pause at 0).

To setup an NPC to a grid, simply #gassign an NPC spawned by a certain spawn2 point,
and all NPC's spawned by that point will adhere to the selected grid. An NPC assigned
to a grid will simply start wandering it after spawning.
They have served me well, hope you find use in them too
Reply With Quote
  #4  
Old 11-02-2006, 03:04 AM
eq4me
Hill Giant
 
Join Date: Jul 2006
Posts: 166
Default

I found this in zone/features.h

Code:
//THESE ARE BROKEN RIGHT NOW:
//enable these to prevent mob hopping when they are pathing
//#define FIX_PATHING_WHEN_MOVING // expensive but accurate
//fix Z on sendto as well, if you still have hopping problems.
//#define FIX_SENDTO_Z
The actual code is in zone/waypoints.cpp in the functions Mob::CalculateNewPosition and Mob::SendTo

Maybe someone with more time and programming skill than me can have a look at this?

Edit: Someone can enlighten us what is broken right now? On first glance I cant find anything in the forums or wiki.

Last edited by eq4me; 11-02-2006 at 11:29 AM..
Reply With Quote
  #5  
Old 11-02-2006, 06:50 AM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

Quote:
Originally Posted by Angelox
Heres' two docs I made for my self, with data i found and help users gave me in this forum;

They have served me well, hope you find use in them too
Yep, read those and made the paths. Its the Z axis and the popping up and down of mobs that I'm asking about.
Reply With Quote
  #6  
Old 11-02-2006, 12:00 PM
Angelox
AX Classic Developer
 
Join Date: May 2006
Location: filler
Posts: 2,049
Default

Quote:
Originally Posted by Rhodan
Yep, read those and made the paths. Its the Z axis and the popping up and down of mobs that I'm asking about.
Well, Like I said, I don't have that problem, at least anymore
Reply With Quote
  #7  
Old 11-08-2006, 03:06 AM
Rhodan
Hill Giant
 
Join Date: Oct 2006
Posts: 179
Default

Now I get what you mean.

When making a path and there is an elevation change, place a waypoint at the start, another at the top, and another at the end. The mob tries to go directly between two waypoints and if the straight line between them is above the ground, the mob will "hop" with every step.

I briefly wondered why we even include a Z when the code could just find the Z of the ground itself and place the mob there; then I thought about swimming and flying...
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 02:18 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3